{"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 2 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×8×10^6 = 16000000 B/s. Time = 131072/16000000 = 0.008192 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 2, "rate_mhz": 8, "sec": 0.008192}, "prompt_sha1": "7dae35c8775549dbd4a2e262968e377189a30322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_10_18_11` with RED, GREEN, YELLOW states. Hold RED for 10 clock cycles, GREEN for 18, and YELLOW for 11; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_10_18_11 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 9) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 17) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 10) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_10_18_11", "red": 10, "green": 18, "yellow": 11}, "prompt_sha1": "484b35c5e7123843a3472bf0bb3a08c243a0f54d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×12²=0.001584 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 12, "energy": 0.0015840000000000001}, "prompt_sha1": "468730bd1edd4f7b24f9e9af6e46b6057597190b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2189 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2189/(2189+40+8) = 0.978543 = 97.85%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2189, "iphdr": 40, "eff": 0.9785426911041574}, "prompt_sha1": "31f822ea0d7a53191af05f4b26716539f04b2990", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×4 KiB = 96 KiB = 98304 bytes = 0.093750 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 4, "reach": 98304}, "prompt_sha1": "cc922144112b8e9e4bdf61a83535979dd040e239", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_818701` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_818701 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_818701"}, "prompt_sha1": "377054f782f80de8d44f9a712167d6b32455051c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_7707` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_7707 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_7707", "width": 10}, "prompt_sha1": "a92ca20970b8dd106f45dcf0c1ddf740d22523f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 2-way set-associative cache uses 128-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/128 = 256.\nSets = 256/2 = 128.\nOffset bits = log2(128) = 7; index bits = log2(128) = 7; tag bits = 40-7-7 = 26.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 128, "ways": 2, "addr_bits": 40, "lines": 256, "sets": 128, "offset": 7, "index": 7, "tag": 26}, "prompt_sha1": "94ef49b459a54444fcba13ef339e9a4fba3ef551", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 18.2 V source drives a 2200 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 18.2-3.3 = 14.9 V.\nI = V/R = 14.9/2200 A = 6.7727 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 18.2, "vf": 3.3, "r": 2200, "current_a": 0.006772727272727272}, "prompt_sha1": "86d3ea138faa78cb4676438bbab2a3b4e3027454", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_4987` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_4987 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_4987", "width": 32}, "prompt_sha1": "7a6a238d4f18524dd0398bf27ce4081392a5912a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25 Mbit/s and RTT 120 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25×10^6 × 120/1000 = 3e+06 bits = 375000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25, "rtt_ms": 120, "bits": 3000000.0, "bytes": 375000.0}, "prompt_sha1": "676bd7e44df1f68d4752ce5f2fd11962f545c1a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_7443` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_7443 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_7443", "width": 24}, "prompt_sha1": "1e31be18889b0da36f169a3a6ba9380a7c83fc0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 85%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.030×(15+0.150×40) = 1.430000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.97, "l2": 15, "l2_hit": 0.85, "mem": 40, "amat": 1.4300000000000006}, "prompt_sha1": "a15a23e8671ede46738b3ecbee03e4f02663db7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_82` for a synchronous sampled input `noisy`. Update output `clean` only after observing 82 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_82 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 81) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_82", "stable_samples": 82}, "prompt_sha1": "41f8dc47783926fbe8c9773b6cfafb78784341e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 24 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 24-21 = 3.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 24, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 3}, "prompt_sha1": "fe8088315820854dc8bbbb6135845faf00f875cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3826364486, carries 19103 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 19103+1+1 = 19105. ACK = (3826364486+19105) mod 2^32 = 3826383591.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3826364486, "payload": 19103, "syn": 1, "fin": 1, "ack": 3826383591}, "prompt_sha1": "f5762d00a5d335d0cf7c6c4346ef9d815a96acb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_19_16_17` with RED, GREEN, YELLOW states. Hold RED for 19 clock cycles, GREEN for 16, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_19_16_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 18) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 15) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_19_16_17", "red": 19, "green": 16, "yellow": 17}, "prompt_sha1": "85f59efdfe01e802b1ab60f55c1136444547635f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_3958` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_3958 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_3958", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "9dbbcd3d89fe228da1215b7fb3bad68a900d2893", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(16×10^6) s = 128.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 2048, "time_us": 128.0}, "prompt_sha1": "a581cd53b9ca5a987212854f4b0ab098d47ec080", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 19648 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 19648/1000 s; frequency = 1000/19648 = 0.050896 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 19648, "hz": 0.050895765472312705}, "prompt_sha1": "73a6251d1bd6625e2b035c17ee32bd7891457896", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 160.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+10 = 170.5. Period = 170.5/10000000 = 1.705e-05 s. Maximum rate = 1/period = 58651.026393 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 160.5, "conv_cycles": 10, "period": 1.705e-05, "rate": 58651.026392961874}, "prompt_sha1": "aa47eb969acab2e1ae1249c1e7a63c75a59fd169", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 38 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 38-20 = 18.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 38, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 18}, "prompt_sha1": "ad5e4f156735949fd587af13f8278819af0b1e4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_5_msb` for `5-bit in`. The highest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_5_msb (\n input logic [4:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 5; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_5_msb", "width": 5, "priority": "high"}, "prompt_sha1": "a14dfd8e637325773f5f6990d0c186f468213649", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 6250 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 6250 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 6250.0}, "prompt_sha1": "be0d053c999a441428058d19fc93fa773b2fcf4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_3933` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_3933 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_3933"}, "prompt_sha1": "5c517cb26631e93a77d56ae8ef4f5409b59dafe2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 200 MHz and must generate an exact 125 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 200000000/125 = 1600000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 1600000 that also keeps the period count within 16 bits is 32000.\nPeriod count = 1600000/32000 = 50.\nPSC register = 32000-1 = 31999.\nARR register = 50-1 = 49.\nVerification: 200000000/(32000×50) = 125 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 200000000, "target_hz": 125, "total_division": 1600000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32000, "period": 50, "psc_reg": 31999, "arr_reg": 49}, "prompt_sha1": "a23824bda1c45aac94b3f6749222da3914676473", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/1000 = 2.2e-07 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 1000, "tau": 2.2e-07}, "prompt_sha1": "8d491a354ad01c1edbe9eaafbcfb202a88a2bdd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 15524 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 15524/50000000 s; frequency = 50000000/15524 = 3220.819376 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 15524, "hz": 3220.8193764493685}, "prompt_sha1": "c602c108076ae7e8da986f831e527cc87e27ef78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `size` elements of type `int`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n total += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `items[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n total += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "99c95faf13a9ded6bde9eb79554dad0e95f9eb99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 239 elements. Review loop `for i in range(239-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(239-1)` produces indices 0 through 237, so index 238 is skipped. Correct loop: `for i in range(239):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 239, "variant": "miss_last"}, "prompt_sha1": "9aa4202b09c3d1c45e63a6a9bb3804aef7d9327a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [17, 24, 10, 12, 13]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [68, 76, 46, 56, 63].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [17, 24, 10, 12, 13], "finish": [68, 76, 46, 56, 63]}, "prompt_sha1": "ea811bf9dc4255b983ba1cdefedc66fdac528142", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 100 counts per period. What compare/high-time count produces exactly 40% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.4 × 100 = 40. Verification: 40/100 = 0.4, which is 40%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 100, "duty": 40, "high": 40}, "prompt_sha1": "5e8c0af03c0275f100692419ccb05065a400d161", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×80/1000/8 = 20000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 80, "bytes": 20000.0}, "prompt_sha1": "bd4f2eef29f97354b716896592fac5a5b8c2b68b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=10 ms, C=1 ms,T=40 ms, C=5 ms,T=50 ms, C=1 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/10 + 1/40 + 5/50 + 1/200 = 0.330000 = 33.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 10], [1, 40], [5, 50], [1, 200]], "utilization": 0.33}, "prompt_sha1": "6b36323094a4d5f09aee36c9f90b200ca9ff9153", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_9375` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_9375 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_9375"}, "prompt_sha1": "1cf5e0b2c2665c418519cee252aab9228c6a9b2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_33_26_10` with RED, GREEN, YELLOW states. Hold RED for 33 clock cycles, GREEN for 26, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_33_26_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 32) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 25) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_33_26_10", "red": 33, "green": 26, "yellow": 10}, "prompt_sha1": "566249b7ac11f16226ea2c8a2cac1184d977670f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 60 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 60000000/4000 = 15000.\nWith prescaler divisor limited to at most 256, the largest divisor of 15000 that also keeps the period count within 16 bits is 250.\nPeriod count = 15000/250 = 60.\nPSC register = 250-1 = 249.\nARR register = 60-1 = 59.\nVerification: 60000000/(250×60) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 60000000, "target_hz": 4000, "total_division": 15000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 60, "psc_reg": 249, "arr_reg": 59}, "prompt_sha1": "6f22bbf5324bd290cc187a348bcba012ebfb36b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_63_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 63 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_63_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd63;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_63_ignore", "cycles": 63, "retrigger": false}, "prompt_sha1": "bce054f143f63edcaeff98de93dcd49066dc3dbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11111110010100000 using generator polynomial bits 10011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 19, "msg_bits": 17, "msg": 130208, "remainder": 7}, "prompt_sha1": "72f8e02337720738db11d815401ce9b7fb6cf5a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_119` generating a one-clock-cycle `tick` every 119 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_119 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 118) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_119", "divide": 119}, "prompt_sha1": "f758ef9358b58a28c323fe40db78d32dcc960fbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 33 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 33×8 = 264. Time = 264/230400 = 0.00114583333 s = 1.145833 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 6, "parity": 0, "stop": 1, "frames": 33, "seconds": 0.0011458333333333333}, "prompt_sha1": "757450847a6fcc929a70ef26066d107b05721395", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xB2C06431, set bit 63 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 63)`. Result = 0x80000000B2C06431.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 2998953009, "bit": 63, "op": "set", "result": 9223372039853728817}, "prompt_sha1": "b38cf345c660652aacbc07952779e83ff643d852", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1200 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1200/(1200+28) = 0.977199 = 97.72%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1200, "overhead": 28, "efficiency": 0.9771986970684039}, "prompt_sha1": "f50ac1fb2789565b8d94f430e33a5befaa6df141", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8360` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8360 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8360"}, "prompt_sha1": "289b557b8369412b560873cb38b3529cc3ed6324", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_118_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 118 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_118_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd118;\n end else begin\n if (pulse_in)\n count <= 7'd118;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_118_retrig", "cycles": 118, "retrigger": true}, "prompt_sha1": "e4523cb7c6c02b6b6809812053340bede4e63a03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 5 V reference and returns code 3848. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 3848/4095 × 5 V = 4.698413 V.\nThus the estimated input is about 4.6984 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 5.0, "code": 3848, "volts": 4.698412698412699}, "prompt_sha1": "2d1754ad1f31ceec135fe677ac6961e7baf99d68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_80_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 80 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_80_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd80;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_80_ignore", "cycles": 80, "retrigger": false}, "prompt_sha1": "90d0794d46020f9fea5192afd2a3a8320f0dceb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65298; x = x + 710;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65298+710 = 66008. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (66008) mod 2^16 = 472. So `x` stores 472. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65298, "add": 710, "result": 472}, "prompt_sha1": "50c7f262bf6a2f309d9a110f87ae3fff2b413182", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_18_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 18 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_18_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd18;\n end else begin\n if (pulse_in)\n count <= 5'd18;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_18_retrig", "cycles": 18, "retrigger": true}, "prompt_sha1": "94d7f2a8b6d1773f885381ce269be223265c21d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [24, 23, 9]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [53, 56, 29].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [24, 23, 9], "finish": [53, 56, 29]}, "prompt_sha1": "473531aafcb50fe1e781be07ab50e859f3ffef05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (2000×8) = 312.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 2000, "pps": 312.5}, "prompt_sha1": "654498f2320a400914fd324bfd8256b806d39071", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6595 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6595/(6595+20+8) = 0.995772 = 99.58%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6595, "iphdr": 20, "eff": 0.9957723086214706}, "prompt_sha1": "0caf332392fe0ffa2fa36d9583f2a773adf00445", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m151` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 151 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m151 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd151;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m151", "width": 8, "max": 151}, "prompt_sha1": "a4118f9f1a52106105ea612ce604d258e126574c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 2000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/2000 = 42000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 42000 that also keeps the period count within 16 bits is 21000.\nPeriod count = 42000/21000 = 2.\nPSC register = 21000-1 = 20999.\nARR register = 2-1 = 1.\nVerification: 84000000/(21000×2) = 2000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 2000, "total_division": 42000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 21000, "period": 2, "psc_reg": 20999, "arr_reg": 1}, "prompt_sha1": "4cb74a9b9976ad041f1cac2fa7037e188201add8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1000 million instructions at average CPI 2 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1000×10^6×2/(2.4×10^9) = 0.833333333 s = 833.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1000, "cpi": 2.0, "ghz": 2.4, "sec": 0.8333333333333334}, "prompt_sha1": "8b619362646893dbc4cb76b7664c4f2a888d6953", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 37105 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 37105/50000000 s; frequency = 50000000/37105 = 1347.527287 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 37105, "hz": 1347.5272874275704}, "prompt_sha1": "141bd4157b1ac226fd2b4a89413ea687dd16b230", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 2-way set-associative cache uses 64-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/64 = 128.\nSets = 128/2 = 64.\nOffset bits = log2(64) = 6; index bits = log2(64) = 6; tag bits = 57-6-6 = 45.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 64, "ways": 2, "addr_bits": 57, "lines": 128, "sets": 64, "offset": 6, "index": 6, "tag": 45}, "prompt_sha1": "7ce329b8ef3e74cee9842668d5c6389b415d5c20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1366-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1366×8 = 10928 bits.\nSerialization delay = bits/rate = 10928/(100×10^6) s = 0.00010928 s = 109.280000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1366, "rate_mbps": 100, "delay_s": 0.00010928}, "prompt_sha1": "9d194503ffc412ec1d51dd2cd69e6299938815be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65523; x = x + 43;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65523+43 = 65566. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65566) mod 2^16 = 30. So `x` stores 30. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65523, "add": 43, "result": 30}, "prompt_sha1": "64efcd11dc5f213f9e40478846ec5a62730719b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (768×8) = 325.520833 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 768, "pps": 325.5208333333333}, "prompt_sha1": "a461ee7e0116404dc0441d1dd0970eb0740c9e27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x99409EDC6DE3 in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E3 6D DC 9E 40 99.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 168502822202851, "endian": "little", "bytes": [227, 109, 220, 158, 64, 153]}, "prompt_sha1": "c21a950c5343277c7410d8eb9db60bbe538ca6e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 25 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 25-15 = 10.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 25, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 10}, "prompt_sha1": "d233babe498e39f8417fb87bc596209304b15964", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 2.5 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×2.5/(0.5×10^9) = 0.5 s = 500.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 2.5, "ghz": 0.5, "sec": 0.5}, "prompt_sha1": "744807bccbece337ebedc9a47e99eb1fa3c38e86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 842 elements. Review loop `for i in range(842+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(842+1)` includes index 842, which is out of range for a length-842 sequence. Correct loop: `for i in range(842):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 842, "variant": "one_past"}, "prompt_sha1": "ecd550d8c3a5e9326222e4d1abdf5af71ce6109a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 53 and initial occupancy is 11. In an abstract batch, producer attempts to enqueue 81 items first, dropping any excess beyond capacity; then consumer removes up to 88 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=53, dropped=39; consumed=53; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 53, "start": 11, "prod": 81, "cons": 88, "dropped": 39, "consumed": 53, "final": 0}, "prompt_sha1": "625df6d0338415ed3ca41236ea95ee133a43a74d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2069 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "8d675847d392cb11659196b24757d810e98e311b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 255, and period is 8136 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(255×8136) = 30.848131 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 255, "period": 8136, "hz": 30.848130796074575}, "prompt_sha1": "8c0bc8324403d02b3edfe5eb6b3803f401d86fc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 60 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 60 = 63.\nClock pulses = 63×9 = 567.\nTime = 567/1000000 s = 567.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 60, "clocks": 567, "time_s": 0.000567}, "prompt_sha1": "0bc8aefe37738fe6636eec4cfd44d150ec515154", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 42 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 42×7 = 294. Time = 294/4800 = 0.06125 s = 61.250000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 5, "parity": 0, "stop": 1, "frames": 42, "seconds": 0.06125}, "prompt_sha1": "acd290c8ef730d23ad330091c11b39cd099744fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_44_msb` for `44-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_44_msb (\n input logic [43:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 44; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_44_msb", "width": 44, "priority": "high"}, "prompt_sha1": "3a7a6e84854296433ab975c42183067050deb6f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 216 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 216000000/800 = 270000.\nWith prescaler divisor limited to at most 256, the largest divisor of 270000 that also keeps the period count within 16 bits is 250.\nPeriod count = 270000/250 = 1080.\nPSC register = 250-1 = 249.\nARR register = 1080-1 = 1079.\nVerification: 216000000/(250×1080) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 216000000, "target_hz": 800, "total_division": 270000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 1080, "psc_reg": 249, "arr_reg": 1079}, "prompt_sha1": "8dc620e2ac896f58f52d34a330c06e275dc8bc38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 17457 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 17457/10000000 s; frequency = 10000000/17457 = 572.836112 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 17457, "hz": 572.8361115884745}, "prompt_sha1": "eb287c788d1c28fcb6f3269b6b0d9a266a80a17e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_7426` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_7426 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_7426", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "26596d2b2ebbf71397e3fd672d3dc4bc8ddc582b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(8×2400) = 7500.000000.\nNearest integer divisor D = 7500.\nActual baud = 144000000/(8×7500) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 8, "baud": 2400, "divisor": 7500, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "2554e220f2ef0e6ef7e8cb79b5e2933dacec1961", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x23B524EA in 4 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: EA 24 B5 23.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 599074026, "endian": "little", "bytes": [234, 36, 181, 35]}, "prompt_sha1": "89bb3a8be89906aefe80ce953eee2e201ee18732", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7318` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7318 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7318"}, "prompt_sha1": "3f2bcba4f2dc9bad0178bdebbc153e781995929c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x58, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x58<<1)|1 = 0xB1 = 10110001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 88, "rw": 1, "byte": 177}, "prompt_sha1": "9051e093f32d893a6a0cacdb88b2e3412da69a37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `n` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `samples[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "99c278787ae4bd247d3cbab3d0af1a6f9b1cfe42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 45; x = x + 505;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 45+505 = 550. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (550) mod 2^8 = 38. So `x` stores 38. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 45, "add": 505, "result": 38}, "prompt_sha1": "67b21d423785143b4bd1b5a672e6bf6f3eb14901", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 583. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 583/4095 × 3.3 V = 0.469817 V.\nThus the estimated input is about 0.4698 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 583, "volts": 0.4698168498168498}, "prompt_sha1": "45c9d8fca5bb7bd42da75fa56824d95848fa121a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(2×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 16, "time_us": 8.0}, "prompt_sha1": "db7f1acdac0b3d9f4705e2bb265477fa57093a6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2400 counts per period. What compare/high-time count produces exactly 10% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.1 × 2400 = 240. Verification: 240/2400 = 0.1, which is 10%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2400, "duty": 10, "high": 240}, "prompt_sha1": "a84ed895a45ee3e287bdc2ad6d7ca3ec53fa2d90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 100101101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "100101101", "ones": 5, "parity": 1}, "prompt_sha1": "f45c333ae87e8597279a5f98e2532f596a327914", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNTTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 1, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "83aeee9add051a0323649be7e6cdb2d925906d50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 256-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/256 = 16.\nOffset bits = log2(256) = 8.\nIndex bits = log2(16) = 4.\nTag bits = 64-4-8 = 52.\nCheck: 52+4+8 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 256, "addr_bits": 64, "lines": 16, "offset_bits": 8, "index_bits": 4, "tag_bits": 52}, "prompt_sha1": "dfb7191a41418f4eaa798d20762956df2f6de4f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 23883 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23883/50000000 s; frequency = 50000000/23883 = 2093.539338 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 23883, "hz": 2093.5393376041534}, "prompt_sha1": "e28becc523a625c6f2999b22ba5c2bddba557687", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 2 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×2/(0.8×10^9) = 0.0025 s = 2.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 2.0, "ghz": 0.8, "sec": 0.0025}, "prompt_sha1": "bc3727d346d1871681a2ba4e74a419014ae2b2c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 218, and period is 5132 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(218×5132) = 10.726008 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 218, "period": 5132, "hz": 10.726007708424206}, "prompt_sha1": "315cf1b94adc9bf15bf7f2ada8af5776abae521b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 4 = 15.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 4, "spi_hz": 15000000.0}, "prompt_sha1": "5ade0dc42f598f570a5daf769a25061cf8f2127b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.75 ns hit time, 90.1% hit rate, and a 125 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.901 = 0.099.\nAMAT = hit time + miss rate × miss penalty\n= 4.75 ns + 0.099×125 ns = 17.1250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.75, "hit_rate": 0.901, "penalty": 125, "result": 17.124999999999996}, "prompt_sha1": "059f49cef654c91b89931e81a9f96b9f190fbba4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.93. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.93) + 0.93/6) = 4.444444.\nThe theoretical speedup is about 4.444×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.93, "n": 6, "result": 4.4444444444444455}, "prompt_sha1": "7d979674bf4f72dc5a2cbf97a3148864fb665cfa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 96 MHz, prescaler divisor is 735, and period is 10192 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 96000000/(735×10192) = 12.815173 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 96000000, "prescaler": 735, "period": 10192, "hz": 12.815173165027392}, "prompt_sha1": "65beb4137cedcd0f8147bdd5978d2cb1bc4f04aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000000011110000100000 using generator polynomial bits 101101. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 00000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 45, "msg_bits": 22, "msg": 2112544, "remainder": 0}, "prompt_sha1": "49e20f9856fd439572f7d9010ff118d946e3f116", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5049-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5049×8 = 40392 bits.\nSerialization delay = bits/rate = 40392/(25000×10^6) s = 1.61568e-06 s = 1.615680 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5049, "rate_mbps": 25000, "delay_s": 1.61568e-06}, "prompt_sha1": "8d867a3b43461ab10447d5c1ab0edb072241ac5c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 247.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+12 = 259.5. Period = 259.5/12000000 = 2.1625e-05 s. Maximum rate = 1/period = 46242.774566 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 247.5, "conv_cycles": 12, "period": 2.1625e-05, "rate": 46242.774566473985}, "prompt_sha1": "e2712514d57f0a57408da2304e899c52783bf54f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_6309` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_6309 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_6309"}, "prompt_sha1": "a0977ffe95e82371f55a0fc69d53565bd70cae7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_92_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 92 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_92_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd92;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_92_ignore", "cycles": 92, "retrigger": false}, "prompt_sha1": "bbcb4722dec45dbee2653693dcaf5e2f350f9262", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w64_1971` implementing a dual-clock asynchronous FIFO with depth 16 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w64_1971 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 64,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w64_1971", "depth": 16, "width": 64, "ptr_w": 4}, "prompt_sha1": "384fbb41ce0231877ba3520e1396ae031c9e70a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x50. Extract the 5-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x50 >> 3) & 0x1F = 0xA (10).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 3, "value": 80, "mask": 31, "field": 10}, "prompt_sha1": "29d7271b40f5a8f340b28653fc5c17b41bd801c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967201; x = x + 383;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967201+383 = 4294967584. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967584) mod 2^32 = 288. So `x` stores 288. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967201, "add": 383, "result": 288}, "prompt_sha1": "d34e1bd54c543337ad048c34785d75d05bc5470b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 2-way set-associative cache uses 16-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/16 = 512.\nSets = 512/2 = 256.\nOffset bits = log2(16) = 4; index bits = log2(256) = 8; tag bits = 40-4-8 = 28.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 16, "ways": 2, "addr_bits": 40, "lines": 512, "sets": 256, "offset": 4, "index": 8, "tag": 28}, "prompt_sha1": "e81ffe351c6db65f8cac53d981de8409cc07706c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_7932` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_7932 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_7932"}, "prompt_sha1": "48674862bc333aa141011b008ae3a08eb0f63580", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xFEF9F7409C in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 9C 40 F7 F9 FE.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 1095115423900, "endian": "little", "bytes": [156, 64, 247, 249, 254]}, "prompt_sha1": "7eec355a849cf16be837aff679cff23198c499f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.249.107.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.249.107.0\nBroadcast address: 10.249.107.127\nUsable host range: 10.249.107.1 to 10.249.107.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.249.107.0/25", "usable": 126, "first": "10.249.107.1", "last": "10.249.107.126", "broadcast": "10.249.107.127"}, "prompt_sha1": "825f4c5f0e118a6ffca7c73af97cc8104a15c0a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2263 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "e90e55fd72afebe23e95a17fc1a41c62dce8b760", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1906932219, carries 61261 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 61261+0+1 = 61262. ACK = (1906932219+61262) mod 2^32 = 1906993481.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1906932219, "payload": 61261, "syn": 0, "fin": 1, "ack": 1906993481}, "prompt_sha1": "796b8031206950b28b15c65e47dbb51eb0155e78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 94 and tail index 42, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (94-42) mod 128 = 52. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 94, "tail": 42, "occupancy": 52}, "prompt_sha1": "a93d3490b34032cf54f9865111685ab5e51ff034", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 17 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 17 = 19.\nClock pulses = 19×9 = 171.\nTime = 171/400000 s = 427.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 17, "clocks": 171, "time_s": 0.0004275}, "prompt_sha1": "ec9ed3222ad3ec29cf0cce4a0950d501f85e62d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m4068` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 4068 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m4068 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd4068;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m4068", "width": 12, "max": 4068}, "prompt_sha1": "c15d3cd131b045b47ceb2a6db7fd94180d609ae5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w29_signed` comparing two 29-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w29_signed (\n input logic signed [28:0] a,\n input logic signed [28:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w29_signed", "width": 29, "signed": true}, "prompt_sha1": "95a34c2a7935af1650d8cae00751571e740175e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TTTTTTNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 1, 1, 1, 1, 1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "91b4557c69961344f25cf6aa9952e641dc9f3761", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 20%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.200 × 3 = 0.090000.\nEffective CPI = 1.1 + 0.090000 = 1.190000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.2, "penalty": 3, "result": 1.1900000000000002}, "prompt_sha1": "171fb426108d2a0f1e7d232a1644673ac463efe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_109` for a synchronous sampled input `noisy`. Update output `clean` only after observing 109 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_109 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 108) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_109", "stable_samples": 109}, "prompt_sha1": "786ba67072aaf7d1eb38340fcb4c332afb33bda2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=100 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×2.2/(100+2.2) = 0.193738 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 100, "r2": 2.2, "vout": 0.19373776908023482}, "prompt_sha1": "95529412ac853f2bfb8eeec45ad62f18bce890c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 200/1000 = 4e+08 bits = 5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 200, "bits": 400000000.0, "bytes": 50000000.0}, "prompt_sha1": "262285cabdd1332a0fd0a7b30c10d6708ad65bab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `items` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n total += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `a[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n total += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "cdea3afeec4ffe44f33c07c0e72bea7e0c4b011c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2690-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2690×8 = 21520 bits.\nSerialization delay = bits/rate = 21520/(100×10^6) s = 0.0002152 s = 215.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2690, "rate_mbps": 100, "delay_s": 0.0002152}, "prompt_sha1": "8805e38c478058c6530ebe0f924cdcb18dadabd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 64 data bits per transfer at 8000 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 64/8 = 8. Bandwidth = 8×8000×10^6×4 = 256.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 64, "rate_mt": 8000, "channels": 4, "gbps": 256.0}, "prompt_sha1": "12f4aa790e84ba939b8d0c3d4c41478403d6fece", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 20 and tail index 97, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (20-97) mod 256 = 179. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 20, "tail": 97, "occupancy": 179}, "prompt_sha1": "4740fc9a20535f7500d8f52138cb55ba507a6220", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 240 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 240 MHz / 2 = 120.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 240000000.0, "divider": 2, "spi_hz": 120000000.0}, "prompt_sha1": "0e895c93faad6296b0167a15c26b2ee86e418170", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_6_9284` converting a 6-bit binary input `bin` to 6-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_6_9284 (\n input logic [5:0] bin,\n output logic [5:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_6_9284", "width": 6}, "prompt_sha1": "ec608d411a3536258b9edc477198959556948dee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m16` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 16 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m16 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd16;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m16", "width": 5, "max": 16}, "prompt_sha1": "503e57265a7c2992054b4706e07f9918bc6f44a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=100 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/100 + 3/25 = 0.170000 = 17.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 100], [3, 25]], "utilization": 0.16999999999999998}, "prompt_sha1": "ac560c51f6708e3c33e8cc1c11ce742ba88b5d70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x8C88025E. Extract the 4-bit field starting at bit 12 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x8C88025E >> 12) & 0xF = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 12, "value": 2357723742, "mask": 15, "field": 0}, "prompt_sha1": "73fd5e2acd3b37f30ad998c98bd481f6a0cd2339", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w16_8407` implementing a dual-clock asynchronous FIFO with depth 16 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w16_8407 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 16,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w16_8407", "depth": 16, "width": 16, "ptr_w": 4}, "prompt_sha1": "16c92a837f7a9eab1cd8aaf4039c07a0318eb51f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x8A45. Extract the 6-bit field starting at bit 8 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x8A45 >> 8) & 0x3F = 0xA (10).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 8, "value": 35397, "mask": 63, "field": 10}, "prompt_sha1": "fc153cf0f9025218374e54f144b6f85338427ffc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=10 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×2.2/(10+2.2) = 2.163934 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 10, "r2": 2.2, "vout": 2.1639344262295084}, "prompt_sha1": "ba233368422faaae1a31d392e6b10526878a4708", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 371 elements. Review loop `for i in range(371-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(371-1)` produces indices 0 through 369, so index 370 is skipped. Correct loop: `for i in range(371):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 371, "variant": "miss_last"}, "prompt_sha1": "d01487b2fde02d5b96714b0baa4e75a482eecb30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 7-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^7 V = 0.0078125 V = 7812.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 7, "vref": 1.0, "step": 0.0078125}, "prompt_sha1": "eca8bc306e0074e7664ef9a9de414d7567999cd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 72 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 76800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 72000000/(4×76800) = 234.375000.\nNearest integer divisor D = 234.\nActual baud = 72000000/(4×234) = 76923.077 baud.\nError = (76923.077-76800)/76800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 72000000, "oversample": 4, "baud": 76800, "divisor": 234, "actual": 76923.07692307692, "error_pct": 0.1602564102564088}, "prompt_sha1": "f70271eb46c7d51cea70e38576703812b146ba58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 4003 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×4003/(240×10^6) = 0.0166791667 = 1.667917%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 1000, "cycles": 4003, "load": 0.016679166666666665}, "prompt_sha1": "d4be884650c0883ef752ca55c0559e4f5f916b09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=220 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/2.2 = -100.000000.\nVout = A_v×Vin = -100.000000×0.25 = -25.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 220, "vin": 0.25, "gain": -99.99999999999999, "vout": -24.999999999999996}, "prompt_sha1": "2e91148598eddedc936d2fc3dcc0b83d0c9a57eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.97. Using Amdahl's law, compute the theoretical speedup on 48 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.97) + 0.97/48) = 19.917012.\nThe theoretical speedup is about 19.917×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.97, "n": 48, "result": 19.917012448132773}, "prompt_sha1": "2d8936877b7f0eb45c70fca87d050f1864bc9a43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_54_msb` for `54-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_54_msb (\n input logic [53:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 54; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_54_msb", "width": 54, "priority": "high"}, "prompt_sha1": "30b7b0cf5a37f69e0c0d2e7a347adcc059ae9052", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x4D, toggle bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 5)`. Result = 0x6D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 77, "bit": 5, "op": "toggle", "result": 109}, "prompt_sha1": "207277c120de1c68b126c9f1b67306badfe3ad9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 64-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/64 = 4096.\nOffset bits = log2(64) = 6.\nIndex bits = log2(4096) = 12.\nTag bits = 48-12-6 = 30.\nCheck: 30+12+6 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 64, "addr_bits": 48, "lines": 4096, "offset_bits": 6, "index_bits": 12, "tag_bits": 30}, "prompt_sha1": "fed2b9f3749019089ef9211a358de6a36bba15ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "P", "P", "P", "P", "P", "P", "P", "P", "V", "P", "V", "P", "V", "V", "V", "P", "P", "P", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "7bc4c275a64e7b888abbc4423cb362625b1b5c4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 128-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/128 = 64.\nOffset bits = log2(128) = 7.\nIndex bits = log2(64) = 6.\nTag bits = 36-6-7 = 23.\nCheck: 23+6+7 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 128, "addr_bits": 36, "lines": 64, "offset_bits": 7, "index_bits": 6, "tag_bits": 23}, "prompt_sha1": "66f576b56819165f23945804309d15084293181c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 92%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.010×(4+0.080×150) = 1.660000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.99, "l2": 4, "l2_hit": 0.92, "mem": 150, "amat": 1.6600000000000001}, "prompt_sha1": "7e28c7f68c504271742bca7409f94a76f83c06f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 0, 1], "final_state": 2}, "prompt_sha1": "860210eecbb9dff9da562925476de426398be9d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1280 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-20-24 = 1236 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 20, "tcphdr": 24, "mss": 1236}, "prompt_sha1": "b27a8da5b222cac05211067c327dd1f34d94dcbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 256-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/256 = 16.\nOffset bits = log2(256) = 8.\nIndex bits = log2(16) = 4.\nTag bits = 24-4-8 = 12.\nCheck: 12+4+8 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 256, "addr_bits": 24, "lines": 16, "offset_bits": 8, "index_bits": 4, "tag_bits": 12}, "prompt_sha1": "171071329b0773ad3387ab1d6862d3012089a8c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_3109` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_3109 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_3109"}, "prompt_sha1": "d954eed47ca66a42407938700580a8686de7474e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_31` for a synchronous sampled input `noisy`. Update output `clean` only after observing 31 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_31 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 30) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_31", "stable_samples": 31}, "prompt_sha1": "2c74b0e29c821d69c459334c98abedd7ca9a43cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5033-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5033×8 = 40264 bits.\nSerialization delay = bits/rate = 40264/(25000×10^6) s = 1.61056e-06 s = 1.610560 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5033, "rate_mbps": 25000, "delay_s": 1.61056e-06}, "prompt_sha1": "9dc21df7f9686b7b0b792317e2898e52ec87c710", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=2.2 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/1 = -2.200000.\nVout = A_v×Vin = -2.200000×0.2 = -0.440000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 2.2, "vin": 0.2, "gain": -2.2, "vout": -0.44000000000000006}, "prompt_sha1": "ffb3a5d4f08668be3bdfbeb99352b7d38bc8fd74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 1` on one shared integer without synchronization. Assume `requests` initially equals 308. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 308; T2 reads 308; both compute 309; T1 writes 309; T2 writes 309. The observed final value is 309, but two serial increments would produce 310.\n\n```\nlock(mutex)\nrequests = requests + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "376909b88689f24f126a7008185ee82ba27b739a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10000 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10000×56)/(10000+56) = 55.688146 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10000, "r2": 56, "req": 55.68814638027049}, "prompt_sha1": "d69d1026385c460ded2c853bb32468c520631c66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=1 nF and is stepped to 1.8 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1.8(1-e^-4)=1.767032 V; τ=2.2e-05 s and t=8.8e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 1e-09, "multiple": 4, "vin": 1.8, "vc": 1.7670318500002784}, "prompt_sha1": "78ef705400571d4a8a970cb32c408c9fcb4cc7ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3334270128, carries 46055 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 46055+1+0 = 46056. ACK = (3334270128+46056) mod 2^32 = 3334316184.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3334270128, "payload": 46055, "syn": 1, "fin": 0, "ack": 3334316184}, "prompt_sha1": "17b358f1c02cd3993f70812fe33a8914e36b8528", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 6 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 11 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+2 = 10. Total bits = 11×10 = 110. Time = 110/57600 = 0.00190972222 s = 1.909722 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 6, "parity": 1, "stop": 2, "frames": 11, "seconds": 0.0019097222222222222}, "prompt_sha1": "2ae8b38204c786394431cff52360997c6752b104", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×2.5²=0.000146875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 2.5, "energy": 0.000146875}, "prompt_sha1": "94fcc295ca648907d415374ef42f01a8e2c2b81b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 285. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 285/1023 × 2.5 V = 0.696481 V.\nThus the estimated input is about 0.6965 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 285, "volts": 0.6964809384164222}, "prompt_sha1": "6685a81f6a3faf25db87e27dadd818efa8c6e2ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1000×10^6 / (256×8) = 488281.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "frame_bytes": 256, "pps": 488281.25}, "prompt_sha1": "d93a263f3710f4066ffe37610e4f4358fa7bf5e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×5²=1.25e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 5, "energy": 1.2499999999999999e-06}, "prompt_sha1": "35f23d5dd15a35692c13fbd2d1e16891c5343bd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 160.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+14 = 174.5. Period = 174.5/20000000 = 8.725e-06 s. Maximum rate = 1/period = 114613.180516 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 160.5, "conv_cycles": 14, "period": 8.725e-06, "rate": 114613.1805157593}, "prompt_sha1": "77c0e5d332ca75c0e829a170486257bb548e8f93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 40 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 40000000/(4×500000) = 20.000000.\nNearest integer divisor D = 20.\nActual baud = 40000000/(4×20) = 500000.000 baud.\nError = (500000.000-500000)/500000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 40000000, "oversample": 4, "baud": 500000, "divisor": 20, "actual": 500000.0, "error_pct": 0.0}, "prompt_sha1": "6de037bf1346d031492532d0d9339b61618e2e2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6091` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6091 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6091"}, "prompt_sha1": "e1eb2adc2f4d67e81e46d83508e4cf1e2922b1ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNNTNTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 0, 1, 0, 1, 0, 0, 1], "final_state": 1}, "prompt_sha1": "d69cc6225a6883dd858a0eb1a822bfd9b14ead9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 97 and initial occupancy is 20. In an abstract batch, producer attempts to enqueue 28 items first, dropping any excess beyond capacity; then consumer removes up to 179 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=48, dropped=0; consumed=48; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 97, "start": 20, "prod": 28, "cons": 179, "dropped": 0, "consumed": 48, "final": 0}, "prompt_sha1": "b29a18b92e088d3fe16c494072aa062fd721e176", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/470 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 470, "tau": 0.0001}, "prompt_sha1": "4e1033c043bbf0cd04ad943b97a23c478ba6f2c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x19, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x19<<1)|0 = 0x32 = 00110010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 25, "rw": 0, "byte": 50}, "prompt_sha1": "74087a728c705f915d16b6b7a56cbd44b7da63c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_71_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 71 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_71_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd71;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_71_ignore", "cycles": 71, "retrigger": false}, "prompt_sha1": "7a153a96d923e403398f39762e55cac517ba15a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×20/1000/8 = 100000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 20, "bytes": 100000000.0}, "prompt_sha1": "9a3249a780d42c386bdeed9dcd5bfbb278ffa2ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock QUEUE then D; consumer acquires D then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds QUEUE while waiting for D, while consumer holds D while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire D before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "eefd986eda3f0cc6c31b3d1ed0dd121d3d85bc36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.7 V source drives a 100 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.7-2.9 = 3.8 V.\nI = V/R = 3.8/100 A = 38.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.7, "vf": 2.9, "r": 100, "current_a": 0.038000000000000006}, "prompt_sha1": "f7266373fbf96d7106907e5eef9ed82f0f897a27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 80 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 790 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×790/(80×10^6) = 0.049375 = 4.937500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 80, "irq_hz": 5000, "cycles": 790, "load": 0.049375}, "prompt_sha1": "1d7ff988d35c96d0cf9e06d78eaa9d923f1c0929", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x64_no_bypass` with 8 entries of 64 bits. Inputs: `clk`, `we`, `3-bit waddr`, `64-bit wdata`, `3-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x64_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [63:0] wdata,\n input logic [2:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x64_no_bypass", "entries": 8, "width": 64, "mode": "no_bypass"}, "prompt_sha1": "cd07ea316881cb5bf18a24bf8a4c3fce71953a53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x32_no_bypass` with 32 entries of 32 bits. Inputs: `clk`, `we`, `5-bit waddr`, `32-bit wdata`, `5-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [31:0] wdata,\n input logic [4:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x32_no_bypass", "entries": 32, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "3d3cd72e76514efdcfc483fa9024fa9d3c7762b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 52-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^52/2^20 = 2^32 = 4294967296 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 52, "page_exp": 20, "entries": 4294967296}, "prompt_sha1": "37bd20ee92431fc36165d3bba5ee78472e38beb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 23-bit right-shift register module `shiftreg_right_23`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `23-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_23 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [22:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[22:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_23", "width": 23, "direction": "right"}, "prompt_sha1": "57bff7e0eb51a715cac320bd7a14f88f67678b74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 20.4 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 3.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 20.4-3.2 = 17.2 V.\nI = V/R = 17.2/2700 A = 6.3704 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 20.4, "vf": 3.2, "r": 2700, "current_a": 0.00637037037037037}, "prompt_sha1": "4962b3a83ddcbab8e12de4fefb3ff439be81f33b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_4432` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_4432 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_4432", "width": 24}, "prompt_sha1": "2c729d06aae4ca67024bd78091d7dc34db174595", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_62` for a 62-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_62 (\n input logic [61:0] data,\n input logic [5:0] shamt,\n output logic [61:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_62", "width": 62, "direction": "left", "arithmetic": false}, "prompt_sha1": "a051e72476e01916ce1afbf56b243ca6b2dea320", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1600 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 1600 = 320. Verification: 320/1600 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1600, "duty": 20, "high": 320}, "prompt_sha1": "dadeaf7761b7cda672962a5db54d1666a40e1021", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 200 Mbit/s and RTT 100 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 200×10^6×100/1000/8 = 2500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "rtt_ms": 100, "bytes": 2500000.0}, "prompt_sha1": "729131e01f4ef6fe6c2acdca24f12b438782feea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/10=0.25 A. P=V²/R=2.5²/10=0.625 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 10, "i": 0.25, "p": 0.625}, "prompt_sha1": "d1623d5574d0ba7acbcb25356e013937b7ce1b6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=56000 ohm and C=6800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=56000×6800000×10^-12 s = 0.3808 s.\nf_c=1/(2πRC)=1/(2π×56000×6800000×10^-12) = 0.4179 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 56000, "c_f": 6.8e-06, "tau": 0.3808, "fc": 0.4179489051782966}, "prompt_sha1": "2fab6e48d4330c25dfea990979c95daa6bbd1859", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [17, 1, 1, 8]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [27, 9, 10, 18].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [17, 1, 1, 8], "finish": [27, 9, 10, 18]}, "prompt_sha1": "10edb8aefe4e569b00513a237bec40b5449ec43d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 12.7 V source drives a 1800 ohm resistor in series with an LED whose forward voltage is assumed to be 3.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 12.7-3.1 = 9.6 V.\nI = V/R = 9.6/1800 A = 5.3333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 12.7, "vf": 3.1, "r": 1800, "current_a": 0.005333333333333333}, "prompt_sha1": "2d9e6d8e80ada5998c3fab6ad69a9d841c5eddf9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.73. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.73) + 0.73/6) = 2.553191.\nThe theoretical speedup is about 2.553×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.73, "n": 6, "result": 2.5531914893617023}, "prompt_sha1": "5579f56ebdfcd5bf71d88fb976e41163ca2d5be5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 6400 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×6400×10^6×1 = 409.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 6400, "channels": 1, "gbps": 409.6}, "prompt_sha1": "b39f1de16520f097946ad44d1673567901ebb9f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD6C915 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: D6 C9 15.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 14076181, "endian": "big", "bytes": [214, 201, 21]}, "prompt_sha1": "f7477dec8f2dfb060dbd4ccff207dd70704c7b65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=4.7 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/22 = -0.213636.\nVout = A_v×Vin = -0.213636×1 = -0.213636 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 4.7, "vin": 1.0, "gain": -0.21363636363636365, "vout": -0.21363636363636365}, "prompt_sha1": "3ddb824f58aae69a3c2854f58fe51cfdfea5850b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 6` on one shared integer without synchronization. Assume `packets` initially equals 16. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 16; T2 reads 16; both compute 22; T1 writes 22; T2 writes 22. The observed final value is 22, but two serial increments would produce 28.\n\n```\nlock(mutex)\npackets = packets + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "9d079492fbfd51bf7ed89f38e4881df0bd612550", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_26_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 26 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_26_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd26;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_26_ignore", "cycles": 26, "retrigger": false}, "prompt_sha1": "afb5f4a26bbbf7987f5829f4986667b185f5bf58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 1 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×1×10^6 = 1000000 B/s. Time = 256/1000000 = 0.000256 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 1, "rate_mhz": 1, "sec": 0.000256}, "prompt_sha1": "d63148af09f508f8234173cd431037c85452b04b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 4973 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×4973/(120×10^6) = 0.828833333 = 82.883333%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 20000, "cycles": 4973, "load": 0.8288333333333333}, "prompt_sha1": "2da24a06e73a651998858e27cef05fe58fa8d6ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7642(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7642(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7642([1, 2]) == 1.5\nassert mean_7642([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7642"}, "prompt_sha1": "d526b055a628d536cb7cc6eee5c851eec33d599e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock QUEUE then B; T2 acquires B then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds QUEUE while waiting for B, while T2 holds B while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2882638312ea9bd7a3d2415c12e8da67281634e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x16_write_bypass` with 128 entries of 16 bits. Inputs: `clk`, `we`, `7-bit waddr`, `16-bit wdata`, `7-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [15:0] wdata,\n input logic [6:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x16_write_bypass", "entries": 128, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "88d0ce2d71897a6e9b826f11c847023c8107bcec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_25` for a synchronous sampled input `noisy`. Update output `clean` only after observing 25 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_25 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 24) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_25", "stable_samples": 25}, "prompt_sha1": "e8423f25331adf61293a062d3177209c15718ea8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 13-bit left-shift register module `shiftreg_left_13`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `13-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_13 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [12:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[11:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_13", "width": 13, "direction": "left"}, "prompt_sha1": "f8888cfd22042d6e264c9376f52152d7efdbc923", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['V', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 11 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["V", "V", "P", "P", "V", "P", "P", "V", "V", "V", "P", "V", "V", "V", "V", "V", "P", "P"], "value": 11, "blocked": 0}, "prompt_sha1": "34ac0ad2bdc045279e911977481305dfb7dc876c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_7372` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_7372 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_7372"}, "prompt_sha1": "abe7dbae92b8ec2938a6f2d0da07912bc722580d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3300 ohm and C=56000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3300×56000×10^-12 s = 0.0001848 s.\nf_c=1/(2πRC)=1/(2π×3300×56000×10^-12) = 861.2280 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3300, "c_f": 5.6e-08, "tau": 0.0001848, "fc": 861.2280470340658}, "prompt_sha1": "070a5c350cb2f12af1c28db2df5cb27e58535f83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 500 counts per period. What compare/high-time count produces exactly 55% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.55 × 500 = 275. Verification: 275/500 = 0.55, which is 55%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 500, "duty": 55, "high": 275}, "prompt_sha1": "ca79d07f30a6f3859e6994b80cf1dc2860a45d61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 3 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×3/(1.5×10^9) = 0.2 s = 200.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 3.0, "ghz": 1.5, "sec": 0.2}, "prompt_sha1": "d7e6fb8616c20e2e4504fbb15f1f4aa4365cd24f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x3, set bit 2 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 2)`. Result = 0x7.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 3, "bit": 2, "op": "set", "result": 7}, "prompt_sha1": "756e3d944b52afec52967ebdc7b82751c62c8e89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (128×8) = 19531.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 128, "pps": 19531.25}, "prompt_sha1": "fd3b4714da2450d25ec2c595304756b354d1dd08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2940 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "388a15f3ea08f28dab8c97330dfeb2f15251b6f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7151 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7151/(7151+20+8) = 0.996100 = 99.61%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7151, "iphdr": 20, "eff": 0.9960997353391837}, "prompt_sha1": "b6f7ff7ec95b3d289bf10d102cb093e39e2d7438", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 5905 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 5905/50000000 s; frequency = 50000000/5905 = 8467.400508 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 5905, "hz": 8467.400508044031}, "prompt_sha1": "a05190a755beaa79343ec8adec4d01dd5d23cc62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-20 = 3940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 20, "mss": 3940}, "prompt_sha1": "090eddb8247154e05bd0bde6e614c9ee327e62cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 010010100011011010110011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 12 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "010010100011011010110011", "ones": 12, "parity": 0}, "prompt_sha1": "22658fb0501cd0291c99f614276ca23598ba034d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x41F0BB in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: BB F0 41.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 4321467, "endian": "little", "bytes": [187, 240, 65]}, "prompt_sha1": "f808f1744d5371706bc84a0e7d3ecde216db43e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `entries` elements of type `float`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n result += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `words[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n result += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "cc914ec12ee641bb14cb60160906f450c2a05f9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.77.85.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.77.85.0\nBroadcast address: 10.77.85.127\nUsable host range: 10.77.85.1 to 10.77.85.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.77.85.0/25", "usable": 126, "first": "10.77.85.1", "last": "10.77.85.126", "broadcast": "10.77.85.127"}, "prompt_sha1": "762060fb69cb78b964a50436d746a346018e9863", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 20% of instructions, the branch misprediction rate is 15%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.150 × 12 = 0.360000.\nEffective CPI = 1.1 + 0.360000 = 1.460000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.2, "mispred": 0.15, "penalty": 12, "result": 1.46}, "prompt_sha1": "ce3b6e345362810f456807b3045c268ee7d7c426", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_813076` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_813076 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_813076"}, "prompt_sha1": "e81a55951da4de4da5b8b0466421fff970c46efb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 250000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 250000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 250000}, "prompt_sha1": "6b812721911685355697a5614691ae16a920b7d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNNTTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 0, 1, 1, 1, 1], "final_state": 3}, "prompt_sha1": "b15e328b8d903909a0fcdb5f8ccc9d5ac68c2e16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 160 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 160000000/(16×500000) = 20.000000.\nNearest integer divisor D = 20.\nActual baud = 160000000/(16×20) = 500000.000 baud.\nError = (500000.000-500000)/500000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 160000000, "oversample": 16, "baud": 500000, "divisor": 20, "actual": 500000.0, "error_pct": 0.0}, "prompt_sha1": "40d5f673cd695600d9a3bc809c8099315fd3fe7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_2965` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_2965 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_2965"}, "prompt_sha1": "4e247a67a8908df992635e68773cdfb0b85abf1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 57-bit right-shift register module `shiftreg_right_57`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `57-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_57 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [56:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[56:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_57", "width": 57, "direction": "right"}, "prompt_sha1": "e77f23d33a9eee93165dd029c617129bb68221e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 80%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.020×(10+0.200×40) = 2.360000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.98, "l2": 10, "l2_hit": 0.8, "mem": 40, "amat": 2.3600000000000003}, "prompt_sha1": "3d6de75ba0f8a45fc69ac17d47ab1193e222fcc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(12×10^6) s = 2.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 24, "time_us": 2.0}, "prompt_sha1": "0d331323e8d2a61b38513c7d1f5f2d4f4022d2ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 55-bit up/down counter `updown_55_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_55_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [54:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 55'd36028797018963967) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_55_sat", "width": 55, "wrap": false}, "prompt_sha1": "3b14aec11cf767907681e358087bf10ad618c0d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_36_45_7` with RED, GREEN, YELLOW states. Hold RED for 36 clock cycles, GREEN for 45, and YELLOW for 7; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_36_45_7 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 35) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 44) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 6) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_36_45_7", "red": 36, "green": 45, "yellow": 7}, "prompt_sha1": "2c16ef3424b399ad358fe084ff98faf3c2625cac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 200 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 200×10^6×300/1000/8 = 7500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "rtt_ms": 300, "bytes": 7500000.0}, "prompt_sha1": "e325ff28e136bff23e085096baf610fd67bcede0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 16-way set-associative cache uses 16-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/16 = 64.\nOffset bits = log2(16) = 4; index bits = log2(64) = 6; tag bits = 40-4-6 = 30.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 16, "addr_bits": 40, "lines": 1024, "sets": 64, "offset": 4, "index": 6, "tag": 30}, "prompt_sha1": "352bbd2598605ad35025142af089e7fe2012ea9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.35.80.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.35.80.0\nBroadcast address: 10.35.80.63\nUsable host range: 10.35.80.1 to 10.35.80.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.35.80.0/26", "usable": 62, "first": "10.35.80.1", "last": "10.35.80.62", "broadcast": "10.35.80.63"}, "prompt_sha1": "b9ebc0c4e5b0cc5c013d7a3ac169805414ca113e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 202; x = x + 341;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 202+341 = 543. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (543) mod 2^8 = 31. So `x` stores 31. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 202, "add": 341, "result": 31}, "prompt_sha1": "e66788421553701f40f82a01527ef91662dc267f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m67` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 67 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m67 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd67;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m67", "width": 7, "max": 67}, "prompt_sha1": "9fbf01c3de500b1d07ad293cd5acf998ad6319ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=1 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=1e-05 s and t=1e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 1e-09, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "8a2ad432475119932d4c5a99674f8776e621f51f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1×10^6 / (256×8) = 488.281250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "frame_bytes": 256, "pps": 488.28125}, "prompt_sha1": "68cfa74cd38eafeec6e49a179bb7e98066542eb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 2000 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-40-32 = 1928 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 40, "tcphdr": 32, "mss": 1928}, "prompt_sha1": "dc517c07d18ff2ac8c985e10678310e8ab0273d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=4700 nF and is stepped to 12 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=12(1-e^-1)=7.585447 V; τ=0.01034 s and t=0.01034 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 4.7e-06, "multiple": 1, "vin": 12, "vc": 7.585446705942692}, "prompt_sha1": "7520fc1ff2d2ec577a5957324148cb549d829d96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 70%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.100×(15+0.300×80) = 5.400000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.9, "l2": 15, "l2_hit": 0.7, "mem": 80, "amat": 5.399999999999999}, "prompt_sha1": "a7e7ba0d17e4fce7c9845a03bbe9fb6050500bdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 3200 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×3200×10^6×4 = 819.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 3200, "channels": 4, "gbps": 819.2}, "prompt_sha1": "612f9f9eaa6292d6aac884b3cf90054bf8666a43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_44` for a 44-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_44 (\n input logic [43:0] data,\n input logic [5:0] shamt,\n output logic [43:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_44", "width": 44, "direction": "left", "arithmetic": false}, "prompt_sha1": "160ef9e1f9b6bcef6c0036f7ec122249116e1a6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NNTNTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on T; 2->T on N; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 0, 1, 0, 1, 0, 0, 1], "final_state": 1}, "prompt_sha1": "2896888aac6d399cff6ad1286e8556025b384ea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 345 elements. Review loop `for i in range(345-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(345-1)` produces indices 0 through 343, so index 344 is skipped. Correct loop: `for i in range(345):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 345, "variant": "miss_last"}, "prompt_sha1": "37746897d01d9922aabb18322abffc9ca2b8a48e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_45_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 45 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_45_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd45;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_45_ignore", "cycles": 45, "retrigger": false}, "prompt_sha1": "f8191fc2a388b954f9d638c38134264baa189e8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 5 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "af42b47cbd01e805dfa78d69a556fa15d7e1de48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 5e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×1000000 = 2000000 Hz. Proposed rate 5e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000000, "min_fs": 2000000, "proposed": 5000000}, "prompt_sha1": "c7563b4941af7ac8a09a285de2c4ac1ede700b62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 10 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "P", "V", "P", "V", "P", "V", "V", "P", "V", "V", "V", "P", "P", "P"], "value": 10, "blocked": 0}, "prompt_sha1": "9769fe216d8df63d4430159543efab43429eee03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(2×10^6) s = 256.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 512, "time_us": 256.0}, "prompt_sha1": "579f267acf22acd6e8352b0676ddc983030526cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 53-bit up/down counter `updown_53_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_53_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [52:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_53_wrap", "width": 53, "wrap": true}, "prompt_sha1": "009a1080dc0ba25fa698c4cd0790e0b07c0a49f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 70%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.050×(15+0.300×150) = 4.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.95, "l2": 15, "l2_hit": 0.7, "mem": 150, "amat": 4.200000000000003}, "prompt_sha1": "8ba7d40cdd05d09a2a1cd6623a4ed1c81be0b6f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/470 = 4.68085106e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 470, "tau": 4.680851063829788e-06}, "prompt_sha1": "5766d01166a46297a3ad139dde91e5c654386425", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 49 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 49-21 = 28.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 49, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 28}, "prompt_sha1": "53faf7fb225b2ab61ed2c013c11eaf8f29774e54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_6454` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_6454 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_6454"}, "prompt_sha1": "fd9139598cc1cb3dfa4463b841830efdcc18481c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 30-bit up/down counter `updown_30_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_30_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [29:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_30_wrap", "width": 30, "wrap": true}, "prompt_sha1": "2017db5f0fef60766658530d60546b15dc05a986", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5238 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5238/(5238+20+8) = 0.994683 = 99.47%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5238, "iphdr": 20, "eff": 0.9946828712495253}, "prompt_sha1": "1c03a5d46320ff0ab8a7b1e87a34f2995727f1b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 640 payload bytes plus 72 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 640/(640+72) = 0.898876 = 89.89%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 640, "overhead": 72, "efficiency": 0.898876404494382}, "prompt_sha1": "11544dd340ed5fe2a59b19fd822d9936159ffcf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.25 ns hit time, 93.0% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.930 = 0.070.\nAMAT = hit time + miss rate × miss penalty\n= 4.25 ns + 0.070×190 ns = 17.5500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.25, "hit_rate": 0.93, "penalty": 190, "result": 17.54999999999999}, "prompt_sha1": "49ea54d06b57f6a6099ef28aee4492cc29509e91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 15 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 15 = 18.\nClock pulses = 18×9 = 162.\nTime = 162/100000 s = 1620.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 15, "clocks": 162, "time_s": 0.00162}, "prompt_sha1": "e184f45151fb3b42406f7af232d959c576f4c6a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.187.177.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.187.177.0\nBroadcast address: 10.187.177.31\nUsable host range: 10.187.177.1 to 10.187.177.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.187.177.0/27", "usable": 30, "first": "10.187.177.1", "last": "10.187.177.30", "broadcast": "10.187.177.31"}, "prompt_sha1": "69137dd608ab1e6f3ee14bfc4003c547cbceefdb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1000010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1000010", "ones": 2, "parity": 0}, "prompt_sha1": "4c1e68820ad52e1667facd41d3fa93b1ab9fa64e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 305 elements. Review loop `for i in range(305+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(305+1)` includes index 305, which is out of range for a length-305 sequence. Correct loop: `for i in range(305):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 305, "variant": "one_past"}, "prompt_sha1": "3d00b7b10f3a468388e94d4d1acad10cbc4acee8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 61 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 61-18 = 43.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 61, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 43}, "prompt_sha1": "c96fea8100b11c0693d24ec8812e64a937dd55d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 10%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.100 × 2 = 0.030000.\nEffective CPI = 1.1 + 0.030000 = 1.130000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.1, "penalty": 2, "result": 1.1300000000000001}, "prompt_sha1": "3651ce4ec0e67e5352030be5ab2c7936687d9bca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6486(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6486(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6486([1, 2]) == 1.5\nassert mean_6486([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6486"}, "prompt_sha1": "97f86660600e58fb7378b0f621e8dc3dcc928ed2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11010010100010 using generator polynomial bits 11101011. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0110110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 235, "msg_bits": 14, "msg": 13474, "remainder": 54}, "prompt_sha1": "860109bde9650f51545fe3fcd00a2ba205d49480", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/2200=0.00409090909 A. P=V²/R=9²/2200=0.0368181818 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 2200, "i": 0.004090909090909091, "p": 0.03681818181818182}, "prompt_sha1": "acbd036bc5601903c32568780a575efe51f845d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w14_cin` implementing a 14-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `14-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w14_cin (\n input logic [13:0] a,\n input logic [13:0] b,\n input logic cin,\n output logic [13:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w14_cin", "width": 14, "cin": true}, "prompt_sha1": "3a6c3dd6691814b0834a20c111ded956e9075695", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1500 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1500/(1500+48) = 0.968992 = 96.90%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1500, "overhead": 48, "efficiency": 0.9689922480620154}, "prompt_sha1": "ef9c1a6c592d08f84c92681fb510bcb4fefa8e0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=4.7 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×22/(4.7+22) = 19.775281 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 4.7, "r2": 22, "vout": 19.775280898876407}, "prompt_sha1": "e6f02a5ea3eb828a6ecbdea4e8ca834ac7c63892", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(24×10^6) s = 10.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 256, "time_us": 10.666666666666668}, "prompt_sha1": "f568a4d395989f1364317ba5be6973638d2bbea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×24²=1.3536 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 24, "energy": 1.3536000000000001}, "prompt_sha1": "0274592591d03ddaebe16bcdcd5ae2abad15f1b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_973921` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_973921 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_973921"}, "prompt_sha1": "bbc91d45988d568aed2b846147abbe6aa75e12ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=10 nF and is stepped to 3.3 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=3.3(1-e^-3)=3.135703 V; τ=2.2e-05 s and t=6.6e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 1e-08, "multiple": 3, "vin": 3.3, "vc": 3.135702674386049}, "prompt_sha1": "1edfcee233be58062a1f61a9826855ca89249133", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 330 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (330×56000)/(330+56000) = 328.066750 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 330, "r2": 56000, "req": 328.0667495118054}, "prompt_sha1": "26c9a0fe502853640c1a99419a49ce57e11e1003", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x1D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x1D<<1)|0 = 0x3A = 00111010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 29, "rw": 0, "byte": 58}, "prompt_sha1": "2ebacb1247d1434c58b2baa3c2b1aea9e89492a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 4-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/16 = 16384.\nSets = 16384/4 = 4096.\nOffset bits = log2(16) = 4; index bits = log2(4096) = 12; tag bits = 57-4-12 = 41.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 16, "ways": 4, "addr_bits": 57, "lines": 16384, "sets": 4096, "offset": 4, "index": 12, "tag": 41}, "prompt_sha1": "ad93ab216cbe46990d715d078ca35bb8eebb7b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 8-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^8 V = 0.0234375 V = 23437.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 8, "vref": 6.0, "step": 0.0234375}, "prompt_sha1": "c3fa14e1342a6a547bbfb64b217705be8c97dfab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_34` for a 34-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_34 (\n input logic [33:0] data,\n input logic [5:0] shamt,\n output logic [33:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_34", "width": 34, "direction": "left", "arithmetic": false}, "prompt_sha1": "dc9c64a486bfdcace30972429dc50d595cbbfa7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^23 V = 2.98023223877e-07 V = 0.298023 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 2.5, "step": 2.980232238769531e-07}, "prompt_sha1": "82a83c9f6cfe723d12a9f108e906230b95aad512", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 197, and period is 7554 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(197×7554) = 48.382610 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 197, "period": 7554, "hz": 48.38260967732831}, "prompt_sha1": "ab3248044006966f9250b9a2a6480c91625c934b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 76800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(4×76800) = 312.500000.\nNearest integer divisor D = 312.\nActual baud = 96000000/(4×312) = 76923.077 baud.\nError = (76923.077-76800)/76800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 4, "baud": 76800, "divisor": 312, "actual": 76923.07692307692, "error_pct": 0.1602564102564088}, "prompt_sha1": "aa9f307e6e320630d7b5ffa7608e5de9bde97b65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 1987 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×1987/(400×10^6) = 0.049675 = 4.967500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 10000, "cycles": 1987, "load": 0.049675}, "prompt_sha1": "2ce18742ffd8dda0ca27a569a6e40b0fff7a010d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 160 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 1024. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 160000000/5000 = 32000.\nWith prescaler divisor limited to at most 1024, the largest divisor of 32000 that also keeps the period count within 16 bits is 1000.\nPeriod count = 32000/1000 = 32.\nPSC register = 1000-1 = 999.\nARR register = 32-1 = 31.\nVerification: 160000000/(1000×32) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 160000000, "target_hz": 5000, "total_division": 32000, "max_prescaler": 1024, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1000, "period": 32, "psc_reg": 999, "arr_reg": 31}, "prompt_sha1": "b1d9054f1d25720d47e3487c7e7c5eac80a404dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1500 payload bytes plus 14 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1500/(1500+14) = 0.990753 = 99.08%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1500, "overhead": 14, "efficiency": 0.9907529722589168}, "prompt_sha1": "b3ba0b0a3daf21bb94b65506c2c44b9b1ddc76d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_112` for a synchronous sampled input `noisy`. Update output `clean` only after observing 112 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_112 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 111) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_112", "stable_samples": 112}, "prompt_sha1": "734d66a81a7c12b39dd130f3824d910e82c68fca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_11` for a 11-bit unsigned input `data`, `4-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_11 (\n input logic [10:0] data,\n input logic [3:0] shamt,\n output logic [10:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_11", "width": 11, "direction": "left", "arithmetic": false}, "prompt_sha1": "2c736714b832a08f94a1fb6de7cf30e43fd5a395", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1200 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1200-20-20 = 1160 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1200, "iphdr": 20, "tcphdr": 20, "mss": 1160}, "prompt_sha1": "24f08334a9a2992cba63d843ce8b88ed2fde0813", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 128. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 128/255 × 2.5 V = 1.254902 V.\nThus the estimated input is about 1.2549 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 128, "volts": 1.2549019607843137}, "prompt_sha1": "2eceeac9d822e0b7517e877805fa11d15c0000a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w42_signed` comparing two 42-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w42_signed (\n input logic signed [41:0] a,\n input logic signed [41:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w42_signed", "width": 42, "signed": true}, "prompt_sha1": "042621d7215dbbaca2352cceedd9e5ca0849105a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2750 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2750/(2750+40+8) = 0.982845 = 98.28%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2750, "iphdr": 40, "eff": 0.9828448892065761}, "prompt_sha1": "a7d4a941f49fe2112c2a402656b5306d76f7fd34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w8_signed` comparing two 8-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w8_signed (\n input logic signed [7:0] a,\n input logic signed [7:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w8_signed", "width": 8, "signed": true}, "prompt_sha1": "a0edf608b3e7cb65a63e3e627a486104adc642cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×0.1/1000/8 = 25.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 0.1, "bytes": 25.0}, "prompt_sha1": "29265d15660c57356643cd6158dca500457d71e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 4 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 4 = 7.\nClock pulses = 7×9 = 63.\nTime = 63/400000 s = 157.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 4, "clocks": 63, "time_s": 0.0001575}, "prompt_sha1": "da04edbf47df68c4f7874cbe366c53670a765e1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 6 and initial occupancy is 5. In an abstract batch, producer attempts to enqueue 43 items first, dropping any excess beyond capacity; then consumer removes up to 52 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=6, dropped=42; consumed=6; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 6, "start": 5, "prod": 43, "cons": 52, "dropped": 42, "consumed": 6, "final": 0}, "prompt_sha1": "f2f27527250bd2ffac7a57d551a1a030a52d97b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [19, 11, 27, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [62, 39, 73, 59].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [19, 11, 27, 16], "finish": [62, 39, 73, 59]}, "prompt_sha1": "e159454632af9757e6e953393ddd890f2665e0e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `items` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n total += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `data[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n total += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "09027d97e877a3f5d06dba9c77e2038307477d14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2923984969, carries 52644 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 52644+1+1 = 52646. ACK = (2923984969+52646) mod 2^32 = 2924037615.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2923984969, "payload": 52644, "syn": 1, "fin": 1, "ack": 2924037615}, "prompt_sha1": "e564c726a12a844b3dbbd0c88786f6eb206e29ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 72 MHz and must generate an exact 250 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 72000000/250 = 288000.\nWith prescaler divisor limited to at most 256, the largest divisor of 288000 that also keeps the period count within 16 bits is 256.\nPeriod count = 288000/256 = 1125.\nPSC register = 256-1 = 255.\nARR register = 1125-1 = 1124.\nVerification: 72000000/(256×1125) = 250 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 72000000, "target_hz": 250, "total_division": 288000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 256, "period": 1125, "psc_reg": 255, "arr_reg": 1124}, "prompt_sha1": "5657aa9f8a6f46ba670fa245f247d667cf31630e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 2` on one shared integer without synchronization. Assume `requests` initially equals 463. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 463; T2 reads 463; both compute 465; T1 writes 465; T2 writes 465. The observed final value is 465, but two serial increments would produce 467.\n\n```\nlock(mutex)\nrequests = requests + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "9cd310e77e0f751c6dadc6e0d6cb61560723c2a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=47000 ohm, C=470 nF and is stepped to 5 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=5(1-e^-5)=4.966310 V; τ=0.02209 s and t=0.11045 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 47000, "c": 4.7000000000000005e-07, "multiple": 5, "vin": 5, "vc": 4.966310265004573}, "prompt_sha1": "37c33be8ec8d498a1e47d8d8d38bc15523524ea9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967203; x = x + 397;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967203+397 = 4294967600. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967600) mod 2^32 = 304. So `x` stores 304. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967203, "add": 397, "result": 304}, "prompt_sha1": "b9b305d70304b0930eac5af6dbc32650a664a884", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w64_4296` implementing a dual-clock asynchronous FIFO with depth 128 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w64_4296 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 64,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w64_4296", "depth": 128, "width": 64, "ptr_w": 7}, "prompt_sha1": "7a7ffdad4044ffe586ed9927c25b22699eab1bf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w28_unsigned` comparing two 28-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w28_unsigned (\n input logic [27:0] a,\n input logic [27:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w28_unsigned", "width": 28, "signed": false}, "prompt_sha1": "8d75f8615582edf9152dc786a939aec5d66143c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 28 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 28 = 30.\nClock pulses = 30×9 = 270.\nTime = 270/1000000 s = 270.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 28, "clocks": 270, "time_s": 0.00027}, "prompt_sha1": "11d318fbb0dc196a098b71c446f771e928d53327", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1000 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 1000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 1000}, "prompt_sha1": "06f55370428906cbeed9d19573a5a9b79bd8b5f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551398; x = x + 495;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551398+495 = 18446744073709551893. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551893) mod 2^64 = 277. So `x` stores 277. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551398, "add": 495, "result": 277}, "prompt_sha1": "1b90a411300fdd764cf0d6fef2dee64fa91f0c86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [21, 4, 14, 26, 27, 15]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [94, 20, 71, 105, 107, 78].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [21, 4, 14, 26, 27, 15], "finish": [94, 20, 71, 105, 107, 78]}, "prompt_sha1": "07620dbcfa1285ee07327e57875bfb8e96cea05f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m38` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 38 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m38 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd38;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m38", "width": 6, "max": 38}, "prompt_sha1": "8dd5217b244c850920a085e2e413201aa1be89a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (128×8) = 97656.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 128, "pps": 97656.25}, "prompt_sha1": "939ab83bd3cc30dab1c3866d92a5de9daa53d213", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65405; x = x + 376;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65405+376 = 65781. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65781) mod 2^16 = 245. So `x` stores 245. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65405, "add": 376, "result": 245}, "prompt_sha1": "5300d994f08c1a90a3346400679e07ea6680f4ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 8` on one shared integer without synchronization. Assume `events` initially equals 337. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 337; T2 reads 337; both compute 345; T1 writes 345; T2 writes 345. The observed final value is 345, but two serial increments would produce 353.\n\n```\nlock(mutex)\nevents = events + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "eb6644802803a124cdd427ae1d7809c9f46d7a0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_6226` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_6226 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_6226"}, "prompt_sha1": "3761705538e4dfd740ad411a438bc3dd496e3d4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Give exact timer prescaler and reload register values for a 10000 Hz interrupt, but the timer input clock and register conventions are not specified.", "output": "Exact register values cannot be determined without the timer input clock and the device's prescaler/reload conventions. Those must be supplied before solving f_update = f_timer/(prescaler×period_counts).", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "4cfbd5d6b70acc714fa8be1b8d6341536023d85a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551570; x = x + 280;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551570+280 = 18446744073709551850. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551850) mod 2^64 = 234. So `x` stores 234. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551570, "add": 280, "result": 234}, "prompt_sha1": "9081707396ae21e8dcd2badff0f438122caaba58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x56, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x56<<1)|0 = 0xAC = 10101100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 86, "rw": 0, "byte": 172}, "prompt_sha1": "dda440a86dddc4a591364cd3a3a8a5f237bf92ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 8 = 10.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 8, "spi_hz": 10000000.0}, "prompt_sha1": "213e9db3695735a809306b3263aef656ad392641", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNTTNTTTNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "c43e951d40781047d35963df58cead75bc768f97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 770. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 770/1023 × 5 V = 3.763441 V.\nThus the estimated input is about 3.7634 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 770, "volts": 3.763440860215054}, "prompt_sha1": "2c83e1e105d76452c867f4e2e508df34b28fa86e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x6A<<1)|1 = 0xD5 = 11010101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 106, "rw": 1, "byte": 213}, "prompt_sha1": "804cd1c254b5424946a502964533e9acf07b5839", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 15222. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 15222/16383 × 3 V = 2.787402 V.\nThus the estimated input is about 2.7874 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 15222, "volts": 2.7874015748031495}, "prompt_sha1": "2057aa88c43ad2be6b53239b3b100c2e94c13dce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 19.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+14 = 33.5. Period = 33.5/1000000 = 3.35e-05 s. Maximum rate = 1/period = 29850.746269 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 19.5, "conv_cycles": 14, "period": 3.35e-05, "rate": 29850.746268656716}, "prompt_sha1": "6a3974c6fd0987234fcc9aca4ccda728de998179", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 896 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 896/(896+36) = 0.961373 = 96.14%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 896, "overhead": 36, "efficiency": 0.9613733905579399}, "prompt_sha1": "f2022ef888665e3d5ffe7f9dc44959ac090fca9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1280 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-20-60 = 1200 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 20, "tcphdr": 60, "mss": 1200}, "prompt_sha1": "90f3af6fab5ee9425fc2a9206dd88c4c51966df1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 640.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+20 = 660.5. Period = 660.5/8000000 = 8.25625e-05 s. Maximum rate = 1/period = 12112.036336 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 640.5, "conv_cycles": 20, "period": 8.25625e-05, "rate": 12112.03633610901}, "prompt_sha1": "e67559ca7f8a49d6be2eeab68db1dff5a76c40c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_349393` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_349393 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_349393"}, "prompt_sha1": "bcfd37f3e0c50e6b0283743ad0982cb3bda1d4b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [15, 16, 10]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [37, 41, 34].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [15, 16, 10], "finish": [37, 41, 34]}, "prompt_sha1": "00412b601ff433592eb7b5b8d82d1a4707bf4e7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967235; x = x + 453;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967235+453 = 4294967688. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967688) mod 2^32 = 392. So `x` stores 392. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967235, "add": 453, "result": 392}, "prompt_sha1": "a6bb87844bb124236cb31bcc908e42fe5e4c8578", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-20 = 1980 bytes.\nRound down to an 8-byte multiple: floor((1980)/8)×8 = 1976 bytes.\nFragments required = ceil(5000/1976) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 20, "payload": 5000, "max_payload": 1976, "fragments": 3}, "prompt_sha1": "4e9e09ddb5fb6f64b4865736df8c2915f7dafc26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_55` for a 55-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_55 (\n input logic [54:0] data,\n input logic [5:0] shamt,\n output logic [54:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_55", "width": 55, "direction": "left", "arithmetic": false}, "prompt_sha1": "f2963e1864e2f4d5d6d8a80c5e2942b4de3b96ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['V', 'P', 'P', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["V", "P", "P", "V", "V", "V", "V", "P", "P", "V", "P"], "value": 2, "blocked": 0}, "prompt_sha1": "935d9cbbd60a35d29353ec73ef673409d43769a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_169` generating a one-clock-cycle `tick` every 169 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_169 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 168) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_169", "divide": 169}, "prompt_sha1": "68d84ab163ce5327d2e0350739304c3b2cee45dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1.2 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1.2/(2×10^9) = 0.012 s = 12.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.2, "ghz": 2.0, "sec": 0.012}, "prompt_sha1": "3f37d99b278d45794ea7b335ffbdc45c26c5937d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9057(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9057(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9057([1, 2]) == 1.5\nassert mean_9057([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9057"}, "prompt_sha1": "de7d78a101c5935cfbf685cc4cd1de6674853ff6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 46 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 46 = 49.\nClock pulses = 49×9 = 441.\nTime = 441/1000000 s = 441.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 46, "clocks": 441, "time_s": 0.000441}, "prompt_sha1": "8ba54a0896c2859ad8df69a4150276574c6d9ac8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 56-bit up/down counter `updown_56_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_56_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [55:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 56'd72057594037927935) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_56_sat", "width": 56, "wrap": false}, "prompt_sha1": "31572629d52e471716ecbc5dadb90b2fe4d6a3d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 598497332, carries 43848 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 43848+0+0 = 43848. ACK = (598497332+43848) mod 2^32 = 598541180.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 598497332, "payload": 43848, "syn": 0, "fin": 0, "ack": 598541180}, "prompt_sha1": "3ee8edf55a1a618745751b2f4e06ded574ac1172", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 36976. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 36976/65535 × 3.3 V = 1.861918 V.\nThus the estimated input is about 1.8619 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 36976, "volts": 1.8619180590524147}, "prompt_sha1": "71f4c374f73d5756f116bd6eebb97fcf520cc358", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 26534. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 26534/65535 × 5 V = 2.024414 V.\nThus the estimated input is about 2.0244 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 26534, "volts": 2.024414435034714}, "prompt_sha1": "85a0d1049d152c711c48af7b33ec4e2f2197066c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_48` for a synchronous sampled input `noisy`. Update output `clean` only after observing 48 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_48 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 47) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_48", "stable_samples": 48}, "prompt_sha1": "e984e6b1ba57a8f4d7050e0f0c95055b05838b2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 5600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×5600×10^6×3 = 1075.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 5600, "channels": 3, "gbps": 1075.2}, "prompt_sha1": "c639e235c2d8063d7bd1f17cca5088fd068af52a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 7` on one shared integer without synchronization. Assume `jobs` initially equals 216. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 216; T2 reads 216; both compute 223; T1 writes 223; T2 writes 223. The observed final value is 223, but two serial increments would produce 230.\n\n```\nlock(mutex)\njobs = jobs + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "7eabf8dbb830fb7bab4ad77d6f6815e0d5a0f54f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 17.1 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 17.1-2.9 = 14.2 V.\nI = V/R = 14.2/560 A = 25.3571 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 17.1, "vf": 2.9, "r": 560, "current_a": 0.02535714285714286}, "prompt_sha1": "1d0127afffdda26f51c2a4dea6af9992445612f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 128-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/128 = 32.\nOffset bits = log2(128) = 7.\nIndex bits = log2(32) = 5.\nTag bits = 36-5-7 = 24.\nCheck: 24+5+7 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 128, "addr_bits": 36, "lines": 32, "offset_bits": 7, "index_bits": 5, "tag_bits": 24}, "prompt_sha1": "9a4f2613ee7817b96f8a6e2dd52d8be1945268b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-24 = 552 bytes.\nRound down to an 8-byte multiple: floor((552)/8)×8 = 552 bytes.\nFragments required = ceil(6000/552) = 11.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 24, "payload": 6000, "max_payload": 552, "fragments": 11}, "prompt_sha1": "1aeffe65d30920252b98d814791adb853f9b325e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 18-bit up/down counter `updown_18_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_18_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [17:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 18'd262143) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_18_sat", "width": 18, "wrap": false}, "prompt_sha1": "61d3fe33706ffacb1196d5f2e79f6b864d14c40a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 15-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^15 V = 0.000137329101562 V = 137.329102 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 15, "vref": 4.5, "step": 0.0001373291015625}, "prompt_sha1": "e2bec41eaaffe56efec3e4ef49a94a3da739ef65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 87.9% hit rate, and a 140 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.879 = 0.121.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.121×140 ns = 20.9400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.879, "penalty": 140, "result": 20.939999999999998}, "prompt_sha1": "0f98b2027c3eebe26146949e881d0daffac88f8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×1024 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 1024, "reach": 67108864}, "prompt_sha1": "c54dc6503b8a139a542e4592f078c2b97c697a1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.5 V source drives a 8200 ohm resistor in series with an LED whose forward voltage is assumed to be 1.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.5-1.7 = 14.8 V.\nI = V/R = 14.8/8200 A = 1.8049 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.5, "vf": 1.7, "r": 8200, "current_a": 0.0018048780487804879}, "prompt_sha1": "84e932c0addd72660ef936ae78839d8a94ae5dc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE6F6B5F408 in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E6 F6 B5 F4 08.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 991981597704, "endian": "big", "bytes": [230, 246, 181, 244, 8]}, "prompt_sha1": "1627dbf5fc3b54ba1f15628e5e48eaa837e3fdf9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 3200 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×3200×10^6×1 = 102.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 3200, "channels": 1, "gbps": 102.4}, "prompt_sha1": "2ae615b27cbdab484cf814eb0725fd805379902a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.75 ns hit time, 95.5% hit rate, and a 100 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.955 = 0.045.\nAMAT = hit time + miss rate × miss penalty\n= 3.75 ns + 0.045×100 ns = 8.2500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.75, "hit_rate": 0.955, "penalty": 100, "result": 8.250000000000004}, "prompt_sha1": "fb7993d8b3c33e0cd6f778a0cb68e6202bce8dcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 2700 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×2700)/(470+2700) = 400.315457 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 2700, "req": 400.3154574132492}, "prompt_sha1": "f3e3e2503a9b598482a94ee5de3ad8c1e755e038", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_33_msb` for `33-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_33_msb (\n input logic [32:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 33; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_33_msb", "width": 33, "priority": "high"}, "prompt_sha1": "73e1822b0d6868995d315a9f4f8c2b990ab8e1da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 109 and initial occupancy is 77. In an abstract batch, producer attempts to enqueue 36 items first, dropping any excess beyond capacity; then consumer removes up to 172 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=109, dropped=4; consumed=109; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 109, "start": 77, "prod": 36, "cons": 172, "dropped": 4, "consumed": 109, "final": 0}, "prompt_sha1": "95d6db0ce1a0fb4973122383fa0b350764d30b9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [13, 17, 15, 10, 17, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [71, 85, 77, 64, 87, 98].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [13, 17, 15, 10, 17, 26], "finish": [71, 85, 77, 64, 87, 98]}, "prompt_sha1": "268299cef9603fe21cca0d06c79312c3865a2448", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1600 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1600/(1600+36) = 0.977995 = 97.80%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1600, "overhead": 36, "efficiency": 0.9779951100244498}, "prompt_sha1": "db33a081f648b77edefee928735856cd43297201", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xA683D922. Extract the 3-bit field starting at bit 23 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0xA683D922 >> 23) & 0x7 = 0x5 (5).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 23, "value": 2793658658, "mask": 7, "field": 5}, "prompt_sha1": "aa35709efa9c722094caa01875b60a2cbfd7f3af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xC1, set bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 1)`. Result = 0xC3.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 193, "bit": 1, "op": "set", "result": 195}, "prompt_sha1": "d8aa4dfd72868f4b946364d0a8a67832f4718705", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×560)/(47+560) = 43.360791 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 560, "req": 43.360790774299836}, "prompt_sha1": "8afaed4a8aab507d93b06963332f80b42e5679cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 31-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^31/2^11 = 2^20 = 1048576 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 31, "page_exp": 11, "entries": 1048576}, "prompt_sha1": "a18ec4c5f17e24272f679bdb0db1ed22172ebb7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×1024 KiB = 196608 KiB = 201326592 bytes = 192.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 1024, "reach": 201326592}, "prompt_sha1": "4752b919d52a336d2811174899b96a99540dd3a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_2962` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_2962 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_2962"}, "prompt_sha1": "4d154f916ee3475bd0080b036949d67e821b3ff4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 55 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 55 = 57.\nClock pulses = 57×9 = 513.\nTime = 513/100000 s = 5130.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 55, "clocks": 513, "time_s": 0.00513}, "prompt_sha1": "4fd28b482f0492e0c3dae5e40f20f5f0b35acb96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_23` for a synchronous sampled input `noisy`. Update output `clean` only after observing 23 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_23 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 22) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_23", "stable_samples": 23}, "prompt_sha1": "ebfed351b62f624954467897de1e23b28f22ada2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 1 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×1/(2.4×10^9) = 0.0833333333 s = 83.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 1.0, "ghz": 2.4, "sec": 0.08333333333333333}, "prompt_sha1": "c2fae2ee9669940e5562782babb907eee733fde8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 57 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 57 = 59.\nClock pulses = 59×9 = 531.\nTime = 531/100000 s = 5310.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 57, "clocks": 531, "time_s": 0.00531}, "prompt_sha1": "6ac071f87986f7bcfdb72d049623fa81c324fcd8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_959189` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_959189 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_959189"}, "prompt_sha1": "6104473fcb8eff49c271bc4224b035227daa6154", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w10_unsigned` comparing two 10-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w10_unsigned (\n input logic [9:0] a,\n input logic [9:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w10_unsigned", "width": 10, "signed": false}, "prompt_sha1": "56f4ef6a0315d0ac29e892056b7f2525058de012", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×2.5²=0.00146875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 2.5, "energy": 0.00146875}, "prompt_sha1": "ae6e12b63a0e2a9cd077c55a16b983cb1e3c78d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 64-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/64 = 32.\nOffset bits = log2(64) = 6.\nIndex bits = log2(32) = 5.\nTag bits = 36-5-6 = 25.\nCheck: 25+5+6 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 64, "addr_bits": 36, "lines": 32, "offset_bits": 6, "index_bits": 5, "tag_bits": 25}, "prompt_sha1": "a6688385f3abe6bd9c83deec398cb63a5ff43e43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×256 KiB = 6144 KiB = 6291456 bytes = 6.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 256, "reach": 6291456}, "prompt_sha1": "7d05220b59ee23cec50fe75aba2457436b5f8826", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_67` for a synchronous sampled input `noisy`. Update output `clean` only after observing 67 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_67 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 66) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_67", "stable_samples": 67}, "prompt_sha1": "6ca9e5347ed94dc5082a660340d9fa981ff7290f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.5 ns hit time, 90.4% hit rate, and a 20 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.904 = 0.096.\nAMAT = hit time + miss rate × miss penalty\n= 3.5 ns + 0.096×20 ns = 5.4200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.5, "hit_rate": 0.904, "penalty": 20, "result": 5.42}, "prompt_sha1": "43d9244c09b08fbadbb86058ef938511002d72ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w58_signed` comparing two 58-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w58_signed (\n input logic signed [57:0] a,\n input logic signed [57:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w58_signed", "width": 58, "signed": true}, "prompt_sha1": "2c426a044cfedacbe5652e84d19d4670476e047a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 252155690, carries 15443 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 15443+1+1 = 15445. ACK = (252155690+15445) mod 2^32 = 252171135.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 252155690, "payload": 15443, "syn": 1, "fin": 1, "ack": 252171135}, "prompt_sha1": "2de3cbfbe859319ad1721b88398ca6d41e057ce3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 301, and period is 5022 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(301×5022) = 42.338627 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 301, "period": 5022, "hz": 42.338626984788526}, "prompt_sha1": "7a525630c4e22a71d25e8f2f01271910bb321182", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65476; x = x + 65;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65476+65 = 65541. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65541) mod 2^16 = 5. So `x` stores 5. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65476, "add": 65, "result": 5}, "prompt_sha1": "73ea93e0cb290c0899e557e696d6a797e795ce16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 500 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 500×10^6×80/1000/8 = 5000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "rtt_ms": 80, "bytes": 5000000.0}, "prompt_sha1": "6eabb869f47d6fbc35872654313fbc006549908b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 128-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/128 = 512.\nOffset bits = log2(128) = 7.\nIndex bits = log2(512) = 9.\nTag bits = 40-9-7 = 24.\nCheck: 24+9+7 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 128, "addr_bits": 40, "lines": 512, "offset_bits": 7, "index_bits": 9, "tag_bits": 24}, "prompt_sha1": "5893401058683fd7359436ab729e2f6c708ee8af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 101001001101000 using generator polynomial bits 111011111. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 10100011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 479, "msg_bits": 15, "msg": 21096, "remainder": 163}, "prompt_sha1": "f880a4461c437adb31aecbfe541e922fa2066c59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.95. Using Amdahl's law, compute the theoretical speedup on 12 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.95) + 0.95/12) = 7.741935.\nThe theoretical speedup is about 7.742×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.95, "n": 12, "result": 7.741935483870965}, "prompt_sha1": "eb4f23697bee7e49c60f014eb9f60e5890d59e71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_933197` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_933197 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_933197"}, "prompt_sha1": "07ae4f3a3dced484f68d168f888b5af3452c18f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'V', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "V", "P", "P", "P", "P", "P", "P", "P", "P", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "6d9624e33117e86bce8eee8d94877c7b011d106a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_517066` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_517066 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_517066"}, "prompt_sha1": "8caebb41cba3eb9577a926e25c69ca40d1bb859a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 8 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 2260 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×2260/(8×10^6) = 0.002825 = 0.282500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 8, "irq_hz": 10, "cycles": 2260, "load": 0.002825}, "prompt_sha1": "c210ad898b13c0257e2f996e07a4a8270e26d78b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x2A7F, toggle bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 8)`. Result = 0x2B7F.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 10879, "bit": 8, "op": "toggle", "result": 11135}, "prompt_sha1": "59456f59cdd45cb1e958d87c5f7f8fd03bd4b142", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_50` for a synchronous sampled input `noisy`. Update output `clean` only after observing 50 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_50 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 49) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_50", "stable_samples": 50}, "prompt_sha1": "ef8c3178e4e53ef26d7b978f50b2b94fef0e559c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_2058` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_2058 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_2058", "width": 16}, "prompt_sha1": "1237d09a600e505ab6a9a3e6c5832fcf522c5781", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 12 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 12 MHz / 128 = 0.093750 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 12000000.0, "divider": 128, "spi_hz": 93750.0}, "prompt_sha1": "6888c7c1db6288cbce42caf2a417d43521bf17a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 55-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^55/2^10 = 2^45 = 35184372088832 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 55, "page_exp": 10, "entries": 35184372088832}, "prompt_sha1": "2c45dd7d441a647debaf896be9b3ac998c26540c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w16_6099` implementing a dual-clock asynchronous FIFO with depth 32 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w16_6099 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 16,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w16_6099", "depth": 32, "width": 16, "ptr_w": 5}, "prompt_sha1": "a6791cfc79667d7483d3e215eb4288085df13291", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×180)/(150+180) = 81.818182 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 180, "req": 81.81818181818181}, "prompt_sha1": "e8e9fa3f318419287dacdd86ad0e05ad99b34b79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 56 bits wide and the system uses 64 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 65536 bytes = 2^16 bytes.\nOffset bits = 16.\nVPN bits = 56-16 = 40.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 56, "page_bytes": 65536, "offset_bits": 16, "vpn_bits": 40}, "prompt_sha1": "6c03ba39bf0a63345b4f679d83509665417f6bc2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x55C4ACA, toggle bit 49 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 49)`. Result = 0x20000055C4ACA.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 89934538, "bit": 49, "op": "toggle", "result": 562950043355850}, "prompt_sha1": "1cf40f9938d5395cea27f78b581387021cffe3a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 640.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+24 = 664.5. Period = 664.5/8000000 = 8.30625e-05 s. Maximum rate = 1/period = 12039.127163 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 640.5, "conv_cycles": 24, "period": 8.30625e-05, "rate": 12039.127163280662}, "prompt_sha1": "cf8124e0937b28130de1feeba7361a5f4ba24039", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 864 elements. Review loop `for i in range(864+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(864+1)` includes index 864, which is out of range for a length-864 sequence. Correct loop: `for i in range(864):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 864, "variant": "one_past"}, "prompt_sha1": "8af28bbcd214667e40b13b4d86aafdb59b05d7ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×20/1000/8 = 50000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 20, "bytes": 50000.0}, "prompt_sha1": "019fbaa3557eab71efeea113a5308ac8d82f6acf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 50 and initial occupancy is 36. In an abstract batch, producer attempts to enqueue 97 items first, dropping any excess beyond capacity; then consumer removes up to 152 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=50, dropped=83; consumed=50; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 50, "start": 36, "prod": 97, "cons": 152, "dropped": 83, "consumed": 50, "final": 0}, "prompt_sha1": "c7df6bd75d3a5fb5c888ad8d7d9e4f0b1d6529cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 20/1000 = 5e+08 bits = 6.25e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 20, "bits": 500000000.0, "bytes": 62500000.0}, "prompt_sha1": "fd9085531e7089f8484602ba8337c4ce626d7ba0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 9 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 41 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+1 = 11. Total bits = 41×11 = 451. Time = 451/57600 = 0.00782986111 s = 7.829861 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 9, "parity": 0, "stop": 1, "frames": 41, "seconds": 0.00782986111111111}, "prompt_sha1": "543b7437ea2b0a4882710685f76358c2a1f05568", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^17 V = 1.90734863281e-05 V = 19.073486 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 2.5, "step": 1.9073486328125e-05}, "prompt_sha1": "6d73bc4b919695092e5c958171f7af16eb5bb3ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 896 payload bytes plus 38 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 896/(896+38) = 0.959315 = 95.93%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 896, "overhead": 38, "efficiency": 0.9593147751605996}, "prompt_sha1": "8bdc4e42b4e2c7be56b40d224f9568004bceda15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 37 elements. Review loop `for i in range(37+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(37+1)` includes index 37, which is out of range for a length-37 sequence. Correct loop: `for i in range(37):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 37, "variant": "one_past"}, "prompt_sha1": "ba368ca058bbd76595606c190b15acca997cb47e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 51 bits wide and the system uses 512 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 524288 bytes = 2^19 bytes.\nOffset bits = 19.\nVPN bits = 51-19 = 32.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 51, "page_bytes": 524288, "offset_bits": 19, "vpn_bits": 32}, "prompt_sha1": "9c8ffb42c86c6eb60081e09b1763017f036e0277", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_8_msb` for `8-bit in`. The highest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_8_msb (\n input logic [7:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 8; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_8_msb", "width": 8, "priority": "high"}, "prompt_sha1": "33e9e1f8e7647cad09d54c829a57e7ff4f5f367e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Give exact timer prescaler and reload register values for a 1000 Hz interrupt, but the timer input clock and register conventions are not specified.", "output": "Exact register values cannot be determined without the timer input clock and the device's prescaler/reload conventions. Those must be supplied before solving f_update = f_timer/(prescaler×period_counts).", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "79c5a92cd94bbc13952b1e048839e5b6b794fc3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 12 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 57600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 12000000/(4×57600) = 52.083333.\nNearest integer divisor D = 52.\nActual baud = 12000000/(4×52) = 57692.308 baud.\nError = (57692.308-57600)/57600×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 12000000, "oversample": 4, "baud": 57600, "divisor": 52, "actual": 57692.307692307695, "error_pct": 0.1602564102564151}, "prompt_sha1": "482c1a2291170cb4dc628b3ffec6d4a8e4fef5a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x428EDBE4. Extract the 8-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x428EDBE4 >> 3) & 0xFF = 0x7C (124).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 3, "value": 1116658660, "mask": 255, "field": 124}, "prompt_sha1": "500c1c2febd21b26f87ebfd7e954418a91e497eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-24 = 3976 bytes.\nRound down to an 8-byte multiple: floor((3976)/8)×8 = 3976 bytes.\nFragments required = ceil(6000/3976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 24, "payload": 6000, "max_payload": 3976, "fragments": 2}, "prompt_sha1": "56fa1b54d7cbd52b830a4e95906508ae126535df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w24_nocin` implementing a 24-bit unsigned adder with inputs `a`, `b` and outputs `24-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w24_nocin (\n input logic [23:0] a,\n input logic [23:0] b,\n output logic [23:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w24_nocin", "width": 24, "cin": false}, "prompt_sha1": "1ed998553e1fce5e3a1edb79ed85d7d79b2c1b25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 79.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+16 = 95.5. Period = 95.5/12000000 = 7.95833333e-06 s. Maximum rate = 1/period = 125654.450262 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 79.5, "conv_cycles": 16, "period": 7.958333333333333e-06, "rate": 125654.4502617801}, "prompt_sha1": "b1d24caae5651b8125d8c9e86da49eed77f0747b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 48 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 48 MHz / 64 = 0.750000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 48000000.0, "divider": 64, "spi_hz": 750000.0}, "prompt_sha1": "0424b85afe087ae79b4cfe004b950b55512ae215", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_3222` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_3222 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_3222"}, "prompt_sha1": "2b1e1f79d7c2e4b3efb253d48a7bf018b72c2f88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_31` generating a one-clock-cycle `tick` every 31 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_31 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 30) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_31", "divide": 31}, "prompt_sha1": "5ae409522eaa60fafdfef7bf09edecd1231a6d85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=47000 ohm, C=2200 nF and is stepped to 1.8 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1.8(1-e^-2)=1.556396 V; τ=0.1034 s and t=0.2068 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 47000, "c": 2.2e-06, "multiple": 2, "vin": 1.8, "vc": 1.5563964901740972}, "prompt_sha1": "f68c096fe79eb4178090d6eaf2ad830eff466765", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w8_6948` implementing a dual-clock asynchronous FIFO with depth 32 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w8_6948 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 8,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w8_6948", "depth": 32, "width": 8, "ptr_w": 5}, "prompt_sha1": "a01f46a8f191895e18a9b1535eb671cf40f9eb25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×82)/(68+82) = 37.173333 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 82, "req": 37.17333333333333}, "prompt_sha1": "6d0d7031e8ce95215636d79518ddaf8d1474f4eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_175` generating a one-clock-cycle `tick` every 175 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_175 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 174) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_175", "divide": 175}, "prompt_sha1": "1386a8e96c424bd14bee382b8766c434b3b26b36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 33-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^33/2^12 = 2^21 = 2097152 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 33, "page_exp": 12, "entries": 2097152}, "prompt_sha1": "ffd5b275313d8999f79ea94de35254d8ff16dd1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2500 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2500×10^6×0.5/1000/8 = 156250.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "rtt_ms": 0.5, "bytes": 156250.0}, "prompt_sha1": "4156bb70adc2df86dac15f1e51031aeea95f7691", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=27000 ohm and C=150000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=27000×150000×10^-12 s = 0.00405 s.\nf_c=1/(2πRC)=1/(2π×27000×150000×10^-12) = 39.2975 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 27000, "c_f": 1.5e-07, "tau": 0.00405, "fc": 39.29751681281367}, "prompt_sha1": "3809d40a277aef5e8a6ba85dfab827f2e3b2a843", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_4603` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_4603 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_4603", "width": 4}, "prompt_sha1": "91eb2da39d65af5ade3994d4d84ab96c808667a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 25-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^25/2^14 = 2^11 = 2048 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 25, "page_exp": 14, "entries": 2048}, "prompt_sha1": "5c7e47aded9d2cc7abe98885f0747b55c79663ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3.3 V reference and returns code 306. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 306/1023 × 3.3 V = 0.987097 V.\nThus the estimated input is about 0.9871 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.3, "code": 306, "volts": 0.9870967741935484}, "prompt_sha1": "fbc14820296bdd648919209e241d6ee4fc2607c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10 Mbit/s and RTT 8 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10×10^6 × 8/1000 = 80000 bits = 10000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10, "rtt_ms": 8, "bits": 80000.0, "bytes": 10000.0}, "prompt_sha1": "463614be585961cd01c01584fd7809aafadea63e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 14 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 14 = 17.\nClock pulses = 17×9 = 153.\nTime = 153/100000 s = 1530.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 14, "clocks": 153, "time_s": 0.00153}, "prompt_sha1": "cc71ab7c3dedb24dea2374f619d6ec9930eceba2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w32_signed` comparing two 32-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w32_signed (\n input logic signed [31:0] a,\n input logic signed [31:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w32_signed", "width": 32, "signed": true}, "prompt_sha1": "d2880fde7d2a62b8173c0ab98a616f0cce5d5f2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/10 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 10, "tau": 0.001}, "prompt_sha1": "3cb7c8b2843df65c6bd300a05205580715067d1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock RX then D; T2 acquires D then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds RX while waiting for D, while T2 holds D while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire D before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "d1e8b9140fa24909c0d56a059fa87722e0d03428", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5995` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5995 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5995"}, "prompt_sha1": "6c68c60c481c27734700fa38b4f45d4f02cc875d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 18-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^18 V = 2.28881835938e-05 V = 22.888184 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 18, "vref": 6.0, "step": 2.288818359375e-05}, "prompt_sha1": "d76bbeecab33e8d927192a2b3c1ba1c604979009", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3939` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3939 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3939"}, "prompt_sha1": "af34a8f19bc921088d82e43ee93efa50d05cd833", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_655759` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_655759 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_655759"}, "prompt_sha1": "680c3a24b695c22a4db3c5bc9dbe23cea989b9dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 129 elements. Review loop `for i in range(129+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(129+1)` includes index 129, which is out of range for a length-129 sequence. Correct loop: `for i in range(129):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 129, "variant": "one_past"}, "prompt_sha1": "fcf7a2eeba77ef8b2394cb4d5c19ae8e1a4bf8ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 365, and period is 7167 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(365×7167) = 24.465253 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 365, "period": 7167, "hz": 24.465252651517325}, "prompt_sha1": "7f8b5c321c47fc5776d6f3ddc8f70c029e1a675f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 110001011010 using generator polynomial bits 11110011. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1111011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 243, "msg_bits": 12, "msg": 3162, "remainder": 123}, "prompt_sha1": "3128953ee1a56d1c1f7e30ab6a5c84a498bc8697", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 92.2% hit rate, and a 170 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.922 = 0.078.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.078×170 ns = 15.2600 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.922, "penalty": 170, "result": 15.259999999999993}, "prompt_sha1": "fba1b86a99669ec0653a293fcc33c159bb86226b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=10 nF and is stepped to 12 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=12(1-e^-3)=11.402555 V; τ=0.001 s and t=0.003 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 1e-08, "multiple": 3, "vin": 12, "vc": 11.402555179585633}, "prompt_sha1": "9edc06c2f74b5899ef1a607c2a14e97f3fdaa4ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 7` on one shared integer without synchronization. Assume `counter` initially equals 392. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 392; T2 reads 392; both compute 399; T1 writes 399; T2 writes 399. The observed final value is 399, but two serial increments would produce 406.\n\n```\nlock(mutex)\ncounter = counter + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "713b39b53d55c14ae58abd9ee74ede33ef161345", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3101` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3101 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3101"}, "prompt_sha1": "ad043a9d28a993b130f2301fb6a3fe997a292ce8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 16000 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 16000 = 4000. Verification: 4000/16000 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 16000, "duty": 25, "high": 4000}, "prompt_sha1": "571aa2fa735ef8defaf8878ada9230d045ffbde4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=20 ms, C=4 ms,T=20 ms, C=4 ms,T=25 ms, C=4 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/20 + 4/20 + 4/25 + 4/200 = 0.630000 = 63.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 20], [4, 20], [4, 25], [4, 200]], "utilization": 0.63}, "prompt_sha1": "86d6f5e46ffb339ada7a7a57eb8bd4d7a373060e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=15000 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=15000×12000×10^-12 s = 0.00018 s.\nf_c=1/(2πRC)=1/(2π×15000×12000×10^-12) = 884.1941 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 15000, "c_f": 1.2e-08, "tau": 0.00018, "fc": 884.1941282883075}, "prompt_sha1": "bf8a5a56ffc3f6032299d9626b3619f234d409d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_13` for a 13-bit unsigned input `data`, `4-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_13 (\n input logic [12:0] data,\n input logic [3:0] shamt,\n output logic [12:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_13", "width": 13, "direction": "right", "arithmetic": false}, "prompt_sha1": "86605aa5bbb0dfa0d1a82d7407ea033cf6fbe681", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×128 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 128, "reach": 67108864}, "prompt_sha1": "37e0f202528b202a8a52400423b10a625f3d7c56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-40 = 1360 bytes.\nRound down to an 8-byte multiple: floor((1360)/8)×8 = 1360 bytes.\nFragments required = ceil(3000/1360) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 40, "payload": 3000, "max_payload": 1360, "fragments": 3}, "prompt_sha1": "d04be6411b890503c805d15bc9e502a120e18c1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 38 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 38×8 = 304. Time = 304/19200 = 0.0158333333 s = 15.833333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 5, "parity": 1, "stop": 1, "frames": 38, "seconds": 0.015833333333333335}, "prompt_sha1": "1ab5dafdf08af2ea29e25601fdefa10395990cbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3961 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "eedd329f11d4c0e4ab488f2d97befe8aa6885a4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.4 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.4-2.6 = 12.8 V.\nI = V/R = 12.8/680 A = 18.8235 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.4, "vf": 2.6, "r": 680, "current_a": 0.018823529411764708}, "prompt_sha1": "20329452720e6ff02f9a71601f5a4c1cbb82a5e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 000010010100100100001100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 7 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "000010010100100100001100", "ones": 7, "parity": 1}, "prompt_sha1": "89fa64643bfab191298e941329ade02669369011", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_8887` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_8887 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_8887", "width": 32}, "prompt_sha1": "d2d721017ad43eae45c816af8d43cd968e5bd618", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xC1AC21FA, toggle bit 18 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 18)`. Result = 0xC1A821FA.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 3249283578, "bit": 18, "op": "toggle", "result": 3249021434}, "prompt_sha1": "111f740fcb0527546c296afc178b9738235fa076", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['P', 'V', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["P", "V", "P", "P", "V"], "value": 2, "blocked": 0}, "prompt_sha1": "1430dcc83b0a0bc1395ccc1b92c012e902402a1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1260(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1260(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1260([1, 2]) == 1.5\nassert mean_1260([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1260"}, "prompt_sha1": "f056683a320f1c274d95307dfb5244e3275fabcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 16 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×10×10^6 = 160000000 B/s. Time = 256/160000000 = 1.6e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 16, "rate_mhz": 10, "sec": 1.6e-06}, "prompt_sha1": "8e4ffc1c8c9b8245fe88bed6007f81761a71b009", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 33-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^33/2^11 = 2^22 = 4194304 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 33, "page_exp": 11, "entries": 4194304}, "prompt_sha1": "3b155f084509e693306600d4f2babbfd18c344b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 250 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 250/1000 = 5e+08 bits = 6.25e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 250, "bits": 500000000.0, "bytes": 62500000.0}, "prompt_sha1": "cfd2d5ad8b664b98245cbb1ef782978bf4a8cf00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_47_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 47 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_47_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd47;\n end else begin\n if (pulse_in)\n count <= 6'd47;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_47_retrig", "cycles": 47, "retrigger": true}, "prompt_sha1": "d6c459cbf19f4846cb33f2cf05f97f0368ae2648", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m2093` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 2093 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m2093 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd2093;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m2093", "width": 13, "max": 2093}, "prompt_sha1": "82b09c405f0ab600bc7d0c262caaebc56ecbebe9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_787853` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_787853 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_787853"}, "prompt_sha1": "e8175c09753d6dd5ff47c37a40b79d221d4d4ec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×12000)/(100+12000) = 99.173554 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 12000, "req": 99.17355371900827}, "prompt_sha1": "54a0155c644e4b658fafbfcb11320fd0f2bab4ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/22=0.545454545 A. P=V²/R=12²/22=6.54545455 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 22, "i": 0.5454545454545454, "p": 6.545454545454546}, "prompt_sha1": "c3b681569eb7e3b6c8312ad1d08e50481fa71a42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×150/1000/8 = 93750.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 150, "bytes": 93750.0}, "prompt_sha1": "dcdd662ddd2400421767211e50069efb5480216b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 500 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 500×10^6×2/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "rtt_ms": 2, "bytes": 125000.0}, "prompt_sha1": "b13c19cb6574f3f1dbb09e435e91d316d27f1916", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_59_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 59 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_59_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd59;\n end else begin\n if (pulse_in)\n count <= 6'd59;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_59_retrig", "cycles": 59, "retrigger": true}, "prompt_sha1": "d9b512e5834596ad7b72464ccaf43277a0339dde", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNNTNTTNTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T; 2->T on N; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1], "final_state": 3}, "prompt_sha1": "770c7f807ecec31baf70a97b38b0d68de15a3868", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xBE, set bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 5)`. Result = 0xBE.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 190, "bit": 5, "op": "set", "result": 190}, "prompt_sha1": "1662040dadaab7459a9791fd8b8fd4bc01c14ff3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w8_3866` implementing a dual-clock asynchronous FIFO with depth 8 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w8_3866 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 8,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w8_3866", "depth": 8, "width": 8, "ptr_w": 3}, "prompt_sha1": "fb8a4d32d7b74dae97c4400ab862d8f5720b0940", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 40000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 40000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 40000}, "prompt_sha1": "16c5b637f23f9e772340df45c6051bca59c423bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 5600 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×5600×10^6×4 = 112.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 5600, "channels": 4, "gbps": 112.0}, "prompt_sha1": "463311f1436bd3c305903a3c809cdc9cbcc19901", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.69. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.69) + 0.69/10) = 2.638522.\nThe theoretical speedup is about 2.639×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.69, "n": 10, "result": 2.6385224274406327}, "prompt_sha1": "b3bf9e4cd0052dc7c7dc124531aac47407296085", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 888, and period is 47010 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(888×47010) = 0.287460 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 888, "period": 47010, "hz": 0.2874604023295791}, "prompt_sha1": "cdba6054883b9e90cd870245189684975be411f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.5 ns hit time, 94.3% hit rate, and a 145 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.943 = 0.057.\nAMAT = hit time + miss rate × miss penalty\n= 2.5 ns + 0.057×145 ns = 10.7650 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.5, "hit_rate": 0.943, "penalty": 145, "result": 10.765000000000008}, "prompt_sha1": "c47c41eb9e3351374ba1fb474ee77642ca0a4253", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6921(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6921(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6921([1, 2]) == 1.5\nassert mean_6921([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6921"}, "prompt_sha1": "41d71fab1ccbe618854bde339ce1e504e0c23681", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x03, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x03<<1)|1 = 0x07 = 00000111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 3, "rw": 1, "byte": 7}, "prompt_sha1": "a01b920ebac819cfd76da863dd265176ca4a8592", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6330(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6330(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6330([1, 2]) == 1.5\nassert mean_6330([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6330"}, "prompt_sha1": "9e90c0f94b4b7a927934ad0cd8e239370a9789d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w9_m392` with clk, asynchronous active-low rst_n, active-high enable, and output logic [8:0] count. On reset count=0. When enabled it increments until 392 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w9_m392 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [8:0] count\n);\n localparam logic [8:0] LIMIT = 9'd392;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w9_m392", "width": 9, "max": 392}, "prompt_sha1": "3b0bb075c99062cc86f8ab172d34604db7899109", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTNNTTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 0, 0, 1, 1, 0, 1, 1], "final_state": 3}, "prompt_sha1": "fdc54c5b0690b5c4be0f3e386fa68ea1f79f4723", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 807 elements. Review loop `for i in range(807-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(807-1)` produces indices 0 through 805, so index 806 is skipped. Correct loop: `for i in range(807):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 807, "variant": "miss_last"}, "prompt_sha1": "69d3de7828d20aae824720c3247a555f426b6443", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 902, and period is 31576 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(902×31576) = 0.280884 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 902, "period": 31576, "hz": 0.28088356982793633}, "prompt_sha1": "fa6e8d81271052fbd1cb17670cbf0a571c9e8319", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 701 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×701/(200×10^6) = 0.00017525 = 0.017525%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 50, "cycles": 701, "load": 0.00017525}, "prompt_sha1": "7255176d4b5caca64ac8eec33760cba776f9e294", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 4 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×1×10^6 = 4000000 B/s. Time = 262144/4000000 = 0.065536 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 4, "rate_mhz": 1, "sec": 0.065536}, "prompt_sha1": "9ad788f71bc3cb90aaffae176fcbb957f57e83e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_3610` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_3610 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_3610", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "4872097cc809cefd8e39a326835478a79b7c660f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7256-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7256×8 = 58048 bits.\nSerialization delay = bits/rate = 58048/(10000×10^6) s = 5.8048e-06 s = 5.804800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7256, "rate_mbps": 10000, "delay_s": 5.8048e-06}, "prompt_sha1": "3f4421cdc7ae30bfce2fd7b0162000c06d476b6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 800 MHz CPU services an interrupt at 100 Hz. Each ISR consumes 26 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 100×26/(800×10^6) = 3.25e-06 = 0.000325%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 800, "irq_hz": 100, "cycles": 26, "load": 3.25e-06}, "prompt_sha1": "71ce76506f95db5c4fc10bde62b0b8a61eee3e3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 3` on one shared integer without synchronization. Assume `packets` initially equals 325. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 325; T2 reads 325; both compute 328; T1 writes 328; T2 writes 328. The observed final value is 328, but two serial increments would produce 331.\n\n```\nlock(mutex)\npackets = packets + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "07940422e0155d9d261dc9a649e2df93b9ea8c17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(20×10^6) s = 25.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 512, "time_us": 25.599999999999998}, "prompt_sha1": "b67e5515b928c2cbfa0f118e00fef10b679584d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 120 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 120/1000 = 2.4e+09 bits = 3e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 120, "bits": 2400000000.0, "bytes": 300000000.0}, "prompt_sha1": "323bb380ba9b8dd0f2507a9fea0b453645323416", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 39 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 39 = 42.\nClock pulses = 42×9 = 378.\nTime = 378/1000000 s = 378.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 39, "clocks": 378, "time_s": 0.000378}, "prompt_sha1": "5a2a8bf41cec245eac1a40b9ee5329d674d74fc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×1200)/(1000+1200) = 545.454545 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 1200, "req": 545.4545454545454}, "prompt_sha1": "0b126211abcda6e671be89e898ef394b03a578d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_746060` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_746060 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_746060"}, "prompt_sha1": "215f9b75abe8c8d816747fea89842362611bf578", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 00001000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 1 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00001000", "ones": 1, "parity": 1}, "prompt_sha1": "8f026fdc00247f7dfc70b14ffe8d627ddf972739", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/100=0.48 A. P=V²/R=48²/100=23.04 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 100, "i": 0.48, "p": 23.04}, "prompt_sha1": "76ca081b87f8cd06445135d7759e715b3105b6a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 10 and initial occupancy is 8. In an abstract batch, producer attempts to enqueue 151 items first, dropping any excess beyond capacity; then consumer removes up to 16 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=10, dropped=149; consumed=10; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 10, "start": 8, "prod": 151, "cons": 16, "dropped": 149, "consumed": 10, "final": 0}, "prompt_sha1": "1597154d7c307c49867d2c95603852e5f63d2191", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 2 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×8×10^6 = 16000000 B/s. Time = 512/16000000 = 3.2e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 2, "rate_mhz": 8, "sec": 3.2e-05}, "prompt_sha1": "caaa7dad18b188f903968e6d6560505d99b26a8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 41-bit up/down counter `updown_41_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_41_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [40:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_41_wrap", "width": 41, "wrap": true}, "prompt_sha1": "19456584cc2bcbf414180e890c3eba5f17815281", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×8 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 8, "reach": 16777216}, "prompt_sha1": "726307636be6dae4c4badb94a97190b62652cdd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_46_lsb` for `46-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_46_lsb (\n input logic [45:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 45; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_46_lsb", "width": 46, "priority": "low"}, "prompt_sha1": "d5e4596864c58e258ce8112ff4e88d912521781d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x0E7FD2CC. Extract the 8-bit field starting at bit 15 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0xE7FD2CC >> 15) & 0xFF = 0xFF (255).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 15, "value": 243258060, "mask": 255, "field": 255}, "prompt_sha1": "7d9bb5fe06c841b2608da08e970b830e6325cfab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/1000 = 2.2e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 1000, "tau": 2.2e-06}, "prompt_sha1": "39841e88fbd492764e51cd4b7da7162e95d385bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=1 nF and is stepped to 12 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=12(1-e^-2)=10.375977 V; τ=2.2e-06 s and t=4.4e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 1e-09, "multiple": 2, "vin": 12, "vc": 10.375976601160648}, "prompt_sha1": "df6fb50a69dcacc3ef88cc5b893954d4fb70ff20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x48, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x48<<1)|0 = 0x90 = 10010000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 72, "rw": 0, "byte": 144}, "prompt_sha1": "48e87ec9c86ddf056bd299700b8bb39d8305523f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 64 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 64 = 66.\nClock pulses = 66×9 = 594.\nTime = 594/1000000 s = 594.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 64, "clocks": 594, "time_s": 0.000594}, "prompt_sha1": "17ba179dda3865c44286168401e09abc13793e93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(16×10^6) s = 1.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 16, "time_us": 1.0}, "prompt_sha1": "cc413c9f6e36d102c8022dab641045986874b96e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 12.1 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 12.1-2.2 = 9.9 V.\nI = V/R = 9.9/680 A = 14.5588 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 12.1, "vf": 2.2, "r": 680, "current_a": 0.014558823529411763}, "prompt_sha1": "226323207bce57af1d8faaa97b2cbca6644da7bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock STATE then TX; consumer acquires TX then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds STATE while waiting for TX, while consumer holds TX while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire STATE before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "c9744d4a0165e025d1e98898b78d089bd08bd04d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_118` for a synchronous sampled input `noisy`. Update output `clean` only after observing 118 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_118 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 117) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_118", "stable_samples": 118}, "prompt_sha1": "c52d1053799413a4338012dc95868cd59df59a68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1100 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 1100 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 1100.0}, "prompt_sha1": "e54c564b1d772d7ce04ec4f1cf35bc2f0afbb6ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/10 = 0.1 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 10, "tau": 0.1}, "prompt_sha1": "51d11f63e6a1a4ebe55c29a2766e603e8cd944c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5255(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5255(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5255([1, 2]) == 1.5\nassert mean_5255([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5255"}, "prompt_sha1": "6b58dd966432b48de5ab65aef926d9a2022f2683", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 921600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(8×921600) = 19.531250.\nNearest integer divisor D = 20.\nActual baud = 144000000/(8×20) = 900000.000 baud.\nError = (900000.000-921600)/921600×100% = -2.3438%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 8, "baud": 921600, "divisor": 20, "actual": 900000.0, "error_pct": -2.34375}, "prompt_sha1": "aa515fb8598ece0aaea6adfa70cd3c270d8fab27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 79.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+24 = 103.5. Period = 103.5/10000000 = 1.035e-05 s. Maximum rate = 1/period = 96618.357488 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 79.5, "conv_cycles": 24, "period": 1.035e-05, "rate": 96618.35748792271}, "prompt_sha1": "4c0098298c843596fb20dbec0b0c34653953f96f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=10 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×4.7/(10+4.7) = 1.598639 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 10, "r2": 4.7, "vout": 1.598639455782313}, "prompt_sha1": "662531d8d9550c83e08edde70745ffaabd09398d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 90%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.040×(15+0.100×150) = 2.400000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.96, "l2": 15, "l2_hit": 0.9, "mem": 150, "amat": 2.400000000000001}, "prompt_sha1": "a38cc705e762b4903cde728a6262532e61a2f5a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 70%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.020×(4+0.300×60) = 1.640000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.98, "l2": 4, "l2_hit": 0.7, "mem": 60, "amat": 1.6400000000000003}, "prompt_sha1": "07c676e4b1a669fe83398b43ba6226a9867a0fe6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xBB, set bit 3 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 3)`. Result = 0xBB.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 187, "bit": 3, "op": "set", "result": 187}, "prompt_sha1": "eb0f3576bf3a65e292282b1ff55ee9feedc21b4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 17788 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 17788/100000 s; frequency = 100000/17788 = 5.621767 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 17788, "hz": 5.621767483696875}, "prompt_sha1": "4beca0a1d228fc32bed366739ed8f9d90a43757a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 2400 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×2400×10^6×8 = 19.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 2400, "channels": 8, "gbps": 19.2}, "prompt_sha1": "06b868b1844fcbf312503327566a6cfc7fa35b10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 7` on one shared integer without synchronization. Assume `requests` initially equals 385. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 385; T2 reads 385; both compute 392; T1 writes 392; T2 writes 392. The observed final value is 392, but two serial increments would produce 399.\n\n```\nlock(mutex)\nrequests = requests + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "21796fb90ea89feb70980639bd2aa62d8469ca07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 717 elements. Review loop `for i in range(717+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(717+1)` includes index 717, which is out of range for a length-717 sequence. Correct loop: `for i in range(717):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 717, "variant": "one_past"}, "prompt_sha1": "82e89b7678c21f74b771666f65d0da69a0829b9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_172900` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_172900 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_172900"}, "prompt_sha1": "d2bbdf28d0cf82fedb8623828b0cadfae43f9558", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 160.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+10 = 170.5. Period = 170.5/32000000 = 5.328125e-06 s. Maximum rate = 1/period = 187683.284457 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 160.5, "conv_cycles": 10, "period": 5.328125e-06, "rate": 187683.284457478}, "prompt_sha1": "902ec7d64c4de146514ccd5c0ee064a41ccd8a56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (9000×8) = 34722.222222 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 9000, "pps": 34722.22222222222}, "prompt_sha1": "ddb3ccd78f6dba2be67ee82b812175a5ce4f7f2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=100 ms, C=1 ms,T=25 ms, C=2 ms,T=40 ms, C=2 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/100 + 1/25 + 2/40 + 2/10 = 0.300000 = 30.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 100], [1, 25], [2, 40], [2, 10]], "utilization": 0.3}, "prompt_sha1": "47cb23109fe21b5d0aa67fbaa0031fecfd2a1221", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 7-bit left-shift register module `shiftreg_left_7`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `7-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_7 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [6:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[5:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_7", "width": 7, "direction": "left"}, "prompt_sha1": "e950d28532aaf91df015bbf2f812cf3160679c0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w21_cin` implementing a 21-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `21-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w21_cin (\n input logic [20:0] a,\n input logic [20:0] b,\n input logic cin,\n output logic [20:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w21_cin", "width": 21, "cin": true}, "prompt_sha1": "56f3cacf2673b5d138e7c124245cc024be080ba3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-28 = 1220 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 28, "mss": 1220}, "prompt_sha1": "43f1140804cccac020ace6c7963e728b71b34c5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "c0d1b31d7b4a63e6cb2b2ae5a01ba5ea1075b245", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "e7f507a9a329c7eb998c6f4b29fc4670fb8438615e6c692c6f890c48b1838046", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 518, "original_row_sha256": "46ea5f217dee11ee41eb04dd5b6361828dd48be5186dfe07b4af002afed07e6c", "version": "v1.0.0-rc1"}}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 20 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 20 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 20}, "prompt_sha1": "40897f85e83c4d75d25c573c24c7b2c9b1e944ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w34_cin` implementing a 34-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `34-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w34_cin (\n input logic [33:0] a,\n input logic [33:0] b,\n input logic cin,\n output logic [33:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w34_cin", "width": 34, "cin": true}, "prompt_sha1": "29d8d6028f3d93e89be61458306afdc2d3d2a1b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.44. Using Amdahl's law, compute the theoretical speedup on 48 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.44) + 0.44/48) = 1.756955.\nThe theoretical speedup is about 1.757×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.44, "n": 48, "result": 1.7569546120058563}, "prompt_sha1": "4654776ea64ff5f627c4d57574f1c92ed2d6a126", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_40` for a 40-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_40 (\n input logic [39:0] data,\n input logic [5:0] shamt,\n output logic [39:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_40", "width": 40, "direction": "left", "arithmetic": false}, "prompt_sha1": "921753469b03b8625d3b9a7842523cab65aab7cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 88.0% hit rate, and a 40 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.880 = 0.120.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.120×40 ns = 6.8000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.88, "penalty": 40, "result": 6.8}, "prompt_sha1": "0c8e0c5725f58899b84a2f2f8de3c300dce1ebcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.4 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.4-2 = 1.4 V.\nI = V/R = 1.4/2700 A = 0.5185 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.4, "vf": 2.0, "r": 2700, "current_a": 0.0005185185185185185}, "prompt_sha1": "3a947c52c7cfd93160727cba4a73d52391ba3f51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4952` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4952 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4952"}, "prompt_sha1": "f88c90a287655408317f3f4d2efb248856d51630", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_69_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 69 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_69_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd69;\n end else begin\n if (pulse_in)\n count <= 7'd69;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_69_retrig", "cycles": 69, "retrigger": true}, "prompt_sha1": "58549549b7bfa37e546adca54bd20e567d6212ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/680=0.00294117647 A. P=V²/R=2²/680=0.00588235294 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 680, "i": 0.0029411764705882353, "p": 0.0058823529411764705}, "prompt_sha1": "d79efcc1923871e9538fdc3bcb20486c864c7504", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_211` generating a one-clock-cycle `tick` every 211 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_211 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 210) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_211", "divide": 211}, "prompt_sha1": "ee4c58879a04268aed49069e40bebd9ffd5b1654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 5 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 11 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+2 = 8. Total bits = 11×8 = 88. Time = 88/4800 = 0.0183333333 s = 18.333333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 5, "parity": 0, "stop": 2, "frames": 11, "seconds": 0.018333333333333333}, "prompt_sha1": "6eab272218f70dcbdce9348acba23862f9e17585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1561(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1561(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1561([1, 2]) == 1.5\nassert mean_1561([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1561"}, "prompt_sha1": "13a1d87d49a7c1764daac3a6ade6ff48bf0c609f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0101000000110000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0101000000110000", "ones": 4, "parity": 0}, "prompt_sha1": "97e62a838388d5625d70610ec1eeed65544bb4c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xEFF68BDF. Extract the 8-bit field starting at bit 12 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0xEFF68BDF >> 12) & 0xFF = 0x68 (104).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 12, "value": 4025912287, "mask": 255, "field": 104}, "prompt_sha1": "91f2ce41a016fd14c944ed7546d7d0eec1e72e58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "V", "V", "V", "V"], "value": 8, "blocked": 0}, "prompt_sha1": "537b23f0c887a1a724e1cfdec49fc0f9d2a043bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.7 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.7-3.4 = 5.3 V.\nI = V/R = 5.3/330 A = 16.0606 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.7, "vf": 3.4, "r": 330, "current_a": 0.016060606060606056}, "prompt_sha1": "ddad4e0b42b5ee7eb695d7e8481874871d300786", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×9²=0.019035 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 9, "energy": 0.019035}, "prompt_sha1": "79680cdca8565304c61aa1267a07a34859ab5686", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_5417` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_5417 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_5417", "width": 16}, "prompt_sha1": "5159e3e63518ca835b7980d446df76fff2a66d2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 198 and tail index 231, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (198-231) mod 256 = 223. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 198, "tail": 231, "occupancy": 223}, "prompt_sha1": "749fdd73bdb6f0054d2e92d9053059fa53a29711", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [11, 3, 6, 1]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [21, 10, 16, 7].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [11, 3, 6, 1], "finish": [21, 10, 16, 7]}, "prompt_sha1": "9f09632815c285c6cc218eab3cf533b9c4f782eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6856-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6856×8 = 54848 bits.\nSerialization delay = bits/rate = 54848/(25000×10^6) s = 2.19392e-06 s = 2.193920 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6856, "rate_mbps": 25000, "delay_s": 2.19392e-06}, "prompt_sha1": "2328a2d0428d071a3305bda49e12c22f08be5979", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 74 and initial occupancy is 65. In an abstract batch, producer attempts to enqueue 18 items first, dropping any excess beyond capacity; then consumer removes up to 155 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=74, dropped=9; consumed=74; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 74, "start": 65, "prod": 18, "cons": 155, "dropped": 9, "consumed": 74, "final": 0}, "prompt_sha1": "45060d496a5648c082aa36e7ebad243670149e83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/100 = 0.0022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 100, "tau": 0.0022}, "prompt_sha1": "2ec4e6bd37a0e580128d93839a565d4fa7cb7890", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `len` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n result += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `samples[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n result += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "407e9835955af490271718599ba0dfb7eb23a59c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "V", "P", "V", "P", "V", "P", "V", "V", "V", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "3bdaaebe68d59345af1279e15bddd361e8adadf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 12521 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 12521/2000000 s; frequency = 2000000/12521 = 159.731651 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 12521, "hz": 159.7316508266113}, "prompt_sha1": "51cd8686f73768c00d941400a143dcc6c2258c3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^13 V = 0.00040283203125 V = 402.832031 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 3.3, "step": 0.00040283203125}, "prompt_sha1": "5fb6cc078577970b663bec7f1e55ecfccd49fca3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_4891` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_4891 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_4891"}, "prompt_sha1": "8f8d8157d520ee2fc478bcf48b69add6e8fefa77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_11_14_20` with RED, GREEN, YELLOW states. Hold RED for 11 clock cycles, GREEN for 14, and YELLOW for 20; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_11_14_20 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 10) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 13) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 19) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_11_14_20", "red": 11, "green": 14, "yellow": 20}, "prompt_sha1": "b9c92fbcc20d8e7079f4073d203ff55dfd34906f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_5931` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_5931 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_5931"}, "prompt_sha1": "f464006c55905391c03128d089d2b32d354d3e97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2884(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2884(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2884([1, 2]) == 1.5\nassert mean_2884([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2884"}, "prompt_sha1": "b8f63103269697cf7b89c906cc0e2e067fe5b2dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 59 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 59-20 = 39.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 59, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 39}, "prompt_sha1": "3c06e17e2cb6c766bf0d4a4ac7a191d0d29499fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 10 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×10/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 10, "bytes": 125000.0}, "prompt_sha1": "3a3f4f52a993bac110ade58bd3a5045e67f45d20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2400 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 2400 = 1680. Verification: 1680/2400 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2400, "duty": 70, "high": 1680}, "prompt_sha1": "8f9ad6d3cee4256122438a698020668a52263143", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 48 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 128000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 48000000/(8×128000) = 46.875000.\nNearest integer divisor D = 47.\nActual baud = 48000000/(8×47) = 127659.574 baud.\nError = (127659.574-128000)/128000×100% = -0.2660%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 48000000, "oversample": 8, "baud": 128000, "divisor": 47, "actual": 127659.5744680851, "error_pct": -0.26595744680851113}, "prompt_sha1": "e37b16e0bda875dcc114dbdbb4e56ec3d00499cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 16 KiB cache with 128-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "2139ceb7753b6904fe33fcdb5ad36785cd2ec73a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_64` for a 64-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_64 (\n input logic [63:0] data,\n input logic [5:0] shamt,\n output logic [63:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_64", "width": 64, "direction": "left", "arithmetic": false}, "prompt_sha1": "bc20d280f2687946559442807c6d92f56b1771da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×16 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 16, "reach": 33554432}, "prompt_sha1": "ea0de7927c4766de9e3b5bc0abb39d6f7984ad6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 96 payload bytes plus 72 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 96/(96+72) = 0.571429 = 57.14%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 96, "overhead": 72, "efficiency": 0.5714285714285714}, "prompt_sha1": "33df9ca822fff6f50381b5d5eb44863997e60039", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_9729` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_9729 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_9729", "width": 3}, "prompt_sha1": "f209d9bfa575c9e8450d7a281654d5001a591a72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 920874423, carries 54500 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 54500+1+1 = 54502. ACK = (920874423+54502) mod 2^32 = 920928925.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 920874423, "payload": 54500, "syn": 1, "fin": 1, "ack": 920928925}, "prompt_sha1": "5a486ab8e6f077ddce395c46792420c4b282213b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 2 = 0.024000.\nEffective CPI = 1.1 + 0.024000 = 1.124000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.08, "penalty": 2, "result": 1.124}, "prompt_sha1": "77814268e164f83cbd0a5b4dc435331555a8b6cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2676(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2676(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2676([1, 2]) == 1.5\nassert mean_2676([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2676"}, "prompt_sha1": "3bd7550047b1d082035a60ae218e6fe2b4435564", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 60 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 65536. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 60000000/50 = 1200000.\nWith prescaler divisor limited to at most 65536, the largest divisor of 1200000 that also keeps the period count within 16 bits is 60000.\nPeriod count = 1200000/60000 = 20.\nPSC register = 60000-1 = 59999.\nARR register = 20-1 = 19.\nVerification: 60000000/(60000×20) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 60000000, "target_hz": 50, "total_division": 1200000, "max_prescaler": 65536, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 60000, "period": 20, "psc_reg": 59999, "arr_reg": 19}, "prompt_sha1": "bb2205ba1ac0a725523fdadc15694405c9453424", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 30 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 30/1000 = 6e+06 bits = 750000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 30, "bits": 6000000.0, "bytes": 750000.0}, "prompt_sha1": "ce5a43fb9e0f64494cc8841382c1e83e339a3555", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967127; x = x + 306;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967127+306 = 4294967433. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967433) mod 2^32 = 137. So `x` stores 137. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967127, "add": 306, "result": 137}, "prompt_sha1": "430e79c4fd6f01b57f0ff08a1b7070c8408ec313", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_30_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 30 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_30_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd30;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_30_ignore", "cycles": 30, "retrigger": false}, "prompt_sha1": "8c7bf486d16c7a5c1a47742be8eec2016a581808", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.76. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.76) + 0.76/2) = 1.612903.\nThe theoretical speedup is about 1.613×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.76, "n": 2, "result": 1.6129032258064517}, "prompt_sha1": "960b49eb369f97464d676da37e05abade84df7a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m1121` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 1121 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m1121 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd1121;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m1121", "width": 12, "max": 1121}, "prompt_sha1": "7a7dd1b6b3f5afacbf1f582845d45d5741c4347b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 20%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.200 × 12 = 0.480000.\nEffective CPI = 1.2 + 0.480000 = 1.680000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.2, "penalty": 12, "result": 1.6800000000000002}, "prompt_sha1": "415cf5836f2fadbf3d12f5a45acd6daa44ef67cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w8_7516` implementing a dual-clock asynchronous FIFO with depth 32 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w8_7516 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 8,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w8_7516", "depth": 32, "width": 8, "ptr_w": 5}, "prompt_sha1": "982ee0466640d93368ef0cd23001ec8109fb5980", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=200 ms, C=1 ms,T=50 ms, C=2 ms,T=50 ms, C=2 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/200 + 1/50 + 2/50 + 2/50 = 0.125000 = 12.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 200], [1, 50], [2, 50], [2, 50]], "utilization": 0.125}, "prompt_sha1": "988eb12a860f4640a9ea3c22d6c931a64e70b18d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_3381` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_3381 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_3381", "width": 5}, "prompt_sha1": "63316ee09d2527b3f07c63a16e328bce179fba89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3880 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "02a1de65c88b486649c56a14e5f5d98a55173cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 4 MHz. Sampling consumes 19.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+10 = 29.5. Period = 29.5/4000000 = 7.375e-06 s. Maximum rate = 1/period = 135593.220339 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 4000000.0, "sample_cycles": 19.5, "conv_cycles": 10, "period": 7.375e-06, "rate": 135593.22033898305}, "prompt_sha1": "c6fb1e4033320a1c561cfab5b863ed2ffeb965d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967286; x = x + 393;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967286+393 = 4294967679. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967679) mod 2^32 = 383. So `x` stores 383. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967286, "add": 393, "result": 383}, "prompt_sha1": "62b9de9c8bbe6fa306b53ef59eb8a7dd511e6f05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['P', 'V', 'P', 'P', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["P", "V", "P", "P", "P", "V", "P", "V"], "value": 0, "blocked": 0}, "prompt_sha1": "cdb631c21ccbc18f0d27a6f772ff412e47530a15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.179.249.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.179.249.0\nBroadcast address: 10.179.249.255\nUsable host range: 10.179.249.1 to 10.179.249.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.179.249.0/24", "usable": 254, "first": "10.179.249.1", "last": "10.179.249.254", "broadcast": "10.179.249.255"}, "prompt_sha1": "79235871c714ec103a7174bc6dd92a4b9725935d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_21_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 21 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_21_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd21;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_21_ignore", "cycles": 21, "retrigger": false}, "prompt_sha1": "7578785e44410fd712219ff8fa8f72632b843042", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_2112` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_2112 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_2112", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "09902caa926f04ef21cc69efee6a18a3549b8bd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 16087 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 16087/2000000 s; frequency = 2000000/16087 = 124.323988 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 16087, "hz": 124.3239883135451}, "prompt_sha1": "81bf810477c9479f71c0fdcc2aa6c0caeeff25a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_263421` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_263421 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_263421"}, "prompt_sha1": "ba7893d7dcf479fde113c52fc9ea3f2516b031ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_20` for a synchronous sampled input `noisy`. Update output `clean` only after observing 20 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_20 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 19) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_20", "stable_samples": 20}, "prompt_sha1": "dd645019dc1edd3630ee50d206842923f1f781df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 13 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 13×9 = 117. Time = 117/4800 = 0.024375 s = 24.375000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 6, "parity": 1, "stop": 1, "frames": 13, "seconds": 0.024375}, "prompt_sha1": "57d3a352553a06e8d978d84fe37e365917521018", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 32 payload bytes plus 10 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 32/(32+10) = 0.761905 = 76.19%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 32, "overhead": 10, "efficiency": 0.7619047619047619}, "prompt_sha1": "31b621352c256c31e6c8552958622e8b27f778f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 92%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.040×(3+0.080×60) = 1.312000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.96, "l2": 3, "l2_hit": 0.92, "mem": 60, "amat": 1.3120000000000003}, "prompt_sha1": "781d602e2948e076cf0e84558db2b4bfa1c71642", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 10 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-05×5²=0.000125 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-06, "v": 5, "energy": 0.000125}, "prompt_sha1": "d3c6dd99f172d2492deaa90379b6c98bc701b643", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 6-bit up/down counter `updown_6_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_6_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [5:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 6'd63) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_6_sat", "width": 6, "wrap": false}, "prompt_sha1": "7d3ca4e402fe7372642986f98199514fb91bbb6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 16000 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-40-24 = 15936 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 40, "tcphdr": 24, "mss": 15936}, "prompt_sha1": "b628f4a070e6615bb8069654dea08c032be7e38b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 240 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 240 MHz / 16 = 15.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 240000000.0, "divider": 16, "spi_hz": 15000000.0}, "prompt_sha1": "fa8e178fe317a5a919c7a8d12445c2d2bff48fb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w30_unsigned` comparing two 30-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w30_unsigned (\n input logic [29:0] a,\n input logic [29:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w30_unsigned", "width": 30, "signed": false}, "prompt_sha1": "3031d3f76f60c4df20d9db39ded376e20ee6d6bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 8 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 8/1000 = 2e+06 bits = 250000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 8, "bits": 2000000.0, "bytes": 250000.0}, "prompt_sha1": "a13cd5b9044355eff89f77b7895fbab84fd55794", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5261-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5261×8 = 42088 bits.\nSerialization delay = bits/rate = 42088/(5000×10^6) s = 8.4176e-06 s = 8.417600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5261, "rate_mbps": 5000, "delay_s": 8.4176e-06}, "prompt_sha1": "17875a06932b9025d50cce0207c034580952c7b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 1.5 on a 3.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×1.5/(3.2×10^9) = 0.09375 s = 93.750000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 1.5, "ghz": 3.2, "sec": 0.09375}, "prompt_sha1": "d03f8960aaf8af3160063ebe3ebc902729f10292", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 95%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.030×(15+0.050×60) = 1.340000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.97, "l2": 15, "l2_hit": 0.95, "mem": 60, "amat": 1.3400000000000007}, "prompt_sha1": "f6795c116eb68e90f46b713121c8e4eda8716bb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 3 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 3×8 = 24. Time = 24/921600 = 2.60416667e-05 s = 0.026042 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 6, "parity": 0, "stop": 1, "frames": 3, "seconds": 2.604166666666667e-05}, "prompt_sha1": "bbca2fa4838fc1ff438b5ee37b3f181fdf5ba297", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w3_unsigned` comparing two 3-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w3_unsigned (\n input logic [2:0] a,\n input logic [2:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w3_unsigned", "width": 3, "signed": false}, "prompt_sha1": "590862df791e1cd51b03b3323fe125332d6be7e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-20 = 980 bytes.\nRound down to an 8-byte multiple: floor((980)/8)×8 = 976 bytes.\nFragments required = ceil(2000/976) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 20, "payload": 2000, "max_payload": 976, "fragments": 3}, "prompt_sha1": "d6068b525c62f0882b9ecf96d7b7eadfa9289c3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 23 and tail index 61, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (23-61) mod 64 = 26. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 23, "tail": 61, "occupancy": 26}, "prompt_sha1": "db327c4989ab46c3b9fd53bffad7041124753f95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/47 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 47, "tau": 0.01}, "prompt_sha1": "409506cd17135d6ebef1be61f2882685cd3d0d1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (4096×8) = 610.351562 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 4096, "pps": 610.3515625}, "prompt_sha1": "5da344f32c08f01ed5cd65b5bb034dec2b393e88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=4.7 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/10 = -0.470000.\nVout = A_v×Vin = -0.470000×0.25 = -0.117500 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 4.7, "vin": 0.25, "gain": -0.47000000000000003, "vout": -0.11750000000000001}, "prompt_sha1": "c70d25ddc0ac47d7a4b3af7839e7717a17893e43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w57_cin` implementing a 57-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `57-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w57_cin (\n input logic [56:0] a,\n input logic [56:0] b,\n input logic cin,\n output logic [56:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w57_cin", "width": 57, "cin": true}, "prompt_sha1": "5ec98367ca9baf5382d1187b4fc1adb7d2f23816", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(2000/968) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 2000, "max_payload": 968, "fragments": 3}, "prompt_sha1": "9fc9140896c3b7938cdd0b00805e9e812cd279d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [1, 28, 8, 7, 5]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 49, 28, 29, 24].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [1, 28, 8, 7, 5], "finish": [1, 49, 28, 29, 24]}, "prompt_sha1": "6b7e1c9f58e516a7af0b2713058ce074035cea41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 61-bit up/down counter `updown_61_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_61_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [60:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 61'd2305843009213693951) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_61_sat", "width": 61, "wrap": false}, "prompt_sha1": "75365d67b1e2e4cc7c6690b1835e1e143ba96c1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 26-bit up/down counter `updown_26_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_26_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [25:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_26_wrap", "width": 26, "wrap": true}, "prompt_sha1": "a8889cb4f53cfcccbd9718a1932a23260f95e44e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(4×10^6) s = 512.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 2048, "time_us": 512.0}, "prompt_sha1": "625342b68c1108aef5014c8743a6b61acdd093f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 25% of instructions, the branch misprediction rate is 5%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.050 × 8 = 0.100000.\nEffective CPI = 1.1 + 0.100000 = 1.200000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.25, "mispred": 0.05, "penalty": 8, "result": 1.2000000000000002}, "prompt_sha1": "2ea340dab3b99eee9fc95a8c9c2de6a748210d91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x8174, set bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 8)`. Result = 0x8174.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 33140, "bit": 8, "op": "set", "result": 33140}, "prompt_sha1": "917c58d83ca0d354183df1a69069aa7493623e8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w14_m4667` with clk, asynchronous active-low rst_n, active-high enable, and output logic [13:0] count. On reset count=0. When enabled it increments until 4667 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w14_m4667 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [13:0] count\n);\n localparam logic [13:0] LIMIT = 14'd4667;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w14_m4667", "width": 14, "max": 4667}, "prompt_sha1": "bcee005f16553b4924583560d20f59341cfe98aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 41-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^41/2^20 = 2^21 = 2097152 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 41, "page_exp": 20, "entries": 2097152}, "prompt_sha1": "8b67da1f7e0d6b0adb635f037b97fb07e972783d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_1743` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_1743 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_1743"}, "prompt_sha1": "911a2c24dbba91f9bef775eb40a4fd53c779486a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w32_2252` implementing a dual-clock asynchronous FIFO with depth 32 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w32_2252 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 32,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w32_2252", "depth": 32, "width": 32, "ptr_w": 5}, "prompt_sha1": "844681f35a75e9af7b20ce5642ad8e6db8b71dbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (256×8) = 4882812.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 256, "pps": 4882812.5}, "prompt_sha1": "1395b365880679d96597c6af914c9298a2f6cf08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 256-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/256 = 32.\nOffset bits = log2(256) = 8.\nIndex bits = log2(32) = 5.\nTag bits = 36-5-8 = 23.\nCheck: 23+5+8 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 256, "addr_bits": 36, "lines": 32, "offset_bits": 8, "index_bits": 5, "tag_bits": 23}, "prompt_sha1": "523f311254922299605e2399e7cfc79c825f5659", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.74. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.74) + 0.74/2) = 1.587302.\nThe theoretical speedup is about 1.587×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.74, "n": 2, "result": 1.5873015873015872}, "prompt_sha1": "383f4095b5721f0ca181c45094872fe2c049f17b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 800000 Hz satisfies it.", "output": "Nyquist minimum is 2×100000 = 200000 Hz. Proposed rate 800000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100000, "min_fs": 200000, "proposed": 800000}, "prompt_sha1": "dfa6b4181fdbe438ca4b8887942c9007c68e5926", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 2299 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×2299/(72×10^6) = 0.000319305556 = 0.031931%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 10, "cycles": 2299, "load": 0.00031930555555555553}, "prompt_sha1": "3dc7e47ded315892d2e6dcfe70af727c5c761e9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(20×10^6) s = 102.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 2048, "time_us": 102.39999999999999}, "prompt_sha1": "38ef22260a9168f484505697c911248c268c2790", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2879(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2879(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2879([1, 2]) == 1.5\nassert mean_2879([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2879"}, "prompt_sha1": "8e7c764bdf8d0887ccb11b263e675619d1e93c50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7419` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7419 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7419"}, "prompt_sha1": "64abe19a496ac83cd205ca37f3be45ae7faa40bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_28_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 28 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_28_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd28;\n end else begin\n if (pulse_in)\n count <= 5'd28;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_28_retrig", "cycles": 28, "retrigger": true}, "prompt_sha1": "af99ff621c3401d760029e45980b7cc6b20d8c3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 44 and initial occupancy is 39. In an abstract batch, producer attempts to enqueue 99 items first, dropping any excess beyond capacity; then consumer removes up to 21 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=44, dropped=94; consumed=21; final occupancy=23.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 44, "start": 39, "prod": 99, "cons": 21, "dropped": 94, "consumed": 21, "final": 23}, "prompt_sha1": "b53f3ada92dad6d8c17db2d937035ab3fe623e7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 8 and tail index 14, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (8-14) mod 32 = 26. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 8, "tail": 14, "occupancy": 26}, "prompt_sha1": "25354f12b19ff1e46d29273353cb3229160793fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x05, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x05<<1)|1 = 0x0B = 00001011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 5, "rw": 1, "byte": 11}, "prompt_sha1": "b3b3b476a7fc4c8c0ae20d8163aa9161f5df09d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 640.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+20 = 660.5. Period = 660.5/64000000 = 1.03203125e-05 s. Maximum rate = 1/period = 96896.290689 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 640.5, "conv_cycles": 20, "period": 1.03203125e-05, "rate": 96896.29068887208}, "prompt_sha1": "9a5099ada34c13cdf43e05eb61486e43b0a31c05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x16_no_bypass` with 4 entries of 16 bits. Inputs: `clk`, `we`, `2-bit waddr`, `16-bit wdata`, `2-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [15:0] wdata,\n input logic [1:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x16_no_bypass", "entries": 4, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "9eaf5177bcd8f761780b789e26b6be648ab4b679", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 500 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 500×10^6 × 150/1000 = 7.5e+07 bits = 9.375e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 500, "rtt_ms": 150, "bits": 75000000.0, "bytes": 9375000.0}, "prompt_sha1": "0092ebb99d3d49e035c0e9e0f90fb99ffbdaaa1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 95%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(8+0.050×40) = 1.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 8, "l2_hit": 0.95, "mem": 40, "amat": 1.2000000000000002}, "prompt_sha1": "8e6f0fece80b9aa6f94d431ee0fdfbd2abc739b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 1612. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 1612/65535 × 5 V = 0.122988 V.\nThus the estimated input is about 0.1230 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 1612, "volts": 0.12298771648737315}, "prompt_sha1": "2ef6b78ebece1d5ee1d2103d881f1f840b302992", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x691D, clear bit 12 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 12)`. Result = 0x691D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 26909, "bit": 12, "op": "clear", "result": 26909}, "prompt_sha1": "22eba683b53ec5dc13fa662330cccc5330b9bcbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 768 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 768/(768+48) = 0.941176 = 94.12%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 768, "overhead": 48, "efficiency": 0.9411764705882353}, "prompt_sha1": "1e11dec199437d31bb8b8e61caad0dd52fa391c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_345006` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_345006 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_345006"}, "prompt_sha1": "75f36a5405e09d98b80cc4171c9624b99e43ce99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 40 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 40000000/500 = 80000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 80000 that also keeps the period count within 16 bits is 20000.\nPeriod count = 80000/20000 = 4.\nPSC register = 20000-1 = 19999.\nARR register = 4-1 = 3.\nVerification: 40000000/(20000×4) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 40000000, "target_hz": 500, "total_division": 80000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 20000, "period": 4, "psc_reg": 19999, "arr_reg": 3}, "prompt_sha1": "a046dcec71c4ef51d4fce673562df47bcb3ab983", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5471` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5471 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5471"}, "prompt_sha1": "8b8a37737f2af86bad98f771a610cdb8ed1a4658", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 131 and tail index 99, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (131-99) mod 512 = 32. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 131, "tail": 99, "occupancy": 32}, "prompt_sha1": "fc543464dac55050131ccec245b20e3095f8350e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 33 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 33-18 = 15.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 33, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 15}, "prompt_sha1": "0587f2b9f49cec15557286dda6a964b538a77c55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 12-bit up/down counter `updown_12_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_12_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [11:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_12_wrap", "width": 12, "wrap": true}, "prompt_sha1": "6e345212ae99991be9b928fa510b4bf9f3b65330", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_7677` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_7677 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_7677"}, "prompt_sha1": "cd0fef1f6d72ffecc5c48076831579ee207e68de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x05. Extract the 4-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x5 >> 1) & 0xF = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 1, "value": 5, "mask": 15, "field": 2}, "prompt_sha1": "ab6aee3c0be12415d81b7047fd49b8d242d15636", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_1902` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_1902 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_1902", "width": 24}, "prompt_sha1": "a9df49c9d852de8666e326638c884f1e442a823c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01110001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01110001", "ones": 4, "parity": 0}, "prompt_sha1": "938749401cd884d08f0c5ee22e673d571c33e21d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 5600 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×5600×10^6×8 = 537.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 5600, "channels": 8, "gbps": 537.6}, "prompt_sha1": "3d996c81d7749a8e24d8e937308c1c1df775dd2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_8835` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_8835 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_8835", "width": 5}, "prompt_sha1": "2fc3164e2bd0fa3eee370bfd233c7a983a46fbf9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 95.9% hit rate, and a 125 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.959 = 0.041.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.041×125 ns = 6.8750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.959, "penalty": 125, "result": 6.875000000000004}, "prompt_sha1": "f8a4828bf246d9131d7180481d5698897cf676ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 162 and tail index 66, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (162-66) mod 256 = 96. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 162, "tail": 66, "occupancy": 96}, "prompt_sha1": "1743f661c1a6e2a60e671a549338a5bfd24d4a55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(8×28800) = 625.000000.\nNearest integer divisor D = 625.\nActual baud = 144000000/(8×625) = 28800.000 baud.\nError = (28800.000-28800)/28800×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 8, "baud": 28800, "divisor": 625, "actual": 28800.0, "error_pct": 0.0}, "prompt_sha1": "c98132044e5cda4fe5eab9a316ab0dab0ddac58a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x4C781CF5. Extract the 3-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0x4C781CF5 >> 1) & 0x7 = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 1, "value": 1282940149, "mask": 7, "field": 2}, "prompt_sha1": "bcfa7c834883d45c0bcd26c0d63d9fef80ff965e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 500 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 500×10^6×1/1000/8 = 62500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "rtt_ms": 1, "bytes": 62500.0}, "prompt_sha1": "6e36a6acb0968fa787081cc1f67499c43f4eb474", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 8 MHz CPU services an interrupt at 100 Hz. Each ISR consumes 553 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 100×553/(8×10^6) = 0.0069125 = 0.691250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 8, "irq_hz": 100, "cycles": 553, "load": 0.0069125}, "prompt_sha1": "d73dfd4906a95d0b60bd1cfed0c3b507f9455f59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 5 V reference and returns code 1729. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 1729/4095 × 5 V = 2.111111 V.\nThus the estimated input is about 2.1111 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 5.0, "code": 1729, "volts": 2.111111111111111}, "prompt_sha1": "abc193acdc18b45e4e29146d9149ecf75dd39f9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `n` elements of type `float`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n result += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `samples[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n result += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "43ecfa7e2f5ff5c7efbf25b128dbfc5f4e9a8244", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 16-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/32 = 4096.\nSets = 4096/16 = 256.\nOffset bits = log2(32) = 5; index bits = log2(256) = 8; tag bits = 57-5-8 = 44.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 32, "ways": 16, "addr_bits": 57, "lines": 4096, "sets": 256, "offset": 5, "index": 8, "tag": 44}, "prompt_sha1": "199f252bc9721ec372724e3c82736bdf61bd393b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 19.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+10 = 29.5. Period = 29.5/20000000 = 1.475e-06 s. Maximum rate = 1/period = 677966.101695 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 19.5, "conv_cycles": 10, "period": 1.475e-06, "rate": 677966.1016949152}, "prompt_sha1": "0e90f85e2ae3fdb6fff5a9ea86bb6de23761610a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (1500×8) = 833333.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 1500, "pps": 833333.3333333334}, "prompt_sha1": "706ca5e93d00fc63631b6e058cceb2b52cc34987", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x65. Extract the 4-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x65 >> 4) & 0xF = 0x6 (6).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 4, "value": 101, "mask": 15, "field": 6}, "prompt_sha1": "9de6dc1b5b18ee6a8331e2307c37d5d30a8fc1b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_476635` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_476635 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_476635"}, "prompt_sha1": "bbadbbef02cc36119e078565c09ca400f3c60a82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 910 elements. Review loop `for i in range(910+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(910+1)` includes index 910, which is out of range for a length-910 sequence. Correct loop: `for i in range(910):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 910, "variant": "one_past"}, "prompt_sha1": "0cafa0a66ae0da2d6051ad9b70df1e8e141dad33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_47` for a 47-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_47 (\n input logic [46:0] data,\n input logic [5:0] shamt,\n output logic [46:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_47", "width": 47, "direction": "right", "arithmetic": false}, "prompt_sha1": "eb5a2b39cf2de2d9ee2167d17544d0713415319e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=50 ms, C=3 ms,T=40 ms, C=3 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/50 + 3/40 + 3/10 = 0.415000 = 41.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 50], [3, 40], [3, 10]], "utilization": 0.415}, "prompt_sha1": "2737632e151957d12fab647e7b33491f6574f75c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m1724` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 1724 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m1724 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd1724;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m1724", "width": 12, "max": 1724}, "prompt_sha1": "a79c1a793e3c3d3981f30581d77233b30514b1e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 16 = 3.750000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 16, "spi_hz": 3750000.0}, "prompt_sha1": "3d121dc57213fab330d1a8542bb4d2c5373bcfb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_193` generating a one-clock-cycle `tick` every 193 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_193 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 192) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_193", "divide": 193}, "prompt_sha1": "09a35f4cacab9881656bf299914c6db65be5c578", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 8-way set-associative cache uses 256-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/256 = 2048.\nSets = 2048/8 = 256.\nOffset bits = log2(256) = 8; index bits = log2(256) = 8; tag bits = 36-8-8 = 20.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 256, "ways": 8, "addr_bits": 36, "lines": 2048, "sets": 256, "offset": 8, "index": 8, "tag": 20}, "prompt_sha1": "54be00eab1cba0122018ae224bd7fa69ca00dc4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 39-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^39/2^21 = 2^18 = 262144 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 39, "page_exp": 21, "entries": 262144}, "prompt_sha1": "10c5de3a90cb1faf09a1319d0ef6d6094919bccf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x12_no_bypass` with 64 entries of 12 bits. Inputs: `clk`, `we`, `6-bit waddr`, `12-bit wdata`, `6-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x12_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [11:0] wdata,\n input logic [5:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x12_no_bypass", "entries": 64, "width": 12, "mode": "no_bypass"}, "prompt_sha1": "79d6e64db382ea25669cf4d5ba9ddcece7985eca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65352; x = x + 558;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65352+558 = 65910. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65910) mod 2^16 = 374. So `x` stores 374. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65352, "add": 558, "result": 374}, "prompt_sha1": "bcc992672b96b2456ae8c7aa909c3d7c4c7a195f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 2 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "P", "P", "P", "P", "P", "P", "P", "P", "V", "V"], "value": 0, "blocked": 2}, "prompt_sha1": "b8564b97a1b81f9e19a007639821d0936d7843bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_40` for a 40-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_40 (\n input logic signed [39:0] data,\n input logic [5:0] shamt,\n output logic signed [39:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_40", "width": 40, "direction": "right", "arithmetic": true}, "prompt_sha1": "ccf155329ca1e40f6b138fdc97e0ec3762870aae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1600 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 1600 = 800. Verification: 800/1600 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1600, "duty": 50, "high": 800}, "prompt_sha1": "b4ad118886c8669680385a30f61b710ac766987e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 3.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+8 = 11.5. Period = 11.5/8000000 = 1.4375e-06 s. Maximum rate = 1/period = 695652.173913 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 3.5, "conv_cycles": 8, "period": 1.4375e-06, "rate": 695652.1739130435}, "prompt_sha1": "c00f1cee3b56242e0eedf409e42c6a1d11ef3afe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 21.8 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 2.5 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 21.8-2.5 = 19.3 V.\nI = V/R = 19.3/5600 A = 3.4464 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 21.8, "vf": 2.5, "r": 5600, "current_a": 0.0034464285714285716}, "prompt_sha1": "efa944ce81e06bdcf4bb25c478be87727af69744", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=4.7 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×4.7/(4.7+4.7) = 2.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 4.7, "r2": 4.7, "vout": 2.5}, "prompt_sha1": "3008f70931d489797a467022fcd90bb2969ac69b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTTTTTNTTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1], "final_state": 2}, "prompt_sha1": "6aa0063e47a0e25b412def0b94cbddc397a2ec97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_16_29_18` with RED, GREEN, YELLOW states. Hold RED for 16 clock cycles, GREEN for 29, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_16_29_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 15) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 28) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_16_29_18", "red": 16, "green": 29, "yellow": 18}, "prompt_sha1": "65eeedac5b4ec6a96f856665e554dce17e160b67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1411364979, carries 55271 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 55271+0+1 = 55272. ACK = (1411364979+55272) mod 2^32 = 1411420251.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1411364979, "payload": 55271, "syn": 0, "fin": 1, "ack": 1411420251}, "prompt_sha1": "e2cbdafa587400e4c54d2bd11b9a0ca5b987832e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x79, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x79<<1)|1 = 0xF3 = 11110011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 121, "rw": 1, "byte": 243}, "prompt_sha1": "6799fc4b03e9ef4c240db47c95d23fea05345ff1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `len` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n result += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `words[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n result += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "a877758c11443f9fc8bbe8fc9571726269ae6305", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=100 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/2.2 = -45.454545.\nVout = A_v×Vin = -45.454545×0.25 = -11.363636 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 100, "vin": 0.25, "gain": -45.45454545454545, "vout": -11.363636363636363}, "prompt_sha1": "ff858e25742d09eb3055bc08680b245ad8437c63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/32 = 128.\nOffset bits = log2(32) = 5.\nIndex bits = log2(128) = 7.\nTag bits = 52-7-5 = 40.\nCheck: 40+7+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 32, "addr_bits": 52, "lines": 128, "offset_bits": 5, "index_bits": 7, "tag_bits": 40}, "prompt_sha1": "29bcd8a8b845bfb567b3ca413bc4ac17769df32d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 37-bit up/down counter `updown_37_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_37_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [36:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_37_wrap", "width": 37, "wrap": true}, "prompt_sha1": "2a130548f652fd9ffee03ae9267d135ca810fcc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×1024 KiB = 1048576 KiB = 1073741824 bytes = 1024.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 1024, "reach": 1073741824}, "prompt_sha1": "b58d5363ef8f98e548a14ab2c4f754f9d6847293", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×2.5²=0.0146875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 2.5, "energy": 0.0146875}, "prompt_sha1": "e9db1e1a103133a2382af64cd5252b5feb2006fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6451-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6451×8 = 51608 bits.\nSerialization delay = bits/rate = 51608/(100×10^6) s = 0.00051608 s = 516.080000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6451, "rate_mbps": 100, "delay_s": 0.00051608}, "prompt_sha1": "c700f69cde6abe231e44db24d1ef8398fd4a5b30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 8587 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 8587/2000000 s; frequency = 2000000/8587 = 232.910213 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 8587, "hz": 232.91021311284499}, "prompt_sha1": "7d9e41704981f9c583ec7a451dffa1fe5854e23a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_51_msb` for `51-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_51_msb (\n input logic [50:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 51; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_51_msb", "width": 51, "priority": "high"}, "prompt_sha1": "3f32022681add8ddcd718c25e96f01bd89145018", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 29-bit up/down counter `updown_29_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_29_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [28:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_29_wrap", "width": 29, "wrap": true}, "prompt_sha1": "60cef3c7542d678c5e1db8bbc80c80ded26f8638", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 97.5% hit rate, and a 130 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.975 = 0.025.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.025×130 ns = 4.7500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.975, "penalty": 130, "result": 4.750000000000003}, "prompt_sha1": "8b5cb34f99fda75df6c9fae08f9fee9c74d0e6ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 46 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 46 = 49.\nClock pulses = 49×9 = 441.\nTime = 441/100000 s = 4410.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 46, "clocks": 441, "time_s": 0.00441}, "prompt_sha1": "8fbcb9c451022b79dd565292c868ec8d2e2cbf0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 12 and initial occupancy is 12. In an abstract batch, producer attempts to enqueue 34 items first, dropping any excess beyond capacity; then consumer removes up to 123 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=12, dropped=34; consumed=12; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 12, "start": 12, "prod": 34, "cons": 123, "dropped": 34, "consumed": 12, "final": 0}, "prompt_sha1": "f1de8c8da71c9ced6685d70b0458c091cd9e2735", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x2DD7F2CEA2AD in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: AD A2 CE F2 D7 2D.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 50405514846893, "endian": "little", "bytes": [173, 162, 206, 242, 215, 45]}, "prompt_sha1": "c3b7b333c2731df0b5c4353410965c1a9fb9c5f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 90%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.020×(20+0.100×150) = 2.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.98, "l2": 20, "l2_hit": 0.9, "mem": 150, "amat": 2.2000000000000006}, "prompt_sha1": "e8e9d2eaf9bc14e5fe2667707cf13940cb4986fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 5 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 5×10^6 × 150/1000 = 750000 bits = 93750 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 5, "rtt_ms": 150, "bits": 750000.0, "bytes": 93750.0}, "prompt_sha1": "59a4406b11d6c45fcf88e99e91a78448895a46e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x32, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x32<<1)|0 = 0x64 = 01100100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 50, "rw": 0, "byte": 100}, "prompt_sha1": "684d3e551e2227f77830fcad7ed33a4e98eac857", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xC59995D2. Extract the 8-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0xC59995D2 >> 3) & 0xFF = 0xBA (186).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 3, "value": 3315176914, "mask": 255, "field": 186}, "prompt_sha1": "3d80e7713560363feafb60480e531e0b7b31b7be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 52-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^52/2^16 = 2^36 = 68719476736 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 52, "page_exp": 16, "entries": 68719476736}, "prompt_sha1": "1e1d31876c7630b7d5d0ed2ba439d0d3683fee31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 256-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/256 = 256.\nOffset bits = log2(256) = 8.\nIndex bits = log2(256) = 8.\nTag bits = 48-8-8 = 32.\nCheck: 32+8+8 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 256, "addr_bits": 48, "lines": 256, "offset_bits": 8, "index_bits": 8, "tag_bits": 32}, "prompt_sha1": "aa14cf1f52c3b7747835ce24c4d7a500ffb72df7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7290` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7290 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7290"}, "prompt_sha1": "09fe4338608264c31cb32a6233613626f8dc66a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 120 elements. Review loop `for i in range(120+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(120+1)` includes index 120, which is out of range for a length-120 sequence. Correct loop: `for i in range(120):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 120, "variant": "one_past"}, "prompt_sha1": "3f6249fa2eaa1584fbc222bb09e6001ade209172", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 70%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.080×(8+0.300×100) = 4.240000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.92, "l2": 8, "l2_hit": 0.7, "mem": 100, "amat": 4.239999999999998}, "prompt_sha1": "e8f725c2ceff7527ee86ef2589f51ae9b888e2e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_64_msb` for `64-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_64_msb (\n input logic [63:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 64; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_64_msb", "width": 64, "priority": "high"}, "prompt_sha1": "a55cbbd2ae52eb5a31f30186f26c4657889b5ff4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1.5 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1.5/(1.2×10^9) = 0.025 s = 25.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.5, "ghz": 1.2, "sec": 0.025}, "prompt_sha1": "646f9f2bd9009f516620030ca17391c2426be9a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 30 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 30 = 32.\nClock pulses = 32×9 = 288.\nTime = 288/100000 s = 2880.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 30, "clocks": 288, "time_s": 0.00288}, "prompt_sha1": "71c27179d6acfd69ac26afd84d240a938e4c32e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×256 KiB = 49152 KiB = 50331648 bytes = 48.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 256, "reach": 50331648}, "prompt_sha1": "71c77d4c2b0be4468d7fd8cac3c16a0b35baa2e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "V", "P", "V", "P", "V", "P", "V", "V", "P", "P", "V", "P", "P"], "value": 6, "blocked": 0}, "prompt_sha1": "61cc7d7bd831dced33f7b15e7256062e15b336c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 128-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/128 = 128.\nOffset bits = log2(128) = 7.\nIndex bits = log2(128) = 7.\nTag bits = 48-7-7 = 34.\nCheck: 34+7+7 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 128, "addr_bits": 48, "lines": 128, "offset_bits": 7, "index_bits": 7, "tag_bits": 34}, "prompt_sha1": "da8e70e743dd697eed0abdb472b3dfcc677cddb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1100 using generator polynomial bits 1011. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 11, "msg_bits": 4, "msg": 12, "remainder": 2}, "prompt_sha1": "e64af93eaf3e498739cb47d06c9f14a4fc96d1bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 00101001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00101001", "ones": 3, "parity": 1}, "prompt_sha1": "0bb6ba526100f4b8051f1d4bd773679b6242f8ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_468595` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_468595 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_468595"}, "prompt_sha1": "0ca313b1718a33b44a51ef888f8e350c2d010dee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-28 = 3972 bytes.\nRound down to an 8-byte multiple: floor((3972)/8)×8 = 3968 bytes.\nFragments required = ceil(5000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 28, "payload": 5000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "1e6d33d716dad6fb23aaefd91007aafb9e4c310e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=680000 ohm and C=100000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=680000×100000×10^-12 s = 0.068 s.\nf_c=1/(2πRC)=1/(2π×680000×100000×10^-12) = 2.3405 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 680000, "c_f": 1e-07, "tau": 0.06799999999999999, "fc": 2.3405138689984613}, "prompt_sha1": "b767347d341356c49a9f697bfe3f87cc52cb95fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 20-bit ADC spanning 0 to 1.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.5/2^20 V = 1.43051147461e-06 V = 1.430511 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 20, "vref": 1.5, "step": 1.430511474609375e-06}, "prompt_sha1": "923c2e09518dfffd58569ee782c78a568d2f1be1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_38` for a synchronous sampled input `noisy`. Update output `clean` only after observing 38 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_38 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 37) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_38", "stable_samples": 38}, "prompt_sha1": "d52f9733265c4bf57c2f74e77211d475659aa719", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_234706` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_234706 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_234706"}, "prompt_sha1": "8ba331913d38f584580937397e3df20987e3ab85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.25 ns hit time, 98.4% hit rate, and a 175 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.984 = 0.016.\nAMAT = hit time + miss rate × miss penalty\n= 3.25 ns + 0.016×175 ns = 6.0500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.25, "hit_rate": 0.984, "penalty": 175, "result": 6.0500000000000025}, "prompt_sha1": "f52388dee222bea786f3e7166ef654c21cfd4aed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['V', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["V", "V", "P", "V", "V", "V", "V", "P", "V"], "value": 12, "blocked": 0}, "prompt_sha1": "c15594eb153ab4d2a9d82c324ace0fc5bb7ab299", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-20 = 1980 bytes.\nRound down to an 8-byte multiple: floor((1980)/8)×8 = 1976 bytes.\nFragments required = ceil(10000/1976) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 20, "payload": 10000, "max_payload": 1976, "fragments": 6}, "prompt_sha1": "31120c2e49bccb4ffdf37ce91decec04491294a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (1500×8) = 416666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 1500, "pps": 416666.6666666667}, "prompt_sha1": "84515e2ac8d2724bc506efeaf2ee23dde115a620", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 876. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 876/1023 × 2.5 V = 2.140762 V.\nThus the estimated input is about 2.1408 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 876, "volts": 2.1407624633431084}, "prompt_sha1": "05154ccd3ca0a029807fb4adbc8510a9a895fb27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×2.5²=0.006875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 2.5, "energy": 0.006874999999999999}, "prompt_sha1": "4a9025a7b7a38b84551eef4c6681edbb78b9c28b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10101100011 using generator polynomial bits 1111. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 15, "msg_bits": 11, "msg": 1379, "remainder": 0}, "prompt_sha1": "aa681352b461d99ea132b96ce036aca9310e6710", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.137.88.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.137.88.0\nBroadcast address: 10.137.88.15\nUsable host range: 10.137.88.1 to 10.137.88.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.137.88.0/28", "usable": 14, "first": "10.137.88.1", "last": "10.137.88.14", "broadcast": "10.137.88.15"}, "prompt_sha1": "d25f7443480f198addccd36afce847832c32bad6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.75 ns hit time, 92.0% hit rate, and a 25 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.920 = 0.080.\nAMAT = hit time + miss rate × miss penalty\n= 2.75 ns + 0.080×25 ns = 4.7500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.75, "hit_rate": 0.92, "penalty": 25, "result": 4.749999999999999}, "prompt_sha1": "13f625c435780942bc21e310fec2952dffb50502", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 20 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 20000000/200 = 100000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 100000 that also keeps the period count within 16 bits is 12500.\nPeriod count = 100000/12500 = 8.\nPSC register = 12500-1 = 12499.\nARR register = 8-1 = 7.\nVerification: 20000000/(12500×8) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 20000000, "target_hz": 200, "total_division": 100000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 12500, "period": 8, "psc_reg": 12499, "arr_reg": 7}, "prompt_sha1": "cb3b1f668ad5082dd5278a3439d599daaffc5aca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_185` generating a one-clock-cycle `tick` every 185 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_185 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 184) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_185", "divide": 185}, "prompt_sha1": "b53bc9070cc2d7cd5ed084d18e18436882f6b031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(4×4800) = 833.333333.\nNearest integer divisor D = 833.\nActual baud = 16000000/(4×833) = 4801.921 baud.\nError = (4801.921-4800)/4800×100% = 0.0400%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 4, "baud": 4800, "divisor": 833, "actual": 4801.920768307323, "error_pct": 0.0400160064025575}, "prompt_sha1": "1baf6b093f722ec97bb43414d37b60cde5e22624", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-32 = 1968 bytes.\nRound down to an 8-byte multiple: floor((1968)/8)×8 = 1968 bytes.\nFragments required = ceil(6000/1968) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 32, "payload": 6000, "max_payload": 1968, "fragments": 4}, "prompt_sha1": "ed792a96f197affd47a5478bcd9b7449007e1276", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w14_m7349` with clk, asynchronous active-low rst_n, active-high enable, and output logic [13:0] count. On reset count=0. When enabled it increments until 7349 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w14_m7349 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [13:0] count\n);\n localparam logic [13:0] LIMIT = 14'd7349;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w14_m7349", "width": 14, "max": 7349}, "prompt_sha1": "0c90853371baf985c1652f2e400b23f59f94df48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 332 elements. Review loop `for i in range(332-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(332-1)` produces indices 0 through 330, so index 331 is skipped. Correct loop: `for i in range(332):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 332, "variant": "miss_last"}, "prompt_sha1": "6459d1301f1cfb79a523add6110f50643f8e6d62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/47 = 0.000212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 47, "tau": 0.0002127659574468085}, "prompt_sha1": "903a4291f3b3a5dcabcf3e5205e8acec6fa21866", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=10 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×47/(10+47) = 7.421053 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 10, "r2": 47, "vout": 7.421052631578948}, "prompt_sha1": "83f4e00f01aede2aa7189ceb5a9b124f18da8de6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 15979 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 15979/50000000 s; frequency = 50000000/15979 = 3129.106953 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 15979, "hz": 3129.1069528756493}, "prompt_sha1": "de548d39689372da842e9c2503ce1f591606b633", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 64 = 0.937500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 64, "spi_hz": 937500.0}, "prompt_sha1": "01c50510b80354c1ef3c7790ade3152172a823e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 200000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 200000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 200000}, "prompt_sha1": "4787b0d358bc9b9d24749e036f22748428c5fe0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_94_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 94 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_94_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd94;\n end else begin\n if (pulse_in)\n count <= 7'd94;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_94_retrig", "cycles": 94, "retrigger": true}, "prompt_sha1": "d7e4026b22467009192fd24e56581db259d5127f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 2-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/2 = 512.\nOffset bits = log2(16) = 4; index bits = log2(512) = 9; tag bits = 57-4-9 = 44.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 2, "addr_bits": 57, "lines": 1024, "sets": 512, "offset": 4, "index": 9, "tag": 44}, "prompt_sha1": "bc67ae79b04854dd1c4bf100c1e91e509696a2d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×48²=0.025344 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 48, "energy": 0.025344000000000002}, "prompt_sha1": "f40672c2c39a44a920b770128d745500f6c355c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [25, 16, 27]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [61, 51, 68].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [25, 16, 27], "finish": [61, 51, 68]}, "prompt_sha1": "b3253c7dca2801ff2a4e103ac900750ca8f20781", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×12000)/(47000+12000) = 9559.322034 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 12000, "req": 9559.322033898306}, "prompt_sha1": "fe0059f0456c96aad9805389f0fb989d09a45ec2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 80 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 80/1000 = 1.6e+09 bits = 2e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 80, "bits": 1600000000.0, "bytes": 200000000.0}, "prompt_sha1": "4fe0a6261ffbb6b629ae1e069528f106565d85ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=4.7 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/47 = -0.100000.\nVout = A_v×Vin = -0.100000×1 = -0.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 4.7, "vin": 1.0, "gain": -0.1, "vout": -0.1}, "prompt_sha1": "27a236c32370eab829206a0220a17f06500fa9a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NNNTNNTTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "b2c118d129ef0a15ceaee503958a213f71864d62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 2-way set-associative cache uses 32-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/32 = 1024.\nSets = 1024/2 = 512.\nOffset bits = log2(32) = 5; index bits = log2(512) = 9; tag bits = 52-5-9 = 38.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 32, "ways": 2, "addr_bits": 52, "lines": 1024, "sets": 512, "offset": 5, "index": 9, "tag": 38}, "prompt_sha1": "f75ef8f7355a09a44e3f22fa7623145a8b89a8b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 10111011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "10111011", "ones": 6, "parity": 0}, "prompt_sha1": "f44b26545f33c1246fe7c3c2cc5f2223c6a4859d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=47 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×22/(47+22) = 3.826087 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 47, "r2": 22, "vout": 3.8260869565217392}, "prompt_sha1": "59c4976d8c8aac7f25bcfe52bb9d540905715fe3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 160 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 160 MHz / 2 = 80.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 160000000.0, "divider": 2, "spi_hz": 80000000.0}, "prompt_sha1": "a5c788d70324fe0c53e06faf1c10868253710c26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 46 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 46 = 49.\nClock pulses = 49×9 = 441.\nTime = 441/400000 s = 1102.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 46, "clocks": 441, "time_s": 0.0011025}, "prompt_sha1": "790e06658fad21558d3c3be86e47f7c9bc4e7d0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on N; 2->T on N; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "d1ad238387a4610e3b7823a5a4a6f3b60d855f14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 13-bit up/down counter `updown_13_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_13_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [12:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 13'd8191) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_13_sat", "width": 13, "wrap": false}, "prompt_sha1": "da32248710c51a82a7bfdbedc207d8ed688f75a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 12-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^12 V = 0.000244140625 V = 244.140625 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 12, "vref": 1.0, "step": 0.000244140625}, "prompt_sha1": "b8fce4136f7982a762aaca629c37cc075b8fd635", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/100000=1e-05 A. P=V²/R=1²/100000=1e-05 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 100000, "i": 1e-05, "p": 1e-05}, "prompt_sha1": "37ae9097157d82288f8b981219191a8f4ab0e7cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w3_nocin` implementing a 3-bit unsigned adder with inputs `a`, `b` and outputs `3-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w3_nocin (\n input logic [2:0] a,\n input logic [2:0] b,\n output logic [2:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w3_nocin", "width": 3, "cin": false}, "prompt_sha1": "2f608fb9d1c6a5aae2e369b7b373c839b0ca9ecd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8840` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8840 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8840"}, "prompt_sha1": "6d45c64b27cb45caeed7c1f01cb3201a49f15091", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×12000)/(1000+12000) = 923.076923 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 12000, "req": 923.0769230769231}, "prompt_sha1": "2eedba5b600017c9b1b5f50c7add3dba89165a30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=25 ms, C=3 ms,T=200 ms, C=3 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/25 + 3/200 + 3/5 = 0.695000 = 69.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 25], [3, 200], [3, 5]], "utilization": 0.695}, "prompt_sha1": "d51ed2cddf85b3ee1ab1950a30ee518614fd5c39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 128 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 128/(128+48) = 0.727273 = 72.73%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 128, "overhead": 48, "efficiency": 0.7272727272727273}, "prompt_sha1": "e1c1da4624f021205bde71fd04c3a1b522af6943", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTNNTNNTNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "8e4d66b4b34bf9919d0096a65cc07fe60c56444e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 39.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+10 = 49.5. Period = 49.5/2000000 = 2.475e-05 s. Maximum rate = 1/period = 40404.040404 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 39.5, "conv_cycles": 10, "period": 2.475e-05, "rate": 40404.04040404041}, "prompt_sha1": "621fe94513d2a03e0a3c1955f1be42e8808a9daa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.80. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.80) + 0.80/3) = 2.142857.\nThe theoretical speedup is about 2.143×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.8, "n": 3, "result": 2.1428571428571432}, "prompt_sha1": "e0060b17dd6ee576db582e200d6204f7e5b1610f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=470000 ohm and C=39000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=470000×39000×10^-12 s = 0.01833 s.\nf_c=1/(2πRC)=1/(2π×470000×39000×10^-12) = 8.6828 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 470000, "c_f": 3.9e-08, "tau": 0.01833, "fc": 8.68275739726652}, "prompt_sha1": "fa9c43b17cd11f32fffb3ffe6a3462f16519e47e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_9045` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_9045 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_9045", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "5ef5c9dfe5b27e53746733aff3ac3e8b12dd4a93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 39 and initial occupancy is 33. In an abstract batch, producer attempts to enqueue 95 items first, dropping any excess beyond capacity; then consumer removes up to 164 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=39, dropped=89; consumed=39; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 39, "start": 33, "prod": 95, "cons": 164, "dropped": 89, "consumed": 39, "final": 0}, "prompt_sha1": "2cb1b747f6dfab8fa1b5e06708c59fce15bed971", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xD7D2, clear bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 4)`. Result = 0xD7C2.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 55250, "bit": 4, "op": "clear", "result": 55234}, "prompt_sha1": "28d632a3f32d11ac48db05ca866e064f2d8760ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×820)/(680+820) = 371.733333 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 820, "req": 371.7333333333333}, "prompt_sha1": "c4ded2a3309771f007c695a11fa8bf7001addbe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x8E7044181381 in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 81 13 18 44 70 8E.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 156612829909889, "endian": "little", "bytes": [129, 19, 24, 68, 112, 142]}, "prompt_sha1": "70be4bb56475f8c95f90b7124fead4f6add3a2df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 60 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 60 = 62.\nClock pulses = 62×9 = 558.\nTime = 558/1000000 s = 558.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 60, "clocks": 558, "time_s": 0.000558}, "prompt_sha1": "509fff50faa5bb2bae65505771607c5e0774d971", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [1, 19, 9, 24, 19, 1]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 62, 39, 73, 69, 18].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [1, 19, 9, 24, 19, 1], "finish": [1, 62, 39, 73, 69, 18]}, "prompt_sha1": "a61dabb5edf28c05045fc6e6e65f22e5f6f0e181", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×2048 KiB = 262144 KiB = 268435456 bytes = 256.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 2048, "reach": 268435456}, "prompt_sha1": "5ccae78e08eddfe56f357d27f74fdf324582e359", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w29_nocin` implementing a 29-bit unsigned adder with inputs `a`, `b` and outputs `29-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w29_nocin (\n input logic [28:0] a,\n input logic [28:0] b,\n output logic [28:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w29_nocin", "width": 29, "cin": false}, "prompt_sha1": "a8a569a6d5b8e29e8a88d71bca8631ff910b83c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10101001010 using generator polynomial bits 111110001. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11100101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 497, "msg_bits": 11, "msg": 1354, "remainder": 229}, "prompt_sha1": "588116b29119321f346f9ffef16d2328d31ccaa1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6F, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x6F<<1)|0 = 0xDE = 11011110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 111, "rw": 0, "byte": 222}, "prompt_sha1": "293694e47533e75b7f5badf2f0f6ec5273fb3ba1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [9, 6, 29]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [19, 20, 44].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [9, 6, 29], "finish": [19, 20, 44]}, "prompt_sha1": "c07ea7b9570ec7b3c169a708a3dcf6fa6218dc6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_737591` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_737591 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_737591"}, "prompt_sha1": "6827ffdc02cd5c8031905f88e93a8b022bbcce64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 97.2% hit rate, and a 40 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.972 = 0.028.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.028×40 ns = 2.6200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.972, "penalty": 40, "result": 2.620000000000001}, "prompt_sha1": "099551f987db71da5780a3bfc026eb23ae289e7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.99. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.99) + 0.99/64) = 39.263804.\nThe theoretical speedup is about 39.264×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.99, "n": 64, "result": 39.26380368098158}, "prompt_sha1": "f7caba4ae336ce94e3da9a308bbca7219375e9de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_338349` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_338349 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_338349"}, "prompt_sha1": "134658ea62f2574d15ecbb327ba317cd3fce7201", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=2.2 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×22/(2.2+22) = 4.545455 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 2.2, "r2": 22, "vout": 4.545454545454546}, "prompt_sha1": "1e067eed25b9c436380175c7113a2805c3b64604", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0100111011110000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0100111011110000", "ones": 8, "parity": 0}, "prompt_sha1": "ea62d49a6ff1db13bb9b3ce1416c0d53c2f39cd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 2-way set-associative cache uses 256-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/256 = 128.\nSets = 128/2 = 64.\nOffset bits = log2(256) = 8; index bits = log2(64) = 6; tag bits = 57-8-6 = 43.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 256, "ways": 2, "addr_bits": 57, "lines": 128, "sets": 64, "offset": 8, "index": 6, "tag": 43}, "prompt_sha1": "be10e00892ae1227b416b30208a11e75bbd0612d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3266 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "b74d18de3003c8d3c17b3c61ece84f8131a60cb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500000 Hz satisfies it.", "output": "Nyquist minimum is 2×100000 = 200000 Hz. Proposed rate 500000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100000, "min_fs": 200000, "proposed": 500000}, "prompt_sha1": "95ba9e6a46dd5be8137b884cd41ac08d03e3f894", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 10%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.100 × 8 = 0.200000.\nEffective CPI = 1.2 + 0.200000 = 1.400000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.1, "penalty": 8, "result": 1.4}, "prompt_sha1": "601aea88913360c8697519afb885dce4f10f4bba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1329` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1329 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1329 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1329;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1329", "width": 11, "max": 1329}, "prompt_sha1": "7d775a693f3980bb1e103acd4a65c0b03ad6ab92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 48 and initial occupancy is 12. In an abstract batch, producer attempts to enqueue 178 items first, dropping any excess beyond capacity; then consumer removes up to 139 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=48, dropped=142; consumed=48; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 48, "start": 12, "prod": 178, "cons": 139, "dropped": 142, "consumed": 48, "final": 0}, "prompt_sha1": "d17477f3e574cb14604e95d6e4c0585b90989362", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_37_5_9` with RED, GREEN, YELLOW states. Hold RED for 37 clock cycles, GREEN for 5, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_37_5_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 36) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 4) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_37_5_9", "red": 37, "green": 5, "yellow": 9}, "prompt_sha1": "40344228a6395c9beb6f706e217c335f738de043", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.93. Using Amdahl's law, compute the theoretical speedup on 4 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.93) + 0.93/4) = 3.305785.\nThe theoretical speedup is about 3.306×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.93, "n": 4, "result": 3.3057851239669422}, "prompt_sha1": "5140a779c837734357756b7e84af77ac7f3311e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 2-way set-associative cache uses 16-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/2 = 512.\nOffset bits = log2(16) = 4; index bits = log2(512) = 9; tag bits = 52-4-9 = 39.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 2, "addr_bits": 52, "lines": 1024, "sets": 512, "offset": 4, "index": 9, "tag": 39}, "prompt_sha1": "40b27d539d66f3ffb44358bb4f717e81712a6761", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 57 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 57-10 = 47.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 57, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 47}, "prompt_sha1": "f11b5f374096c6666fce0b9d38657dabe7d3293b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1305(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1305(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1305([1, 2]) == 1.5\nassert mean_1305([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1305"}, "prompt_sha1": "a4a1f7f6069ed933b41bda227665833b0b4a23e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_104_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 104 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_104_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd104;\n end else begin\n if (pulse_in)\n count <= 7'd104;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_104_retrig", "cycles": 104, "retrigger": true}, "prompt_sha1": "a42614190efc9077116a3cb8f930cae38ee2c324", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 195; x = x + 139;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 195+139 = 334. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (334) mod 2^8 = 78. So `x` stores 78. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 195, "add": 139, "result": 78}, "prompt_sha1": "c7f4d6cef17692a960f23053a91ba38cb7763b73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=22 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/100 = -0.220000.\nVout = A_v×Vin = -0.220000×1 = -0.220000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 22, "vin": 1.0, "gain": -0.22, "vout": -0.22}, "prompt_sha1": "7e4cc570e692ffd136cba5b8f6bd4ea03b062f60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 10%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.100 × 4 = 0.060000.\nEffective CPI = 1 + 0.060000 = 1.060000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.1, "penalty": 4, "result": 1.06}, "prompt_sha1": "aa52e6df7ecc47a7c44bc1545f396b098f61aeed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3900 ohm and C=1200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3900×1200000×10^-12 s = 0.00468 s.\nf_c=1/(2πRC)=1/(2π×3900×1200000×10^-12) = 34.0075 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3900, "c_f": 1.2e-06, "tau": 0.00468, "fc": 34.00746647262721}, "prompt_sha1": "8318a16d6ce3bbb1ef3abbc26bcb88d08784f998", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/1000 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 1000, "tau": 0.0001}, "prompt_sha1": "f474181b70f0499f8458cd6488ced17570b591da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4703-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4703×8 = 37624 bits.\nSerialization delay = bits/rate = 37624/(5000×10^6) s = 7.5248e-06 s = 7.524800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4703, "rate_mbps": 5000, "delay_s": 7.5248e-06}, "prompt_sha1": "a6433a47a7c20d84f3abeb7a4a31ae7baf0fce3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 600 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 600 = 90. Verification: 90/600 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 600, "duty": 15, "high": 90}, "prompt_sha1": "d385ab025e79a0124ce60dd5689d9a244e2aee52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 8 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 1811 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 50000×1811/(8×10^6) = 11.31875 = 1131.875000%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 8, "irq_hz": 50000, "cycles": 1811, "load": 11.31875}, "prompt_sha1": "649b9aa4f7a1088907b9ebfa539a3cb5abaff1b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "e348745947e095e2d2332801496cd544fc0a2c85", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "0f3f83958e1a7855b3a2e588156cde132aa2da0a8c096057d5803ae842b42a8d", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 797, "original_row_sha256": "0ec3fdb1a94ceabfc3b9d55007a4411821b268d1a01510ccbbe1619e57630bd1", "version": "v1.0.0-rc1"}}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m3566` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 3566 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m3566 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd3566;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m3566", "width": 13, "max": 3566}, "prompt_sha1": "8850d67434bae7afe014f9299216f02da32d4c74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4519 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4519/(4519+40+8) = 0.989490 = 98.95%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4519, "iphdr": 40, "eff": 0.9894898182614408}, "prompt_sha1": "0dfbd39b12d93151a1b348ffc2ff124b8bf20d32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 256 payload bytes plus 72 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 256/(256+72) = 0.780488 = 78.05%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 256, "overhead": 72, "efficiency": 0.7804878048780488}, "prompt_sha1": "125c17758dc312c55f7939554989c72a8193a42b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 4 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 4000000/(8×460800) = 1.085069.\nNearest integer divisor D = 1.\nActual baud = 4000000/(8×1) = 500000.000 baud.\nError = (500000.000-460800)/460800×100% = 8.5069%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 4000000, "oversample": 8, "baud": 460800, "divisor": 1, "actual": 500000.0, "error_pct": 8.506944444444445}, "prompt_sha1": "ece8585a5bcdda89c6acc3dc87a459a08882f22c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x24_no_bypass` with 32 entries of 24 bits. Inputs: `clk`, `we`, `5-bit waddr`, `24-bit wdata`, `5-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x24_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [23:0] wdata,\n input logic [4:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x24_no_bypass", "entries": 32, "width": 24, "mode": "no_bypass"}, "prompt_sha1": "4c95913db3e5711323b8be3c6ceaa9ad6fd6ce32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (4096×8) = 3051.757812 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 4096, "pps": 3051.7578125}, "prompt_sha1": "fcccaa1c2d8dac01e7c1f332477560e6bafacf5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×1.8²=0.00162 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 1.8, "energy": 0.0016200000000000001}, "prompt_sha1": "8b67af2ffdafc85ccbb2b78cb6e97ec7d702048e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 230400 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "65ab1c09b38e39a95e357005d88d402690f7621d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 48 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 48000000/(4×1200) = 10000.000000.\nNearest integer divisor D = 10000.\nActual baud = 48000000/(4×10000) = 1200.000 baud.\nError = (1200.000-1200)/1200×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 48000000, "oversample": 4, "baud": 1200, "divisor": 10000, "actual": 1200.0, "error_pct": 0.0}, "prompt_sha1": "114e939897de802b37ae345199fecf05dfd13bc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 26-bit up/down counter `updown_26_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_26_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [25:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 26'd67108863) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_26_sat", "width": 26, "wrap": false}, "prompt_sha1": "64b05065918c8a6537c95425147947c90aeb1d69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 2-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/256 = 128.\nSets = 128/2 = 64.\nOffset bits = log2(256) = 8; index bits = log2(64) = 6; tag bits = 32-8-6 = 18.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 256, "ways": 2, "addr_bits": 32, "lines": 128, "sets": 64, "offset": 8, "index": 6, "tag": 18}, "prompt_sha1": "69721e101c7e986ba130705103dd659ba7b89e9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x16_write_bypass` with 8 entries of 16 bits. Inputs: `clk`, `we`, `3-bit waddr`, `16-bit wdata`, `3-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [15:0] wdata,\n input logic [2:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x16_write_bypass", "entries": 8, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "8d8d0f1e63a6be361b03dcd291409537e91ea4a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `entries` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n total += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `data[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n total += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "d2f2d6a72c3db8e2a0b30bd3f435d7f6918213a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 5%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.050 × 3 = 0.022500.\nEffective CPI = 1.1 + 0.022500 = 1.122500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.05, "penalty": 3, "result": 1.1225}, "prompt_sha1": "9bc758f7fea1fc407a1cc80987dcd7e628fcbaf7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_105` for a synchronous sampled input `noisy`. Update output `clean` only after observing 105 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_105 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 104) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_105", "stable_samples": 105}, "prompt_sha1": "c5be2b2cb60701a8a0ecb25b4a4d65257bfac0b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 40-bit right-shift register module `shiftreg_right_40`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `40-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_40 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [39:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[39:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_40", "width": 40, "direction": "right"}, "prompt_sha1": "bdf9e87bdf9967d5a0ef3a24867058c7836b010b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 16 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×50×10^6 = 800000000 B/s. Time = 8192/800000000 = 1.024e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 16, "rate_mhz": 50, "sec": 1.024e-05}, "prompt_sha1": "1f6b01d863b4461966dada000310d67fd9731b59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.68. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.68) + 0.68/3) = 1.829268.\nThe theoretical speedup is about 1.829×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.68, "n": 3, "result": 1.829268292682927}, "prompt_sha1": "9407383ee70a2ca9801674755ede36ceb62689ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w59_nocin` implementing a 59-bit unsigned adder with inputs `a`, `b` and outputs `59-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w59_nocin (\n input logic [58:0] a,\n input logic [58:0] b,\n output logic [58:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w59_nocin", "width": 59, "cin": false}, "prompt_sha1": "a8237a8409c6364305bcd4a8e53c856a3ae3b55c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 10 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-05×24²=0.00288 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-06, "v": 24, "energy": 0.0028799999999999997}, "prompt_sha1": "0663b9ad0945fb401c3c7c7c5749b1c5ffd7a295", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 32 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 32000000/(8×2400) = 1666.666667.\nNearest integer divisor D = 1667.\nActual baud = 32000000/(8×1667) = 2399.520 baud.\nError = (2399.520-2400)/2400×100% = -0.0200%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 32000000, "oversample": 8, "baud": 2400, "divisor": 1667, "actual": 2399.520095980804, "error_pct": -0.019996000799835656}, "prompt_sha1": "6a9f42ddbf14645d245294b18af982440af3ab90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 11010011101111001001100001110010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 17 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11010011101111001001100001110010", "ones": 17, "parity": 1}, "prompt_sha1": "29c1a0b0a880ed04974909d0889ff8c5b171b829", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+8) = 0.952381 = 95.24%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 8, "efficiency": 0.9523809523809523}, "prompt_sha1": "60926fafacd5ad9c6eb9daf9ddcc1cbf78691748", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6720 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6720/(6720+40+8) = 0.992908 = 99.29%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6720, "iphdr": 40, "eff": 0.9929078014184397}, "prompt_sha1": "b41558799ea284eccb384285e530193b3010ef27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(16×10^6) s = 64.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 1024, "time_us": 64.0}, "prompt_sha1": "8deadc9dc9d6ed3cdfbe507cc8fdcb52ff24df18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 2276 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×2276/(72×10^6) = 0.00158055556 = 0.158056%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 50, "cycles": 2276, "load": 0.0015805555555555555}, "prompt_sha1": "cbde467f73e45033399ebfd6a49f8d648416be3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=2.2 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×22/(2.2+22) = 3.000000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 2.2, "r2": 22, "vout": 3.0}, "prompt_sha1": "5e851d404dbda66d4cea795134b4060fe0428601", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_16` for a synchronous sampled input `noisy`. Update output `clean` only after observing 16 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_16 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 15) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_16", "stable_samples": 16}, "prompt_sha1": "8d002e61615bf2ab9278428a230ceeb723b67b96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x6432, clear bit 12 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 12)`. Result = 0x6432.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 25650, "bit": 12, "op": "clear", "result": 25650}, "prompt_sha1": "8b24a980ef65b4795121358911ab040df76d42aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×20/1000/8 = 250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 20, "bytes": 250000.0}, "prompt_sha1": "05b44f99326e8762741fc45bcaa86ff717e300b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1800 ohm and C=1200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1800×1200000×10^-12 s = 0.00216 s.\nf_c=1/(2πRC)=1/(2π×1800×1200000×10^-12) = 73.6828 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1800, "c_f": 1.2e-06, "tau": 0.00216, "fc": 73.68284402402563}, "prompt_sha1": "3ab7cb58ac65eefeac8b7396453b87a4736327c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x475E9B16, toggle bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 5)`. Result = 0x475E9B36.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 1197382422, "bit": 5, "op": "toggle", "result": 1197382454}, "prompt_sha1": "f6622e70b5ddf3584922ddb7b89396fd4ae542c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 390 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×390)/(47+390) = 41.945080 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 390, "req": 41.94508009153318}, "prompt_sha1": "04b6c4a84dce93cf27990564f65e28e425361e1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8574(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8574(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8574([1, 2]) == 1.5\nassert mean_8574([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8574"}, "prompt_sha1": "8cfcc917fd17f2065e78df7a7fa6574da7e7685b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 10% of instructions, the branch misprediction rate is 10%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.100 × 8 = 0.080000.\nEffective CPI = 1.2 + 0.080000 = 1.280000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.1, "mispred": 0.1, "penalty": 8, "result": 1.28}, "prompt_sha1": "d471e34ae0bdb48616e1609ddacf19b25bd0dcb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 27-bit up/down counter `updown_27_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_27_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [26:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 27'd134217727) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_27_sat", "width": 27, "wrap": false}, "prompt_sha1": "d97af51b0d9339da88c624cdfa928ccdc066505c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w32_nocin` implementing a 32-bit unsigned adder with inputs `a`, `b` and outputs `32-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w32_nocin (\n input logic [31:0] a,\n input logic [31:0] b,\n output logic [31:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w32_nocin", "width": 32, "cin": false}, "prompt_sha1": "54e7e1de4e4a6afe4006405260c6abac74ee0213", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x24_write_bypass` with 16 entries of 24 bits. Inputs: `clk`, `we`, `4-bit waddr`, `24-bit wdata`, `4-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x24_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [23:0] wdata,\n input logic [3:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x24_write_bypass", "entries": 16, "width": 24, "mode": "write_bypass"}, "prompt_sha1": "2fb74a10ab6c5524eabb81ad6f83f1eced1f65b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 85%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.040×(8+0.150×50) = 1.620000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.96, "l2": 8, "l2_hit": 0.85, "mem": 50, "amat": 1.6200000000000006}, "prompt_sha1": "35454b3340f5525d8a08e5e104d283444e164951", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=20 ms, C=3 ms,T=5 ms, C=1 ms,T=10 ms, C=2 ms,T=20 ms, C=1 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/20 + 3/5 + 1/10 + 2/20 + 1/100 = 0.860000 = 86.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 20], [3, 5], [1, 10], [2, 20], [1, 100]], "utilization": 0.86}, "prompt_sha1": "6fae9f7c47aa663b73fdc70d742c3423f662e830", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m31829` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 31829 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m31829 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd31829;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m31829", "width": 15, "max": 31829}, "prompt_sha1": "ee933cf9e45c696bea754c86c6158a3c605a9b2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_8_lsb` for `8-bit in`. The lowest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_8_lsb (\n input logic [7:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 7; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_8_lsb", "width": 8, "priority": "low"}, "prompt_sha1": "bbc97874ddca0b8693a3851f73e4ee6c6e2b6053", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=100 ms, C=3 ms,T=25 ms, C=2 ms,T=5 ms, C=2 ms,T=20 ms, C=2 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/100 + 3/25 + 2/5 + 2/20 + 2/200 = 0.680000 = 68.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 100], [3, 25], [2, 5], [2, 20], [2, 200]], "utilization": 0.68}, "prompt_sha1": "8beaf648e71612958b0c3f8e579e22d0c8a2f737", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.2 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.2/(2×10^9) = 0.0012 s = 1.200000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.2, "ghz": 2.0, "sec": 0.0012}, "prompt_sha1": "6dbc8222912b9c2cc138e61e2cf8519f977dd1f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 48 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 48 MHz / 4 = 12.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 48000000.0, "divider": 4, "spi_hz": 12000000.0}, "prompt_sha1": "e1b03806653f8cadd475bb35499b77fd42bb3030", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_21_47_2` with RED, GREEN, YELLOW states. Hold RED for 21 clock cycles, GREEN for 47, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_21_47_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 20) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 46) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_21_47_2", "red": 21, "green": 47, "yellow": 2}, "prompt_sha1": "7c200ffef18165fb901d5cf5e36b0d8052f09b0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 48 MHz and must generate an exact 2500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 48000000/2500 = 19200.\nWith prescaler divisor limited to at most 16384, the largest divisor of 19200 that also keeps the period count within 16 bits is 9600.\nPeriod count = 19200/9600 = 2.\nPSC register = 9600-1 = 9599.\nARR register = 2-1 = 1.\nVerification: 48000000/(9600×2) = 2500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 48000000, "target_hz": 2500, "total_division": 19200, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 9600, "period": 2, "psc_reg": 9599, "arr_reg": 1}, "prompt_sha1": "583a23509f899150cf2a5eac30b6177c2618244d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2980923909, carries 7849 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 7849+1+1 = 7851. ACK = (2980923909+7851) mod 2^32 = 2980931760.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2980923909, "payload": 7849, "syn": 1, "fin": 1, "ack": 2980931760}, "prompt_sha1": "6b544d043456d441341ea52f938cfe3bb4511d59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 3-bit right-shift register module `shiftreg_right_3`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `3-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_3 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [2:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[2:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_3", "width": 3, "direction": "right"}, "prompt_sha1": "2f5dadcaab4351d43fe7eca2eb8dc91fc53b3e25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 4 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×100×10^6 = 400000000 B/s. Time = 4096/400000000 = 1.024e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 4, "rate_mhz": 100, "sec": 1.024e-05}, "prompt_sha1": "51aaf9a8314b0c049c91fd70d6298b943fe9daec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 2-way set-associative cache uses 64-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/64 = 2048.\nSets = 2048/2 = 1024.\nOffset bits = log2(64) = 6; index bits = log2(1024) = 10; tag bits = 64-6-10 = 48.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 64, "ways": 2, "addr_bits": 64, "lines": 2048, "sets": 1024, "offset": 6, "index": 10, "tag": 48}, "prompt_sha1": "2a93cf26b42e9cae8a640364ade10fb834b37b46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w7_unsigned` comparing two 7-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w7_unsigned (\n input logic [6:0] a,\n input logic [6:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w7_unsigned", "width": 7, "signed": false}, "prompt_sha1": "5e87ddbfd865ac415246ce8133be18a85320ad9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock STATE then C; task_B acquires C then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds STATE while waiting for C, while task_B holds C while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "5c4e29b31e665d962b59dcc23eccd03057f27a0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 90.0% hit rate, and a 125 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.900 = 0.100.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.100×125 ns = 14.5000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.9, "penalty": 125, "result": 14.499999999999996}, "prompt_sha1": "63cb7ee4cb2a908d4a5e2cb13c185a5369c1fff7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8241` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8241 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8241"}, "prompt_sha1": "04245185f28afb66dd4c383be3af4c1645107475", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 16000 payload bytes plus 12 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 16000/(16000+12) = 0.999251 = 99.93%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 16000, "overhead": 12, "efficiency": 0.9992505620784412}, "prompt_sha1": "c90eb7124a3dc8bb1a3f323476143dd191205aab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 8` on one shared integer without synchronization. Assume `items` initially equals 88. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 88; T2 reads 88; both compute 96; T1 writes 96; T2 writes 96. The observed final value is 96, but two serial increments would produce 104.\n\n```\nlock(mutex)\nitems = items + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "f3c044716e35ce8579ae7db3246411628ae63c26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 3` on one shared integer without synchronization. Assume `counter` initially equals 214. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 214; T2 reads 214; both compute 217; T1 writes 217; T2 writes 217. The observed final value is 217, but two serial increments would produce 220.\n\n```\nlock(mutex)\ncounter = counter + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "ba27a009e146c7ec3850b0d010af14b241805897", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5278(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5278(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5278([1, 2]) == 1.5\nassert mean_5278([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5278"}, "prompt_sha1": "d65015a7d0cf11ae63f69a1630ee5c1383122167", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_16_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 16 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_16_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd16;\n end else begin\n if (pulse_in)\n count <= 5'd16;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_16_retrig", "cycles": 16, "retrigger": true}, "prompt_sha1": "50a846cbe397ee185a24bbe49f785bea69a967c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1577429895, carries 988 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 988+0+0 = 988. ACK = (1577429895+988) mod 2^32 = 1577430883.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1577429895, "payload": 988, "syn": 0, "fin": 0, "ack": 1577430883}, "prompt_sha1": "5d7e2a7e08a28dcd109984eb6bd60bfa829031b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m3` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 3 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m3 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd3;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m3", "width": 3, "max": 3}, "prompt_sha1": "7196a15784c8c4d3e7aaa62e82353fa676cb7369", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 230400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(8×230400) = 8.680556.\nNearest integer divisor D = 9.\nActual baud = 16000000/(8×9) = 222222.222 baud.\nError = (222222.222-230400)/230400×100% = -3.5494%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 8, "baud": 230400, "divisor": 9, "actual": 222222.22222222222, "error_pct": -3.549382716049384}, "prompt_sha1": "2814dac839d22861d957fcbec6f078cb4c49ae53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_24_8` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 24, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_24_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 23) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_24_8", "red": 20, "green": 24, "yellow": 8}, "prompt_sha1": "6e54b92a8d352f81700f723bfba1b4943c3ccf52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 97%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.010×(12+0.030×50) = 0.935000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.99, "l2": 12, "l2_hit": 0.97, "mem": 50, "amat": 0.9350000000000002}, "prompt_sha1": "673928f75463c735b23960bbfa61b3e79b0ddd52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 573-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 573×8 = 4584 bits.\nSerialization delay = bits/rate = 4584/(5000×10^6) s = 9.168e-07 s = 0.916800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 573, "rate_mbps": 5000, "delay_s": 9.168e-07}, "prompt_sha1": "e0eff6427c7cad0a3724cbdde2aebac2bd92abe4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2421` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2421 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2421"}, "prompt_sha1": "b58ce75c284b4d9dda0de77dc8580bd0e145415a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3038871671, carries 55782 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 55782+0+1 = 55783. ACK = (3038871671+55783) mod 2^32 = 3038927454.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3038871671, "payload": 55782, "syn": 0, "fin": 1, "ack": 3038927454}, "prompt_sha1": "02e48f442c126fb10bced8391ee68bbd1540c48e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 20% of instructions, the branch misprediction rate is 15%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.150 × 4 = 0.120000.\nEffective CPI = 1.1 + 0.120000 = 1.220000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.2, "mispred": 0.15, "penalty": 4, "result": 1.2200000000000002}, "prompt_sha1": "bd324d30cfe14911f85f1bcc187595bd373fa536", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9551` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9551 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9551"}, "prompt_sha1": "6293a859a677726ba882b2f100eed165e209dd91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=4.7 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/22 = -0.213636.\nVout = A_v×Vin = -0.213636×0.1 = -0.021364 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 4.7, "vin": 0.1, "gain": -0.21363636363636365, "vout": -0.021363636363636366}, "prompt_sha1": "b74876dec8b8efde03543346eb7875e32f86a80d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 80 MHz. Sampling consumes 2.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+14 = 16.5. Period = 16.5/80000000 = 2.0625e-07 s. Maximum rate = 1/period = 4848484.848485 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 80000000.0, "sample_cycles": 2.5, "conv_cycles": 14, "period": 2.0625e-07, "rate": 4848484.848484849}, "prompt_sha1": "93959d3e9907084b5638db6ec2b5861a21926a20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [19, 13, 10, 8, 28]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [68, 57, 46, 38, 78].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [19, 13, 10, 8, 28], "finish": [68, 57, 46, 38, 78]}, "prompt_sha1": "8af433742afae3bcc46c8591483e8d0e7338f0c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock RX then TX; T2 acquires TX then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds RX while waiting for TX, while T2 holds TX while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire RX before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2af8f1217d1ec6e1f9a5f1a2c17ca3bc6d9fe93a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 100 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 100/1000 = 2.5e+07 bits = 3.125e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 100, "bits": 25000000.0, "bytes": 3125000.0}, "prompt_sha1": "be431f2c66712531b792d490efaf34b35c791119", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/470 = 2.12765957e-07 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 470, "tau": 2.1276595744680852e-07}, "prompt_sha1": "2509eaad474477ac66e31b7fecc23d6c26c32b09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_104` generating a one-clock-cycle `tick` every 104 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_104 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 103) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_104", "divide": 104}, "prompt_sha1": "462080344dd540d9e8e2436fa416b378f1f60240", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551469; x = x + 593;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551469+593 = 18446744073709552062. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552062) mod 2^64 = 446. So `x` stores 446. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551469, "add": 593, "result": 446}, "prompt_sha1": "2888266fd43e23c0fcbf9c93ee3228ce5637fbe4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-24 = 1376 bytes.\nRound down to an 8-byte multiple: floor((1376)/8)×8 = 1376 bytes.\nFragments required = ceil(6000/1376) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 24, "payload": 6000, "max_payload": 1376, "fragments": 5}, "prompt_sha1": "f6f0079ee47422f3f3a495bf9502d28f69c5bb65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.3 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 2.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.3-2.4 = 8.9 V.\nI = V/R = 8.9/2700 A = 3.2963 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.3, "vf": 2.4, "r": 2700, "current_a": 0.0032962962962962963}, "prompt_sha1": "5e82c5e4971b09607dd8cde8eb72c365331347ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 4156 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50000×4156/(240×10^6) = 0.865833333 = 86.583333%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 50000, "cycles": 4156, "load": 0.8658333333333333}, "prompt_sha1": "3a05235d6d121cade168c79d1f36f6b8d311f556", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 504 and tail index 326, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (504-326) mod 1024 = 178. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 504, "tail": 326, "occupancy": 178}, "prompt_sha1": "332b1abe706c581e6cbc61f36b338e44a8d4299e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 4-way set-associative cache uses 32-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/32 = 16384.\nSets = 16384/4 = 4096.\nOffset bits = log2(32) = 5; index bits = log2(4096) = 12; tag bits = 64-5-12 = 47.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 32, "ways": 4, "addr_bits": 64, "lines": 16384, "sets": 4096, "offset": 5, "index": 12, "tag": 47}, "prompt_sha1": "0352a0e21e4cea7ddf557f85dd728215869f5253", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'P', 'P', 'V', 'V', 'P', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "V", "V", "P", "V", "V", "P", "V", "P", "P", "V", "V", "P", "P", "V", "V", "P"], "value": 6, "blocked": 0}, "prompt_sha1": "995813722942b542410c446e170097abc0316312", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_5067` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_5067 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_5067"}, "prompt_sha1": "e594eb6f48a3bb55f425f968f667c262b58c0a55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 37912 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 37912/1000000 s; frequency = 1000000/37912 = 26.376873 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 37912, "hz": 26.376872757965817}, "prompt_sha1": "66ec197e24e0de80b13667d120a00cd519d04fcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m849` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 849 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m849 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd849;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m849", "width": 11, "max": 849}, "prompt_sha1": "f0395641617c7261f02d626abe5d1ae34d48f872", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w26_unsigned` comparing two 26-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w26_unsigned (\n input logic [25:0] a,\n input logic [25:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w26_unsigned", "width": 26, "signed": false}, "prompt_sha1": "b7510992cc68e7b3b6fa0e3504db024ad4ec3b42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_24` generating a one-clock-cycle `tick` every 24 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_24 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 23) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_24", "divide": 24}, "prompt_sha1": "c9d5a6a69d094c97b97b42f853c002eb7506c09d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 34 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 34-13 = 21.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 34, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 21}, "prompt_sha1": "d5b1a9a4046d16b2b06447afbff1bce0c7fcd037", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x8_write_bypass` with 16 entries of 8 bits. Inputs: `clk`, `we`, `4-bit waddr`, `8-bit wdata`, `4-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [7:0] wdata,\n input logic [3:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x8_write_bypass", "entries": 16, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "a7946a9b26f99db579049f8188dadcdc9416313a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 360 elements. Review loop `for i in range(360-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(360-1)` produces indices 0 through 358, so index 359 is skipped. Correct loop: `for i in range(360):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 360, "variant": "miss_last"}, "prompt_sha1": "f74d6af652754ed1c6d143b5651519a0c568b366", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/470=0.0510638298 A. P=V²/R=24²/470=1.22553191 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 470, "i": 0.05106382978723404, "p": 1.225531914893617}, "prompt_sha1": "065a0f23d914a529897ce83785e72cb1388c81af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 54 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 54-14 = 40.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 54, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 40}, "prompt_sha1": "117ad79ebcf443eb9bb67a858e8ad8cba30cfa67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 2 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×8×10^6 = 16000000 B/s. Time = 256/16000000 = 1.6e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 2, "rate_mhz": 8, "sec": 1.6e-05}, "prompt_sha1": "87e9e7c5f680f013ac45180db7a9874b3621f872", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 134 elements. Review loop `for i in range(134+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(134+1)` includes index 134, which is out of range for a length-134 sequence. Correct loop: `for i in range(134):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 134, "variant": "one_past"}, "prompt_sha1": "a1da289911d0614bcc8f1e6d3a8a1496456dd023", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^10 V = 0.001220703125 V = 1220.703125 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 1.25, "step": 0.001220703125}, "prompt_sha1": "372b05093c48c843bd41d8cfe122f85264f7d44d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×256 KiB = 524288 KiB = 536870912 bytes = 512.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 256, "reach": 536870912}, "prompt_sha1": "9be6df08f71f6ac8cd609bdddeb0ad063caaa078", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3.3 V reference and returns code 225. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 225/1023 × 3.3 V = 0.725806 V.\nThus the estimated input is about 0.7258 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.3, "code": 225, "volts": 0.7258064516129031}, "prompt_sha1": "9ae7b581d62dfe402a57ec267e0f2ad21d70a23d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^10 V = 0.0029296875 V = 2929.687500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 3.0, "step": 0.0029296875}, "prompt_sha1": "9eec8071d2dd254fc5e35b3bc0da7feb8e164dc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x16_no_bypass` with 8 entries of 16 bits. Inputs: `clk`, `we`, `3-bit waddr`, `16-bit wdata`, `3-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [15:0] wdata,\n input logic [2:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x16_no_bypass", "entries": 8, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "f916fe2e2cebeab89a7452bb299098667e09e910", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 640.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+24 = 664.5. Period = 664.5/16000000 = 4.153125e-05 s. Maximum rate = 1/period = 24078.254327 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 640.5, "conv_cycles": 24, "period": 4.153125e-05, "rate": 24078.254326561324}, "prompt_sha1": "1a8c7dd6ebf4d511c7d4d6d7f76b5e6381188cb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 8 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 4292 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×4292/(8×10^6) = 0.1073 = 10.730000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 8, "irq_hz": 200, "cycles": 4292, "load": 0.1073}, "prompt_sha1": "a5a7240f9e0b97b02d70eb86ae4aaea2e9391dc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 16 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×40×10^6 = 640000000 B/s. Time = 262144/640000000 = 0.0004096 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 16, "rate_mhz": 40, "sec": 0.0004096}, "prompt_sha1": "aacd09020fd0244011600ca57742d54907b9d036", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 4-way set-associative cache uses 64-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/64 = 2048.\nSets = 2048/4 = 512.\nOffset bits = log2(64) = 6; index bits = log2(512) = 9; tag bits = 32-6-9 = 17.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 64, "ways": 4, "addr_bits": 32, "lines": 2048, "sets": 512, "offset": 6, "index": 9, "tag": 17}, "prompt_sha1": "d1f5febae41ea317ab4bc5e8605bc906438ac37b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 2000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/2000 = 42000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 42000 that also keeps the period count within 16 bits is 14000.\nPeriod count = 42000/14000 = 3.\nPSC register = 14000-1 = 13999.\nARR register = 3-1 = 2.\nVerification: 84000000/(14000×3) = 2000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 2000, "total_division": 42000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 14000, "period": 3, "psc_reg": 13999, "arr_reg": 2}, "prompt_sha1": "c8fb79dbf4bc7576cb2d385efdac62ad12f3228d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4166094291, carries 30964 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 30964+1+0 = 30965. ACK = (4166094291+30965) mod 2^32 = 4166125256.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4166094291, "payload": 30964, "syn": 1, "fin": 0, "ack": 4166125256}, "prompt_sha1": "c288b4513d26ae2e34aa95eed7f083904d9e8b56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 200 MHz, prescaler divisor is 366, and period is 14172 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 200000000/(366×14172) = 38.558290 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 200000000, "prescaler": 366, "period": 14172, "hz": 38.55829010949012}, "prompt_sha1": "5e4b8c045b28f96cf67fee04f385a32c5bd321fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2127590508, carries 58834 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 58834+1+1 = 58836. ACK = (2127590508+58836) mod 2^32 = 2127649344.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2127590508, "payload": 58834, "syn": 1, "fin": 1, "ack": 2127649344}, "prompt_sha1": "cc759920030980a05a49aca3c54603eb7cc25503", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_43_lsb` for `43-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_43_lsb (\n input logic [42:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 42; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_43_lsb", "width": 43, "priority": "low"}, "prompt_sha1": "3c94416914895647c83b7a791b52fb722e630226", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 96 MHz, prescaler divisor is 724, and period is 37664 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 96000000/(724×37664) = 3.520515 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 96000000, "prescaler": 724, "period": 37664, "hz": 3.5205152156667623}, "prompt_sha1": "edce7c6afb3e000c5bfd9a386f3546500fac4eca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (1200×8) = 10416.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 1200, "pps": 10416.666666666666}, "prompt_sha1": "f5c0d1229648412ae89ab4e4be8eca16e84a35d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 0.5 on a 4.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×0.5/(4.5×10^9) = 0.000555555556 s = 0.555556 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 0.5, "ghz": 4.5, "sec": 0.0005555555555555556}, "prompt_sha1": "79d8c437586f2bdb091b3b3592125951a7bad85d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 401, and period is 42146 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(401×42146) = 0.710036 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 401, "period": 42146, "hz": 0.7100362319655235}, "prompt_sha1": "631e1675f9efa780303ee2f218922fbe14bef3d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_4` generating a one-clock-cycle `tick` every 4 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_4 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [1:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 3) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_4", "divide": 4}, "prompt_sha1": "629ebab12fe724a0645adc00dae7f2a198ca29b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w19_cin` implementing a 19-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `19-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w19_cin (\n input logic [18:0] a,\n input logic [18:0] b,\n input logic cin,\n output logic [18:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w19_cin", "width": 19, "cin": true}, "prompt_sha1": "00830164c4bb543524308a45132da0e4d079710e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 110001011110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 7 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110001011110", "ones": 7, "parity": 1}, "prompt_sha1": "fef554daf38b9e055cd995323372d9fc485b9413", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 50 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 50×11 = 550. Time = 550/1000000 = 0.00055 s = 0.550000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 7, "parity": 1, "stop": 2, "frames": 50, "seconds": 0.00055}, "prompt_sha1": "70132fbb13bb2151990adc55791ea6d366041320", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2825` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2825 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2825"}, "prompt_sha1": "27cb9cfa0028c4148f348ce9de3e7e8f9a63c79b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_7512` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_7512 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_7512"}, "prompt_sha1": "e35c392f2f456b798b835273e4ea650fcf58d15d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 79.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+24 = 103.5. Period = 103.5/64000000 = 1.6171875e-06 s. Maximum rate = 1/period = 618357.487923 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 79.5, "conv_cycles": 24, "period": 1.6171875e-06, "rate": 618357.4879227054}, "prompt_sha1": "f79a059f4f9e02df377b0b20cdfe058abea4e067", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(20×10^6) s = 12.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 256, "time_us": 12.799999999999999}, "prompt_sha1": "43c924216760bd9c2bcb3ed37d6b5d1a68ed62fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 120 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 120000000/(16×2400) = 3125.000000.\nNearest integer divisor D = 3125.\nActual baud = 120000000/(16×3125) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 120000000, "oversample": 16, "baud": 2400, "divisor": 3125, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "8e284a6b4809c32c1702ed5e6c1538b69e9faf79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `len` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n total += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `samples[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n total += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "829d2da840ff735b0febc4f8bf690d5d66b00722", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.4.101.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.4.101.0\nBroadcast address: 10.4.101.255\nUsable host range: 10.4.101.1 to 10.4.101.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.4.101.0/24", "usable": 254, "first": "10.4.101.1", "last": "10.4.101.254", "broadcast": "10.4.101.255"}, "prompt_sha1": "ae9a65ac5a1e28a35c7338784c566942160f3cf5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.156.220.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.156.220.0\nBroadcast address: 10.156.220.127\nUsable host range: 10.156.220.1 to 10.156.220.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.156.220.0/25", "usable": 126, "first": "10.156.220.1", "last": "10.156.220.126", "broadcast": "10.156.220.127"}, "prompt_sha1": "d5f018edac737122cf3860cdd5c9c3cb41598b3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 2 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×2/(2.4×10^9) = 0.166666667 s = 166.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 2.0, "ghz": 2.4, "sec": 0.16666666666666666}, "prompt_sha1": "1fc0e6b8c6f978433ed3b800245c7a3c656d0f3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 011010001110100101000110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 11 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011010001110100101000110", "ones": 11, "parity": 1}, "prompt_sha1": "7b028d20fbb38a5add4c06ecf1235ce657b190d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x81411A2090CA in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: CA 90 20 1A 41 81.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 142116611199178, "endian": "little", "bytes": [202, 144, 32, 26, 65, 129]}, "prompt_sha1": "70e1c4e293c7ae26813826b78d6f2e0adac299ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(40×10^6) s = 12.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 512, "time_us": 12.799999999999999}, "prompt_sha1": "730f0fe4e3bb91c2321b2a1a9509d18cc7c574e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x46, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x46<<1)|0 = 0x8C = 10001100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 70, "rw": 0, "byte": 140}, "prompt_sha1": "01bd1af1fc8e65a5917514b39246abba50c79351", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 10 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-05×3.3²=5.445e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-06, "v": 3.3, "energy": 5.444999999999999e-05}, "prompt_sha1": "99b352e55b2817a2856cd3668f84dabe8b7e57a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-32 = 1368 bytes.\nRound down to an 8-byte multiple: floor((1368)/8)×8 = 1368 bytes.\nFragments required = ceil(2000/1368) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 32, "payload": 2000, "max_payload": 1368, "fragments": 2}, "prompt_sha1": "3f27e57d9f8b70716a3954ada9505a364bc42929", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x12_write_bypass` with 4 entries of 12 bits. Inputs: `clk`, `we`, `2-bit waddr`, `12-bit wdata`, `2-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [11:0] wdata,\n input logic [1:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x12_write_bypass", "entries": 4, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "a93f6a99fd47f689013817b47f22d9d935c5ff49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 160.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+8 = 168.5. Period = 168.5/10000000 = 1.685e-05 s. Maximum rate = 1/period = 59347.181009 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 160.5, "conv_cycles": 8, "period": 1.685e-05, "rate": 59347.18100890208}, "prompt_sha1": "218d70e12178f8cc4811a7c1cf13bc3ac2a50b7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3414289028, carries 5669 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5669+0+0 = 5669. ACK = (3414289028+5669) mod 2^32 = 3414294697.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3414289028, "payload": 5669, "syn": 0, "fin": 0, "ack": 3414294697}, "prompt_sha1": "2950180c805c8bf9c550e5db2fb7a926746e335b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNNNNTNTTNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0], "final_state": 1}, "prompt_sha1": "8dcc65838db0c54ed194c6fa2c88116f010670a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(4000/968) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 4000, "max_payload": 968, "fragments": 5}, "prompt_sha1": "535c3936e12e867294638bac72f209d9d55b5ab7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_271427` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_271427 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_271427"}, "prompt_sha1": "cd5960de2e9e90744cbff52b89cdede9b2c65ae3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 120 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 120000000/(4×2400) = 12500.000000.\nNearest integer divisor D = 12500.\nActual baud = 120000000/(4×12500) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 120000000, "oversample": 4, "baud": 2400, "divisor": 12500, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "fdfe0a9dc83dd69bd14d5b0bae8384a9942f6396", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1110110011 using generator polynomial bits 11011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 27, "msg_bits": 10, "msg": 947, "remainder": 4}, "prompt_sha1": "b8a99f10d92ccd703a1e1c71dc07bd840abca46a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 41 elements. Review loop `for i in range(41+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(41+1)` includes index 41, which is out of range for a length-41 sequence. Correct loop: `for i in range(41):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 41, "variant": "one_past"}, "prompt_sha1": "e8d90ad92118a68e4e9d8ad224ab136d9cd4aa20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 14-bit up/down counter `updown_14_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_14_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [13:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 14'd16383) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_14_sat", "width": 14, "wrap": false}, "prompt_sha1": "b9cc846f4a413e28ba87389cbc18e633067562cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_33_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 33 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_33_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd33;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_33_ignore", "cycles": 33, "retrigger": false}, "prompt_sha1": "c4405a0b1f74801f700ab6a4521f0acbbd300772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 124; x = x + 263;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 124+263 = 387. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (387) mod 2^8 = 131. So `x` stores 131. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 124, "add": 263, "result": 131}, "prompt_sha1": "05081ec74d5b43c11e1292ea1b250ea61ba4e3f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6F, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x6F<<1)|1 = 0xDF = 11011111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 111, "rw": 1, "byte": 223}, "prompt_sha1": "3da5976e53efd4e8a98ed04c28250d2bc91be870", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(32×10^6) s = 64.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 2048, "time_us": 64.0}, "prompt_sha1": "052e4b6f5dfc6649b46b9b605bf787bfb98ad2a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=100 ms, C=3 ms,T=5 ms, C=2 ms,T=100 ms, C=4 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/100 + 3/5 + 2/100 + 4/10 = 1.040000 = 104.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 100], [3, 5], [2, 100], [4, 10]], "utilization": 1.04}, "prompt_sha1": "f46611643c52d2e345bae2486ff59accd153145a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6848` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6848 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6848"}, "prompt_sha1": "391984001c684cf7685f912ec3240334c196f641", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_2955` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_2955 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_2955"}, "prompt_sha1": "42ba43ab1aaf00224e68ad45f50b9a5ef0321849", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_63` for a 63-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_63 (\n input logic [62:0] data,\n input logic [5:0] shamt,\n output logic [62:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_63", "width": 63, "direction": "right", "arithmetic": false}, "prompt_sha1": "706e4fce4a9a7a586e5663023e2f729dd94fd16d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 91.7% hit rate, and a 100 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.917 = 0.083.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.083×100 ns = 10.0500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.917, "penalty": 100, "result": 10.049999999999997}, "prompt_sha1": "081461ccdd59144aecc36e5ba99719a9cd9c8543", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65388; x = x + 586;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65388+586 = 65974. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65974) mod 2^16 = 438. So `x` stores 438. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65388, "add": 586, "result": 438}, "prompt_sha1": "e5b875b69f964c9e37df20d88bdec95a445ec674", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 72 and initial occupancy is 40. In an abstract batch, producer attempts to enqueue 86 items first, dropping any excess beyond capacity; then consumer removes up to 12 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=72, dropped=54; consumed=12; final occupancy=60.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 72, "start": 40, "prod": 86, "cons": 12, "dropped": 54, "consumed": 12, "final": 60}, "prompt_sha1": "7a21c5db2901e166e103610b620898c32c8962d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTNNTTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 0, 0, 1, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "a85917e58df6b7d87b38f098c934863297a688ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_12_59_16` with RED, GREEN, YELLOW states. Hold RED for 12 clock cycles, GREEN for 59, and YELLOW for 16; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_12_59_16 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 11) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 58) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 15) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_12_59_16", "red": 12, "green": 59, "yellow": 16}, "prompt_sha1": "3d9accdb38184219d4226285ab18317902e3813b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_47_lsb` for `47-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_47_lsb (\n input logic [46:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 46; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_47_lsb", "width": 47, "priority": "low"}, "prompt_sha1": "353d150e6ff1f032db2541d2f7b6398bebc5402c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 4804 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×4804/(16×10^6) = 0.30025 = 30.025000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 1000, "cycles": 4804, "load": 0.30025}, "prompt_sha1": "e307723f4fae9282c72a0b9598220274a37e285e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock B then QUEUE; consumer acquires QUEUE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds B while waiting for QUEUE, while consumer holds QUEUE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "81c43710bd09cb6101c5724a7b7c573867306b04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-32 = 1368 bytes.\nRound down to an 8-byte multiple: floor((1368)/8)×8 = 1368 bytes.\nFragments required = ceil(4000/1368) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 32, "payload": 4000, "max_payload": 1368, "fragments": 3}, "prompt_sha1": "e6268780f93879e0f2e7f334037a1edf4ab12318", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 25000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 25000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 25000}, "prompt_sha1": "399fcfd491234cdff1359df8b015345b1d5cc17d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 45-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^45/2^16 = 2^29 = 536870912 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 45, "page_exp": 16, "entries": 536870912}, "prompt_sha1": "c14bc92c4cd2f4890abbffcbeb752f68478c7f87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 1 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×2×10^6 = 2000000 B/s. Time = 1048576/2000000 = 0.524288 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 1, "rate_mhz": 2, "sec": 0.524288}, "prompt_sha1": "253030c64c09d6c6ef4f553f6c787ada021f20c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x5C4ADE in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 5C 4A DE.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 6048478, "endian": "big", "bytes": [92, 74, 222]}, "prompt_sha1": "7fef6160bfa325c3f8f371be5a092be51d52dec9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 99.2% hit rate, and a 135 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.992 = 0.008.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.008×135 ns = 5.0800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.992, "penalty": 135, "result": 5.080000000000001}, "prompt_sha1": "1ebdd0b703817e28d742c3d87c3dd4265ef49751", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m7370` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 7370 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m7370 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd7370;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m7370", "width": 13, "max": 7370}, "prompt_sha1": "9541bdb3c12f4dbfd2d0309e4d5651d28b9c026a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×40/1000/8 = 50000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 40, "bytes": 50000000.0}, "prompt_sha1": "57b1d9468af7b90e5129387bd4261c68dcc96133", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w53_cin` implementing a 53-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `53-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w53_cin (\n input logic [52:0] a,\n input logic [52:0] b,\n input logic cin,\n output logic [52:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w53_cin", "width": 53, "cin": true}, "prompt_sha1": "c2e92e537efbd76548a15a16c414d5fc922a01ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 2000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×2000×10^6×8 = 64.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 2000, "channels": 8, "gbps": 64.0}, "prompt_sha1": "0847c7f9366f42910fa945af62405e6099263853", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "V", "V", "P", "P", "P", "V", "P", "V", "P", "V", "V", "P", "P", "V", "P", "V"], "value": 7, "blocked": 0}, "prompt_sha1": "7596004faea3b8fe05e4f05c506327f284e034da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 4-way set-associative cache uses 16-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/16 = 16384.\nSets = 16384/4 = 4096.\nOffset bits = log2(16) = 4; index bits = log2(4096) = 12; tag bits = 64-4-12 = 48.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 16, "ways": 4, "addr_bits": 64, "lines": 16384, "sets": 4096, "offset": 4, "index": 12, "tag": 48}, "prompt_sha1": "ba801b1a0ded29563d28dedc0a3efe67e5b17d0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_47` for a 47-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_47 (\n input logic signed [46:0] data,\n input logic [5:0] shamt,\n output logic signed [46:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_47", "width": 47, "direction": "right", "arithmetic": true}, "prompt_sha1": "04058c5b10b2cc6429361abc952e3ea67e3c8c58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_580540` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_580540 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_580540"}, "prompt_sha1": "b1104278ce35daa5c700246ec3f506bd5d6427a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.25 ns hit time, 93.8% hit rate, and a 130 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.938 = 0.062.\nAMAT = hit time + miss rate × miss penalty\n= 2.25 ns + 0.062×130 ns = 10.3100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.25, "hit_rate": 0.938, "penalty": 130, "result": 10.310000000000008}, "prompt_sha1": "7102027d9c7a8e0f7d3c8aa2610391e377e5826c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×5/1000/8 = 3125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 5, "bytes": 3125000.0}, "prompt_sha1": "f62634cde404ec1399389cc6b52ffef83af913b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 14-bit right-shift register module `shiftreg_right_14`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `14-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_14 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [13:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[13:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_14", "width": 14, "direction": "right"}, "prompt_sha1": "d1a15ab3ca9552006eaaf9d9f4e03bd8dbdbad50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+64) = 0.714286 = 71.43%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 64, "efficiency": 0.7142857142857143}, "prompt_sha1": "91ce6b1c3d4dcaa25037cb2ff2579a1309898da0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w9_cin` implementing a 9-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `9-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w9_cin (\n input logic [8:0] a,\n input logic [8:0] b,\n input logic cin,\n output logic [8:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w9_cin", "width": 9, "cin": true}, "prompt_sha1": "af89588cbed17f91c76ae6495dffe80ab27597c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xBE2044BF. Extract the 6-bit field starting at bit 23 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xBE2044BF >> 23) & 0x3F = 0x3C (60).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 23, "value": 3189785791, "mask": 63, "field": 60}, "prompt_sha1": "79abec1c1bad8dc7a1f7fa550df6f7dcfe933991", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 3.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+24 = 27.5. Period = 27.5/8000000 = 3.4375e-06 s. Maximum rate = 1/period = 290909.090909 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 3.5, "conv_cycles": 24, "period": 3.4375e-06, "rate": 290909.0909090909}, "prompt_sha1": "7c92595f0ddfff071adbc775c0ed5c814437234d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 869, and period is 14636 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(869×14636) = 0.628996 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 869, "period": 14636, "hz": 0.6289958929713169}, "prompt_sha1": "b72ad6cdc42fb16f0cfab74de9a647098e6f7401", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 25-bit up/down counter `updown_25_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_25_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [24:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 25'd33554431) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_25_sat", "width": 25, "wrap": false}, "prompt_sha1": "e72e370820d88c6821aa445b2b441c6fb61da563", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 1280 = 896. Verification: 896/1280 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 70, "high": 896}, "prompt_sha1": "e9fd9bd3473b22685da0af2c68bda0c79efcb76d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 8 = 3.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 8, "spi_hz": 3000000.0}, "prompt_sha1": "4233a2546028cbb8d6e928afc488b3164f8c9ca4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 3` on one shared integer without synchronization. Assume `items` initially equals 411. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 411; T2 reads 411; both compute 414; T1 writes 414; T2 writes 414. The observed final value is 414, but two serial increments would produce 417.\n\n```\nlock(mutex)\nitems = items + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "b370273283534327463a5d3eccdf8edc76c993d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 011001000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011001000", "ones": 3, "parity": 1}, "prompt_sha1": "e10e7783e362ad33d81a694fc4e09701ea0b060a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=4.7 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/4.7 = -1.000000.\nVout = A_v×Vin = -1.000000×1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 4.7, "vin": 1.0, "gain": -1.0, "vout": -1.0}, "prompt_sha1": "6add6e783e4813aed2a984ffa68f30694b49b01c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_6701` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_6701 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_6701", "width": 4}, "prompt_sha1": "8add9da063d4839e68eba828a6b97c46bf57e4d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2820-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2820×8 = 22560 bits.\nSerialization delay = bits/rate = 22560/(2500×10^6) s = 9.024e-06 s = 9.024000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2820, "rate_mbps": 2500, "delay_s": 9.024e-06}, "prompt_sha1": "c0b1775ef9aed3740c8f14393375a6e4f0a104ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 4-way set-associative cache uses 256-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/256 = 128.\nSets = 128/4 = 32.\nOffset bits = log2(256) = 8; index bits = log2(32) = 5; tag bits = 52-8-5 = 39.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 256, "ways": 4, "addr_bits": 52, "lines": 128, "sets": 32, "offset": 8, "index": 5, "tag": 39}, "prompt_sha1": "77978e65d2f0d0c3cc8c6183535e06b232493ab2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 23-bit up/down counter `updown_23_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_23_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [22:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 23'd8388607) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_23_sat", "width": 23, "wrap": false}, "prompt_sha1": "5f6a4504439bf1871e849503bc76e4ded083aec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.90. Using Amdahl's law, compute the theoretical speedup on 256 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.90) + 0.90/256) = 9.660377.\nThe theoretical speedup is about 9.660×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.9, "n": 256, "result": 9.66037735849057}, "prompt_sha1": "3f0cbfc3ab6f088ba9547d5966cfd5cb460ee3d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=1 nF and is stepped to 9 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=9(1-e^-2)=7.781982 V; τ=4.7e-06 s and t=9.4e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1e-09, "multiple": 2, "vin": 9, "vc": 7.781982450870486}, "prompt_sha1": "5abd1f8eeaff02a2be33fed77211d1a1de0842cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=82000 ohm and C=680000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=82000×680000×10^-12 s = 0.05576 s.\nf_c=1/(2πRC)=1/(2π×82000×680000×10^-12) = 2.8543 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 82000, "c_f": 6.8e-07, "tau": 0.05576, "fc": 2.8542852060956845}, "prompt_sha1": "d50c206d67aacad2cee12441c7547a075b316d8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_21_lsb` for `21-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_21_lsb (\n input logic [20:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 20; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_21_lsb", "width": 21, "priority": "low"}, "prompt_sha1": "e90fbeee42f5e44dddbe53dae385d681f06ad0d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_157` generating a one-clock-cycle `tick` every 157 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_157 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 156) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_157", "divide": 157}, "prompt_sha1": "d17614a330b891af3dce9d9ebc335366ad73dbe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `len` elements of type `float`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n total += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `table[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n total += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "4fbfe03c0208cc0e35eb4660e0237f50d4f04585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['V', 'V', 'P', 'P', 'V', 'P', 'P', 'P', 'P', 'V', 'P', 'P', 'P', 'P', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 5 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["V", "V", "P", "P", "V", "P", "P", "P", "P", "V", "P", "P", "P", "P", "P", "P", "V"], "value": 0, "blocked": 5}, "prompt_sha1": "a3acdd03149eb72e49243317f38cc59adeb8e737", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.95. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.95) + 0.95/32) = 12.549020.\nThe theoretical speedup is about 12.549×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.95, "n": 32, "result": 12.54901960784313}, "prompt_sha1": "8fd605770764c5fd986218b0f17a3eaed5d88eaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/220=0.00909090909 A. P=V²/R=2²/220=0.0181818182 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 220, "i": 0.00909090909090909, "p": 0.01818181818181818}, "prompt_sha1": "f9afeb030819330b6066a6b4eb70378cbcac10bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 1` on one shared integer without synchronization. Assume `requests` initially equals 498. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 498; T2 reads 498; both compute 499; T1 writes 499; T2 writes 499. The observed final value is 499, but two serial increments would produce 500.\n\n```\nlock(mutex)\nrequests = requests + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "57f9efdc16fbae016bc03eb2fe33b7438bf1d864", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 5%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.050 × 5 = 0.050000.\nEffective CPI = 1.2 + 0.050000 = 1.250000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.05, "penalty": 5, "result": 1.25}, "prompt_sha1": "54a586f76c2260fb38cf2e70ad174a11621ff394", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×64 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 64, "reach": 16777216}, "prompt_sha1": "270b4bd44e8f2cb146a1831859ac5f1289cd02e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_128439` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_128439 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_128439"}, "prompt_sha1": "84719092a07ce94fc547a6826827e74b5f9e5e75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11010010100100101001000 using generator polynomial bits 1111. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 15, "msg_bits": 23, "msg": 6900040, "remainder": 7}, "prompt_sha1": "ac6c2fe6e19418ab18ad38487178055a0c900c7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_53` generating a one-clock-cycle `tick` every 53 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_53 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 52) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_53", "divide": 53}, "prompt_sha1": "7c005a1f45822cd5f3e30cbba678c9a381e6116c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 100 MHz, prescaler divisor is 608, and period is 5637 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 100000000/(608×5637) = 29.177521 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 100000000, "prescaler": 608, "period": 5637, "hz": 29.177520704368693}, "prompt_sha1": "eb9978b357bad5f0b5419ed1c92e5bb4cb888f34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 48165 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 48165/10000000 s; frequency = 10000000/48165 = 207.619641 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 48165, "hz": 207.6196408180214}, "prompt_sha1": "184ff9aac5540349fd5ecdd3d7f491000c11c8bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 800 elements. Review loop `for i in range(800+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(800+1)` includes index 800, which is out of range for a length-800 sequence. Correct loop: `for i in range(800):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 800, "variant": "one_past"}, "prompt_sha1": "d2b72e9d83ffc71bd99a95844d6e1ab1e271078b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3472` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3472 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3472"}, "prompt_sha1": "fd1d4e8b0101e52a866e7f10baca0d446534243c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 91 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 91/(91+40+8) = 0.654676 = 65.47%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 91, "iphdr": 40, "eff": 0.6546762589928058}, "prompt_sha1": "4d9a4492533ae18f0daa35a25cbd2006ef4df3bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_72` for a synchronous sampled input `noisy`. Update output `clean` only after observing 72 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_72 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 71) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_72", "stable_samples": 72}, "prompt_sha1": "912d1c0c12aef08904602a92baca7dbd17c5600e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9293` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9293 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9293"}, "prompt_sha1": "3ea34e04c0f5188eb8cf3a72497112da51cb2828", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (1500×8) = 208333.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 1500, "pps": 208333.33333333334}, "prompt_sha1": "ea0a4d85b78988b121087c16e1ab499247158796", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.24.56.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.24.56.0\nBroadcast address: 10.24.56.63\nUsable host range: 10.24.56.1 to 10.24.56.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.24.56.0/26", "usable": 62, "first": "10.24.56.1", "last": "10.24.56.62", "broadcast": "10.24.56.63"}, "prompt_sha1": "47824a72836efa8c425a79fe8e0a426626dbd55c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.75 ns hit time, 94.5% hit rate, and a 35 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.945 = 0.055.\nAMAT = hit time + miss rate × miss penalty\n= 3.75 ns + 0.055×35 ns = 5.6750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.75, "hit_rate": 0.945, "penalty": 35, "result": 5.675000000000002}, "prompt_sha1": "9dcd5445b8b3add3ae66de73ac7480f7211696ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.75 ns hit time, 89.4% hit rate, and a 110 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.894 = 0.106.\nAMAT = hit time + miss rate × miss penalty\n= 2.75 ns + 0.106×110 ns = 14.4100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.75, "hit_rate": 0.894, "penalty": 110, "result": 14.409999999999998}, "prompt_sha1": "335f1d738594d5c0de71a759726b366aba355dd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^15 = 2^19 = 524288 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 15, "entries": 524288}, "prompt_sha1": "d66f76358f8969bce123d35435f3b899b7ff72ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x24, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x24<<1)|1 = 0x49 = 01001001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 36, "rw": 1, "byte": 73}, "prompt_sha1": "1a12e2d8203542503635246804eadde60b9db0c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3027 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "ee404e51f4d13520517d61b502ef9f7b9a5b2bca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×5²=0.00125 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 5, "energy": 0.00125}, "prompt_sha1": "47ebf4a6deb16de1b2227930d6ca8fe02caed6de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 40 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 40 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 40}, "prompt_sha1": "31b836b9629555bbbe3081b61cf40fcb4c3a06b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 16-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/16 = 4096.\nOffset bits = log2(16) = 4.\nIndex bits = log2(4096) = 12.\nTag bits = 52-12-4 = 36.\nCheck: 36+12+4 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 16, "addr_bits": 52, "lines": 4096, "offset_bits": 4, "index_bits": 12, "tag_bits": 36}, "prompt_sha1": "bc81fee07187362a7af6d57f3eb5bee3a3ce3a89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x20_write_bypass` with 32 entries of 20 bits. Inputs: `clk`, `we`, `5-bit waddr`, `20-bit wdata`, `5-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x20_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [19:0] wdata,\n input logic [4:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x20_write_bypass", "entries": 32, "width": 20, "mode": "write_bypass"}, "prompt_sha1": "ca9034fb6964284c298160c5a9c4d52024700908", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [30, 6, 20, 18, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [94, 26, 78, 80, 84].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [30, 6, 20, 18, 20], "finish": [94, 26, 78, 80, 84]}, "prompt_sha1": "04a37e57da30bbb4f000c48f16e2f6f532aab2dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-28 = 1372 bytes.\nRound down to an 8-byte multiple: floor((1372)/8)×8 = 1368 bytes.\nFragments required = ceil(6000/1368) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 28, "payload": 6000, "max_payload": 1368, "fragments": 5}, "prompt_sha1": "d1aeb56c095ebe48d26acb62bd59b8f5454c1f2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_888219` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_888219 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_888219"}, "prompt_sha1": "a239081b833e25376338470188aacb99919e6cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x2C, set bit 0 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 0)`. Result = 0x2D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 44, "bit": 0, "op": "set", "result": 45}, "prompt_sha1": "c348b865db212efedc5a8aa00217d884682d696a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 3 and tail index 3, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (3-3) mod 8 = 0. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 3, "tail": 3, "occupancy": 0}, "prompt_sha1": "cfe64b7bcf466804c5a851d16059588c0787fb29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/22=0.409090909 A. P=V²/R=9²/22=3.68181818 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 22, "i": 0.4090909090909091, "p": 3.6818181818181817}, "prompt_sha1": "31379271b37543355706691774b9eb70ad218f03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-40 = 1360 bytes.\nRound down to an 8-byte multiple: floor((1360)/8)×8 = 1360 bytes.\nFragments required = ceil(5000/1360) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 40, "payload": 5000, "max_payload": 1360, "fragments": 4}, "prompt_sha1": "f003a4530ebe2885da6a544ce9d895e13dd427a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_85` generating a one-clock-cycle `tick` every 85 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_85 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 84) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_85", "divide": 85}, "prompt_sha1": "0244759ab421260e98815806c6ac024622c3af54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_31_lsb` for `31-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_31_lsb (\n input logic [30:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 30; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_31_lsb", "width": 31, "priority": "low"}, "prompt_sha1": "1288eed13f87ce2873d77063a0da43715430f9a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock RX then DMA; T2 acquires DMA then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds RX while waiting for DMA, while T2 holds DMA while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DMA before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "e3bff1b6af998b7a7b384f9f117e496dac7b721c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 44391 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 44391/10000000 s; frequency = 10000000/44391 = 225.270888 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 44391, "hz": 225.27088824311235}, "prompt_sha1": "80cb3998274de9ace7abafc7a7b85a62be5700df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 72 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 72000000/500 = 144000.\nWith prescaler divisor limited to at most 64, the largest divisor of 144000 that also keeps the period count within 16 bits is 64.\nPeriod count = 144000/64 = 2250.\nPSC register = 64-1 = 63.\nARR register = 2250-1 = 2249.\nVerification: 72000000/(64×2250) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 72000000, "target_hz": 500, "total_division": 144000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 2250, "psc_reg": 63, "arr_reg": 2249}, "prompt_sha1": "15f8eade559c00af3f419b0e501984cf81a896f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^23 V = 5.96046447754e-07 V = 0.596046 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 5.0, "step": 5.960464477539062e-07}, "prompt_sha1": "a40f80ce879b8e8bcd41d2c94594d733eec01f36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 0.75 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×0.75/(1.2×10^9) = 0.00125 s = 1.250000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 0.75, "ghz": 1.2, "sec": 0.00125}, "prompt_sha1": "c3b2a29e71537c7401ce71f911f13134afac1f1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3840(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3840(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3840([1, 2]) == 1.5\nassert mean_3840([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3840"}, "prompt_sha1": "ae8559c332f41102e31a4ed90eca4a39d7dfbfd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 64 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 64 = 16. Verification: 16/64 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 64, "duty": 25, "high": 16}, "prompt_sha1": "8d6d1c1156724e336b267ee677de421da9e70361", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_3_38_18` with RED, GREEN, YELLOW states. Hold RED for 3 clock cycles, GREEN for 38, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_3_38_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 2) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_3_38_18", "red": 3, "green": 38, "yellow": 18}, "prompt_sha1": "0f9fc517085824ecda7314ba9325fa61b913dfc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967108; x = x + 651;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967108+651 = 4294967759. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967759) mod 2^32 = 463. So `x` stores 463. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967108, "add": 651, "result": 463}, "prompt_sha1": "5edf8a4d5ee11601a5b98826acad87f10583eae4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=100 ms, C=2 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/100 + 2/10 = 0.250000 = 25.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 100], [2, 10]], "utilization": 0.25}, "prompt_sha1": "83339ca3e49164057979523e34f202620285573d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×64 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 64, "reach": 134217728}, "prompt_sha1": "348e811ccd3efb35e7115b765e8820e2f3e57200", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×300/1000/8 = 1500000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 300, "bytes": 1500000000.0}, "prompt_sha1": "2eacf1b295b8499069c8556742c35687d4095689", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 10010001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "10010001", "ones": 3, "parity": 1}, "prompt_sha1": "c5de720ab52c5b4f091537dc5fc8b538af8d81b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w40_signed` comparing two 40-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w40_signed (\n input logic signed [39:0] a,\n input logic signed [39:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w40_signed", "width": 40, "signed": true}, "prompt_sha1": "75fdd90134118c316b5f56014dff569f1dd03b1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1492 bytes, IP header 40 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-40-20 = 1432 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 40, "tcphdr": 20, "mss": 1432}, "prompt_sha1": "88988c5e4a944cf5baae0baefaa806fd8d519750", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111011 using generator polynomial bits 10101. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 21, "msg_bits": 6, "msg": 59, "remainder": 1}, "prompt_sha1": "c1e68c5b64c7609b090e48cab2d5d04ce1c30c3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 803 elements. Review loop `for i in range(803+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(803+1)` includes index 803, which is out of range for a length-803 sequence. Correct loop: `for i in range(803):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 803, "variant": "one_past"}, "prompt_sha1": "33b4ace086db53618e78958a274ccaaf6abdde7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-20 = 1480 bytes.\nRound down to an 8-byte multiple: floor((1480)/8)×8 = 1480 bytes.\nFragments required = ceil(4000/1480) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 20, "payload": 4000, "max_payload": 1480, "fragments": 3}, "prompt_sha1": "8ad9f8bc5667faedae8e7f800cca178f219d7491", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xEA95, toggle bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 8)`. Result = 0xEB95.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 60053, "bit": 8, "op": "toggle", "result": 60309}, "prompt_sha1": "149a28aac6050df7790b84ee96ac30333250af20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=470 nF and is stepped to 12 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=12(1-e^-3)=11.402555 V; τ=0.0047 s and t=0.0141 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 4.7000000000000005e-07, "multiple": 3, "vin": 12, "vc": 11.402555179585633}, "prompt_sha1": "3d62ee39f168c044a1edd913e25f0a7a79b4295b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 28-bit up/down counter `updown_28_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_28_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [27:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_28_wrap", "width": 28, "wrap": true}, "prompt_sha1": "821c1faf6c954cdce5d791c53a0c3c2dd9296969", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 17 elements. Review loop `for i in range(17+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(17+1)` includes index 17, which is out of range for a length-17 sequence. Correct loop: `for i in range(17):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 17, "variant": "one_past"}, "prompt_sha1": "0fa0ffd2274db559fa2a7ea665e5ebc272be90aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 64 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 64 = 66.\nClock pulses = 66×9 = 594.\nTime = 594/100000 s = 5940.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 64, "clocks": 594, "time_s": 0.00594}, "prompt_sha1": "bbb864f6c5bc539d54e4162d039f54d47bfa172d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(24×10^6) s = 85.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 2048, "time_us": 85.33333333333334}, "prompt_sha1": "07c9e21b6c922e5460dfed67d1384be2b9371985", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3873(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3873(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3873([1, 2]) == 1.5\nassert mean_3873([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3873"}, "prompt_sha1": "9f87f852a81d8a052e38334ba2c7ed5c629bb874", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2104-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2104×8 = 16832 bits.\nSerialization delay = bits/rate = 16832/(5000×10^6) s = 3.3664e-06 s = 3.366400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2104, "rate_mbps": 5000, "delay_s": 3.3664e-06}, "prompt_sha1": "a243031ce15e322b97a08b5237883e65140e91a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 47168. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 47168/65535 × 3.3 V = 2.375134 V.\nThus the estimated input is about 2.3751 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 47168, "volts": 2.3751338979171432}, "prompt_sha1": "111b878fbaa823da8af7bf03308f708e3cab3f84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 483 elements. Review loop `for i in range(483+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(483+1)` includes index 483, which is out of range for a length-483 sequence. Correct loop: `for i in range(483):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 483, "variant": "one_past"}, "prompt_sha1": "1af8431de169c5e4e0e5c178f4a42312078ef4fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x16. Extract the 4-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x16 >> 1) & 0xF = 0xB (11).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 1, "value": 22, "mask": 15, "field": 11}, "prompt_sha1": "76dd65aa750c511a4c70ceab4ca2e665a80b122d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x8, clear bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 5)`. Result = 0x8.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 8, "bit": 5, "op": "clear", "result": 8}, "prompt_sha1": "59d73c36513cb3e636af67cf2b23de8b4f7d7371", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 50 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 50×10^6×0.1/1000/8 = 625.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "rtt_ms": 0.1, "bytes": 625.0}, "prompt_sha1": "f5ae63db446328414b3087c6c7e66b2b0824ad31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111100001110001100111 using generator polynomial bits 100111101. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01110100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 317, "msg_bits": 21, "msg": 1973351, "remainder": 116}, "prompt_sha1": "3716c91ff2248cbc20dc7cb0ab71e5d62e1c8be9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `items` elements of type `double`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n result += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `words[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n result += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ab7ae86f58c600460aee4c1de3fb1167b9eac0ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(32×10^6) s = 0.250000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 8, "time_us": 0.25}, "prompt_sha1": "2c0e6afcdb7e9c699fdc8881d8412f73205ad138", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 64 KiB cache with 32-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "03e47c9352bb131b84c631208dea2a3520aaa5bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 128-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/128 = 128.\nOffset bits = log2(128) = 7.\nIndex bits = log2(128) = 7.\nTag bits = 40-7-7 = 26.\nCheck: 26+7+7 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 128, "addr_bits": 40, "lines": 128, "offset_bits": 7, "index_bits": 7, "tag_bits": 26}, "prompt_sha1": "165f813800cdf69f7b99702938b1056999ef4699", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3.3 V reference and returns code 86. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 86/255 × 3.3 V = 1.112941 V.\nThus the estimated input is about 1.1129 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.3, "code": 86, "volts": 1.1129411764705883}, "prompt_sha1": "7effb4e552a33133cda4f68fa324c4f0cfe2ef97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 800 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 800 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 800}, "prompt_sha1": "c7d3d660deb26094bdbc55fc2886704183572fe6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m63` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 63 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m63 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd63;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m63", "width": 6, "max": 63}, "prompt_sha1": "0b1a064b7b554dfb34eb3587a012eceb6a394784", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 33 and tail index 43, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (33-43) mod 64 = 54. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 33, "tail": 43, "occupancy": 54}, "prompt_sha1": "0999248e4f70a9ed686b28036a3ace78ed9a8cec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 16-way set-associative cache uses 128-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/128 = 64.\nSets = 64/16 = 4.\nOffset bits = log2(128) = 7; index bits = log2(4) = 2; tag bits = 52-7-2 = 43.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 128, "ways": 16, "addr_bits": 52, "lines": 64, "sets": 4, "offset": 7, "index": 2, "tag": 43}, "prompt_sha1": "cd05715aba799c999bff69be46418d1d16baff6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=50 ms, C=4 ms,T=100 ms, C=1 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/50 + 4/100 + 1/25 = 0.120000 = 12.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 50], [4, 100], [1, 25]], "utilization": 0.12}, "prompt_sha1": "ef6de06499c41c6c10b33c986904ac0c2e075d55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 60 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 60 = 62.\nClock pulses = 62×9 = 558.\nTime = 558/100000 s = 5580.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 60, "clocks": 558, "time_s": 0.00558}, "prompt_sha1": "3f4e2a44c6652042677e4f9a7d8cca629bc2f465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-24 = 976 bytes.\nRound down to an 8-byte multiple: floor((976)/8)×8 = 976 bytes.\nFragments required = ceil(8000/976) = 9.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 24, "payload": 8000, "max_payload": 976, "fragments": 9}, "prompt_sha1": "c0fe4647524840937d323719eee3f134d783c212", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1519504891, carries 3608 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 3608+1+0 = 3609. ACK = (1519504891+3609) mod 2^32 = 1519508500.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1519504891, "payload": 3608, "syn": 1, "fin": 0, "ack": 1519508500}, "prompt_sha1": "8e122e0f25c7147916b4448d650b295c95e2dded", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.129.161.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.129.161.0\nBroadcast address: 10.129.161.127\nUsable host range: 10.129.161.1 to 10.129.161.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.129.161.0/25", "usable": 126, "first": "10.129.161.1", "last": "10.129.161.126", "broadcast": "10.129.161.127"}, "prompt_sha1": "110f51d0462f0d243e9003672ce499a77b7c0e82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 24 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 24000000/(16×4800) = 312.500000.\nNearest integer divisor D = 312.\nActual baud = 24000000/(16×312) = 4807.692 baud.\nError = (4807.692-4800)/4800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 24000000, "oversample": 16, "baud": 4800, "divisor": 312, "actual": 4807.692307692308, "error_pct": 0.1602564102564088}, "prompt_sha1": "14c52a0d33d4e2c2bfb70ee89d851262289fdc5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 14 and tail index 6, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (14-6) mod 16 = 8. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 14, "tail": 6, "occupancy": 8}, "prompt_sha1": "68180f820049c4d949a67c32128092a0d9151708", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 0.75 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×0.75/(3.5×10^9) = 0.0214285714 s = 21.428571 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 0.75, "ghz": 3.5, "sec": 0.02142857142857143}, "prompt_sha1": "1d2c749b4eac20e3b946115e152a2ca55a71900b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 60 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×60/1000/8 = 750000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 60, "bytes": 750000.0}, "prompt_sha1": "12af35448e2ac45e748f8f71260e84723e006cd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0B, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x0B<<1)|0 = 0x16 = 00010110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 11, "rw": 0, "byte": 22}, "prompt_sha1": "e1289fd25b3eec62b689587d9e6b90e87a6abaa1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 200 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 200 MHz / 64 = 3.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 200000000.0, "divider": 64, "spi_hz": 3125000.0}, "prompt_sha1": "da52388ea122434b4443ef2f3f55712ff67f3de6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 2 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×20×10^6 = 40000000 B/s. Time = 8192/40000000 = 0.0002048 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 2, "rate_mhz": 20, "sec": 0.0002048}, "prompt_sha1": "d9a35f53f55d6b2cf726db4589bfbcd21e143e8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "d16ef956ff4779a0debab6d29bceb5067a4f768e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 16-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/16 = 32768.\nOffset bits = log2(16) = 4.\nIndex bits = log2(32768) = 15.\nTag bits = 64-15-4 = 45.\nCheck: 45+15+4 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 16, "addr_bits": 64, "lines": 32768, "offset_bits": 4, "index_bits": 15, "tag_bits": 45}, "prompt_sha1": "ad43ab21476d063e833b32d80f05d34398ca81fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 12 = 0.144000.\nEffective CPI = 1.2 + 0.144000 = 1.344000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.08, "penalty": 12, "result": 1.3439999999999999}, "prompt_sha1": "226604394916f35954aadf4ea865c9e06aa7d7c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 59 bits wide and the system uses 64 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 65536 bytes = 2^16 bytes.\nOffset bits = 16.\nVPN bits = 59-16 = 43.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 59, "page_bytes": 65536, "offset_bits": 16, "vpn_bits": 43}, "prompt_sha1": "34f2aed181ad8902abef877464dcf19cc55829f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 1 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×100×10^6 = 100000000 B/s. Time = 256/100000000 = 2.56e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 1, "rate_mhz": 100, "sec": 2.56e-06}, "prompt_sha1": "ee7903438d86f9262f34650c1e6c5fcd40993cf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 19.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+24 = 43.5. Period = 43.5/40000000 = 1.0875e-06 s. Maximum rate = 1/period = 919540.229885 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 19.5, "conv_cycles": 24, "period": 1.0875e-06, "rate": 919540.2298850575}, "prompt_sha1": "25d120052073de53c958ea2d415f11dfaa475377", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 49-bit up/down counter `updown_49_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_49_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [48:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 49'd562949953421311) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_49_sat", "width": 49, "wrap": false}, "prompt_sha1": "d06378e2537c001fc6b3a8e45f76803ba92c4e5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 1583 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×1583/(120×10^6) = 0.0131916667 = 1.319167%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 1000, "cycles": 1583, "load": 0.013191666666666668}, "prompt_sha1": "0b2be2406bb38dbc80e68056bb2da55e9e02547c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=47000 ohm, C=4.7 nF and is stepped to 1 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1(1-e^-0.5)=0.393469 V; τ=0.0002209 s and t=0.00011045 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 47000, "c": 4.700000000000001e-09, "multiple": 0.5, "vin": 1, "vc": 0.3934693402873666}, "prompt_sha1": "1fc7aa5f20f13e6a25447afd58663cad4bbdb41b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['P', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["P", "P", "P", "P", "V", "V", "P", "V", "V", "V", "V", "P", "P", "V", "P", "V", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "af54f49a54db83cebcefbb148fa225988628c858", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 25 and tail index 117, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (25-117) mod 256 = 164. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 25, "tail": 117, "occupancy": 164}, "prompt_sha1": "dec1745e8281c211af9e98ab62f41418e42cbca1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5476-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5476×8 = 43808 bits.\nSerialization delay = bits/rate = 43808/(100×10^6) s = 0.00043808 s = 438.080000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5476, "rate_mbps": 100, "delay_s": 0.00043808}, "prompt_sha1": "6f6be69fea216587879dcaec67461b45f7d0b296", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_7160` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_7160 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_7160"}, "prompt_sha1": "c587b046d30b3740007bfa2e5d81d4bb4cc0c677", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=1 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×22/(1+22) = 22.956522 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 1, "r2": 22, "vout": 22.956521739130434}, "prompt_sha1": "e32c6a0eb6ac68f950f50bc2ce422baf4bfe3e38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_22` for a 22-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_22 (\n input logic signed [21:0] data,\n input logic [4:0] shamt,\n output logic signed [21:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_22", "width": 22, "direction": "right", "arithmetic": true}, "prompt_sha1": "0f5c3439b6cecda831ed87338a1dfbf3b140bb66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×180)/(2200+180) = 166.386555 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 180, "req": 166.38655462184872}, "prompt_sha1": "5b1b5f0b8fc1b0f99c189709b7ea216cc2d3ca93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=47 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/47 = -1.000000.\nVout = A_v×Vin = -1.000000×0.25 = -0.250000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 47, "vin": 0.25, "gain": -1.0, "vout": -0.25}, "prompt_sha1": "48f1d1f17ee4a568d7d2cbc00f668c29e234790a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 4 MHz. Sampling consumes 19.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+8 = 27.5. Period = 27.5/4000000 = 6.875e-06 s. Maximum rate = 1/period = 145454.545455 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 4000000.0, "sample_cycles": 19.5, "conv_cycles": 8, "period": 6.875e-06, "rate": 145454.54545454544}, "prompt_sha1": "6a3d02e88526a701d8f7ca363e7ba3fd56ef54d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 21-bit up/down counter `updown_21_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_21_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [20:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 21'd2097151) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_21_sat", "width": 21, "wrap": false}, "prompt_sha1": "6b344cca7f662472774cde6a0bd76e67f4a2862d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 5317 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 5317/10000 s; frequency = 10000/5317 = 1.880760 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 5317, "hz": 1.880759826970096}, "prompt_sha1": "c8f5407176cf376b2fc6c74d357b7b27fc756adc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 9685544, carries 42766 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 42766+1+1 = 42768. ACK = (9685544+42768) mod 2^32 = 9728312.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 9685544, "payload": 42766, "syn": 1, "fin": 1, "ack": 9728312}, "prompt_sha1": "505b5be301e2b4221dc7c6c907f34fb50db09c7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w32_1929` implementing a dual-clock asynchronous FIFO with depth 4 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w32_1929 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 32,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w32_1929", "depth": 4, "width": 32, "ptr_w": 2}, "prompt_sha1": "2e21365a65e51e386f645fbbc933a0711f334c22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 35-bit up/down counter `updown_35_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_35_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [34:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_35_wrap", "width": 35, "wrap": true}, "prompt_sha1": "1e3fea3650e623f5017158090dcb061e20acb2a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_83_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 83 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_83_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd83;\n end else begin\n if (pulse_in)\n count <= 7'd83;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_83_retrig", "cycles": 83, "retrigger": true}, "prompt_sha1": "b5fc019a0ba783794b6e2834ab76aa3deb602e89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1350 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "edb8548cff1e5b1aa342643db4f7e4b6b3ea71d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xFA544862, set bit 25 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 25)`. Result = 0xFA544862.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 4199827554, "bit": 25, "op": "set", "result": 4199827554}, "prompt_sha1": "da07bd1b289e757627ef03b8655732d1e755c773", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_2713` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_2713 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_2713"}, "prompt_sha1": "5c707153d71d728ad5094c8367611ac62e8139f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_63` for a synchronous sampled input `noisy`. Update output `clean` only after observing 63 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_63 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 62) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_63", "stable_samples": 63}, "prompt_sha1": "c2ddc94c9dfb68ff3c00ff435de125825ff90171", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 960 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 960 = 864. Verification: 864/960 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 960, "duty": 90, "high": 864}, "prompt_sha1": "30663592647e68f8670bcf4e1510bee35dbb772f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3702(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3702(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3702([1, 2]) == 1.5\nassert mean_3702([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3702"}, "prompt_sha1": "a6bbf5c373314bbd52159a4923d903c4b2c10e7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_22_lsb` for `22-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_22_lsb (\n input logic [21:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 21; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_22_lsb", "width": 22, "priority": "low"}, "prompt_sha1": "eeaf5925f514bccc6456e1412d5eeb602513ec63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 89.1% hit rate, and a 15 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.891 = 0.109.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.109×15 ns = 5.6350 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.891, "penalty": 15, "result": 5.635}, "prompt_sha1": "ec0883eef94008e396ce6a7fa5248a5f3bae95ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1500 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-20-28 = 1452 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 20, "tcphdr": 28, "mss": 1452}, "prompt_sha1": "c4159f4e8eed0fd11ccd2723f834368853ccd7aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4791(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4791(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4791([1, 2]) == 1.5\nassert mean_4791([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4791"}, "prompt_sha1": "8721e3e1807fe9ecfd65970a9902a0c123062290", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x5D93D2CD. Extract the 6-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x5D93D2CD >> 1) & 0x3F = 0x26 (38).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 1, "value": 1569968845, "mask": 63, "field": 38}, "prompt_sha1": "d32ae96f6c4cc86fe66833ce9434888026e82358", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 45 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 45/(45+40+8) = 0.483871 = 48.39%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 45, "iphdr": 40, "eff": 0.4838709677419355}, "prompt_sha1": "5729dee61cd1ccb3e01c48c92e8a7b17f03f1ccc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 500 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 500.0}, "prompt_sha1": "5c359d09e8643534a3ceff48a3d2d353c18e916e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_170` generating a one-clock-cycle `tick` every 170 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_170 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 169) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_170", "divide": 170}, "prompt_sha1": "5da5ce82f9dd80b0de351b4bf671fb76cd7b4b8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 24 MHz. Sampling consumes 640.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+14 = 654.5. Period = 654.5/24000000 = 2.72708333e-05 s. Maximum rate = 1/period = 36669.213140 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 24000000.0, "sample_cycles": 640.5, "conv_cycles": 14, "period": 2.7270833333333333e-05, "rate": 36669.21313980137}, "prompt_sha1": "a238b8214d5e2944b50fd7449113ca473d5854d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2984 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "430263b62b4d63ae2cc3dab4728942b2282876a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `len` elements of type `float`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `samples[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "edbb50d93cc74ccc1ad17cf8dff1d46a6a368379", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 47 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 47-18 = 29.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 47, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 29}, "prompt_sha1": "9f0be943a6dcfd4fe454b305c1f0191d7ccdea8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x64_write_bypass` with 16 entries of 64 bits. Inputs: `clk`, `we`, `4-bit waddr`, `64-bit wdata`, `4-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x64_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [63:0] wdata,\n input logic [3:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x64_write_bypass", "entries": 16, "width": 64, "mode": "write_bypass"}, "prompt_sha1": "bb04c54fc7e84345ea94238b754aacb8ffe8bd9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 20 elements. Review loop `for i in range(20-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(20-1)` produces indices 0 through 18, so index 19 is skipped. Correct loop: `for i in range(20):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 20, "variant": "miss_last"}, "prompt_sha1": "55bf38ed5fa836b2e9613a76e6aed4b60e7cefe6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^6 V = 0.015625 V = 15625.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 1.0, "step": 0.015625}, "prompt_sha1": "3a697c814b02d0377b53d33f95c5d33d07b73f62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×100²=0.5 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 100, "energy": 0.49999999999999994}, "prompt_sha1": "08dcc8237d80b68ce4178d33c85ed4ca8bc7375d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock CACHE then STATE; worker_2 acquires STATE then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds CACHE while waiting for STATE, while worker_2 holds STATE while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "4e1a6bad2d630ac6701fa6765fb8088e4a80ec3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 10%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.100 × 4 = 0.080000.\nEffective CPI = 1.2 + 0.080000 = 1.280000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.1, "penalty": 4, "result": 1.28}, "prompt_sha1": "5886f276a8ea64de7ef1e1c008aeaa789df20760", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 250 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 250/1000 = 5e+07 bits = 6.25e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 250, "bits": 50000000.0, "bytes": 6250000.0}, "prompt_sha1": "176406f43dfad510ee1c922ddfc5316e682bdec5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 4 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×4/(1.5×10^9) = 0.0533333333 s = 53.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 4.0, "ghz": 1.5, "sec": 0.05333333333333334}, "prompt_sha1": "e42f70b6d35b6b705c7f77d242fef7845c366ea1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 2 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×2/(3×10^9) = 0.133333333 s = 133.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 2.0, "ghz": 3.0, "sec": 0.13333333333333333}, "prompt_sha1": "8ebbc0b7929abea314404cc6c24d0615fbc7dc0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6440` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6440 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6440"}, "prompt_sha1": "e2d4ed75015372c95a09c07a0a0931529c2510c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_120` generating a one-clock-cycle `tick` every 120 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_120 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 119) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_120", "divide": 120}, "prompt_sha1": "0325ac45812de443ad1f9782fe94f452e2c8efa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9206` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9206 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9206"}, "prompt_sha1": "0121f1229ce8105f62df6077caaeff240d59930c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 58 and tail index 93, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (58-93) mod 128 = 93. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 58, "tail": 93, "occupancy": 93}, "prompt_sha1": "80b653dbc8886d335198e2e28a90743805c8565a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 18857 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 18857/100000 s; frequency = 100000/18857 = 5.303070 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 18857, "hz": 5.30307047780665}, "prompt_sha1": "a1eec4b0ba3cb74e2fba1615a3c20035a03d2e46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 2000 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×2000×10^6×6 = 48.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 2000, "channels": 6, "gbps": 48.0}, "prompt_sha1": "1ade2e9a3f8de07e96ed8295025a2406a83c20c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 42 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 42-21 = 21.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 42, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 21}, "prompt_sha1": "b6aeb629acb30fe0fa69b429c31574b0b86f450e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9881(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9881(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9881([1, 2]) == 1.5\nassert mean_9881([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9881"}, "prompt_sha1": "b969f8da91bf70614d206d0c6ebcf25843428954", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 4` on one shared integer without synchronization. Assume `credits` initially equals 14. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 14; T2 reads 14; both compute 18; T1 writes 18; T2 writes 18. The observed final value is 18, but two serial increments would produce 22.\n\n```\nlock(mutex)\ncredits = credits + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "5f459933613665b20e864b412c28b90a9f8f8f84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 25% of instructions, the branch misprediction rate is 10%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.100 × 4 = 0.100000.\nEffective CPI = 1 + 0.100000 = 1.100000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.25, "mispred": 0.1, "penalty": 4, "result": 1.1}, "prompt_sha1": "c58a933d1a9ff456d113653944d5d92270ac2466", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 62 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 62-17 = 45.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 62, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 45}, "prompt_sha1": "5850119ad016f9e094fca6df60f43c0c87c31ea8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×100²=2.35 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 100, "energy": 2.35}, "prompt_sha1": "d456d5f88755ff8051f1862397b541584ecdf321", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 61-bit up/down counter `updown_61_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_61_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [60:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_61_wrap", "width": 61, "wrap": true}, "prompt_sha1": "fa89986268676775cafadc66246b1ce4def75666", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_9091` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_9091 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_9091"}, "prompt_sha1": "7b77c8729619f9c144975e23e75c0cae04a5654e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 11100001100000001001011000011111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 14 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11100001100000001001011000011111", "ones": 14, "parity": 0}, "prompt_sha1": "67aab6d08f0543aeb45472cfbb353befc65ec4e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 22.6 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 22.6-3.3 = 19.3 V.\nI = V/R = 19.3/330 A = 58.4848 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 22.6, "vf": 3.3, "r": 330, "current_a": 0.05848484848484849}, "prompt_sha1": "bfca46990159e480571a2fcf32712e4b597ac954", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.5 ns hit time, 94.9% hit rate, and a 120 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.949 = 0.051.\nAMAT = hit time + miss rate × miss penalty\n= 2.5 ns + 0.051×120 ns = 8.6200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.5, "hit_rate": 0.949, "penalty": 120, "result": 8.620000000000005}, "prompt_sha1": "d06ec3650bf17392ec319860d59bc1efdfd3f62b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 46-bit up/down counter `updown_46_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_46_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [45:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 46'd70368744177663) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_46_sat", "width": 46, "wrap": false}, "prompt_sha1": "a8ae5c28f8a643efd73c11ffeb405c1b77f2ff03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 1833 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 1833/1000000 s; frequency = 1000000/1833 = 545.553737 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 1833, "hz": 545.5537370430987}, "prompt_sha1": "bd2fde8be34f9292c369cbd7a018454ee7bc049e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 58714. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 58714/65535 × 3 V = 2.687755 V.\nThus the estimated input is about 2.6878 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 58714, "volts": 2.6877546349279013}, "prompt_sha1": "f15f0db62617ed768e67cf3454c4b3e313cf2ebd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(24×10^6) s = 2.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 64, "time_us": 2.666666666666667}, "prompt_sha1": "8b77019f221bdf54676d8fe98bc824f9173b8e4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2994` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2994 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2994"}, "prompt_sha1": "5d80722f22e863131ec2af3f5db6332483d70f69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=200 ms, C=2 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/200 + 2/200 = 0.030000 = 3.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 200], [2, 200]], "utilization": 0.03}, "prompt_sha1": "af8824a4b523a0aaca7ec928076ce7bb05690df1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 194 and tail index 129, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (194-129) mod 256 = 65. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 194, "tail": 129, "occupancy": 65}, "prompt_sha1": "530489e2d7b58583cb0811fd87f9482d4ca465ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xF82CBA55. Extract the 5-bit field starting at bit 26 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xF82CBA55 >> 26) & 0x1F = 0x1E (30).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 26, "value": 4163680853, "mask": 31, "field": 30}, "prompt_sha1": "06a19dfb91fdff841d8f7b3ba966396e8d6d16a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_36` for a 36-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_36 (\n input logic [35:0] data,\n input logic [5:0] shamt,\n output logic [35:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_36", "width": 36, "direction": "right", "arithmetic": false}, "prompt_sha1": "f556d1af8dfbb734a7f82239ba3b469f5ede7dfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 8-way set-associative cache uses 128-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/128 = 1024.\nSets = 1024/8 = 128.\nOffset bits = log2(128) = 7; index bits = log2(128) = 7; tag bits = 52-7-7 = 38.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 128, "ways": 8, "addr_bits": 52, "lines": 1024, "sets": 128, "offset": 7, "index": 7, "tag": 38}, "prompt_sha1": "e251055741a7a5a2f7643a80db86d2b102c18d56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 7 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 50 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+1 = 9. Total bits = 50×9 = 450. Time = 450/921600 = 0.00048828125 s = 0.488281 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 7, "parity": 0, "stop": 1, "frames": 50, "seconds": 0.00048828125}, "prompt_sha1": "209537d8126ba8f85c9e24b8ed5442b395a770d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65489; x = x + 167;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65489+167 = 65656. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65656) mod 2^16 = 120. So `x` stores 120. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65489, "add": 167, "result": 120}, "prompt_sha1": "ea7027219e38ad71b8022ee269f938ad62303cec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "028a279a2a276aee0ae0fa4f0d01103b87c29ae3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×5/1000/8 = 3125.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 5, "bytes": 3125.0}, "prompt_sha1": "7bae89df98a0a6d15f75d2055500d3140ef1a657", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x13, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x13<<1)|0 = 0x26 = 00100110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 19, "rw": 0, "byte": 38}, "prompt_sha1": "bc694a4664d61e61f43ce635e3d44e1d84cc67dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "450f88f718abc35e5719ef0058257480410fe414", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `words` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n total += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `data[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n total += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "397d37c3f35528775a5e6c8fbb7a9ca7a6148f68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTNTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 0, 1, 0, 1], "final_state": 3}, "prompt_sha1": "0f3e8feab01da7c7d3ca180da651e80b89b4f2b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.39.83.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.39.83.0\nBroadcast address: 10.39.83.63\nUsable host range: 10.39.83.1 to 10.39.83.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.39.83.0/26", "usable": 62, "first": "10.39.83.1", "last": "10.39.83.62", "broadcast": "10.39.83.63"}, "prompt_sha1": "19374bc6b3e2f8fe4771af37a9b9be8ce06cb668", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 42-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^42/2^16 = 2^26 = 67108864 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 42, "page_exp": 16, "entries": 67108864}, "prompt_sha1": "e6b67cc5144f4a328dc918545d9829d8be811fcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 4 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×100×10^6 = 400000000 B/s. Time = 256/400000000 = 6.4e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 4, "rate_mhz": 100, "sec": 6.4e-07}, "prompt_sha1": "f90bcf5ea86d274a5a509ef5d0dcdb4c2d054f14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×128 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 128, "reach": 4194304}, "prompt_sha1": "1dab52940a1959c3998a4e001876c4383e24bcbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1492 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-40-40 = 1412 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 40, "tcphdr": 40, "mss": 1412}, "prompt_sha1": "7d310e2e467b53a3583afa78ebed99d17444ac01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x177F, set bit 9 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 9)`. Result = 0x177F.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 6015, "bit": 9, "op": "set", "result": 6015}, "prompt_sha1": "e17067859d24ed9b73e177c14c53fbad13d05c91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1422 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "ccf22085656068d3aa86e3e9998992b7465a5cd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3064389930, carries 24915 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 24915+0+1 = 24916. ACK = (3064389930+24916) mod 2^32 = 3064414846.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3064389930, "payload": 24915, "syn": 0, "fin": 1, "ack": 3064414846}, "prompt_sha1": "a1129770b678281101dd949295347dbe00499510", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 95%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.020×(4+0.050×40) = 2.120000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.98, "l2": 4, "l2_hit": 0.95, "mem": 40, "amat": 2.12}, "prompt_sha1": "6f06601f33d59b68aca1e0d61f4adc164277d0f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1507 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1507/(1507+20+8) = 0.981759 = 98.18%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1507, "iphdr": 20, "eff": 0.9817589576547231}, "prompt_sha1": "e6a11d942641bae38ac5cfd4c4cf24a27b09a7a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_52_lsb` for `52-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_52_lsb (\n input logic [51:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 51; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_52_lsb", "width": 52, "priority": "low"}, "prompt_sha1": "e9fa0f0e30d5cba84dd0e01ea3876ee4088cba16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x62, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x62<<1)|0 = 0xC4 = 11000100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 98, "rw": 0, "byte": 196}, "prompt_sha1": "ab25c7741a9b456950499aabe07d1d1b1b0a4e34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 72 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 512. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 72000000/50 = 1440000.\nWith prescaler divisor limited to at most 512, the largest divisor of 1440000 that also keeps the period count within 16 bits is 500.\nPeriod count = 1440000/500 = 2880.\nPSC register = 500-1 = 499.\nARR register = 2880-1 = 2879.\nVerification: 72000000/(500×2880) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 72000000, "target_hz": 50, "total_division": 1440000, "max_prescaler": 512, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 500, "period": 2880, "psc_reg": 499, "arr_reg": 2879}, "prompt_sha1": "0e08800caaaddb1fa7e1b7a4048cb5b341869313", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w11_signed` comparing two 11-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w11_signed (\n input logic signed [10:0] a,\n input logic signed [10:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w11_signed", "width": 11, "signed": true}, "prompt_sha1": "c2ba8e8d0375e57477e3289678eddc53579bbf38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 384 payload bytes plus 44 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 384/(384+44) = 0.897196 = 89.72%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 384, "overhead": 44, "efficiency": 0.897196261682243}, "prompt_sha1": "49958f02d3c72ffc1efb67df0cb1c8f4af3f7322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1010010111100 using generator polynomial bits 1011001. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 011100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 89, "msg_bits": 13, "msg": 5308, "remainder": 28}, "prompt_sha1": "7e884bb8a37a6a2171d20cc35e3ea2b33647dcfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 12 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 12 MHz / 256 = 0.046875 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 12000000.0, "divider": 256, "spi_hz": 46875.0}, "prompt_sha1": "5343e332ec29e63af95a922fd5c80ad110964211", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (512×8) = 610351.562500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 512, "pps": 610351.5625}, "prompt_sha1": "399cf5563c1233974928891e0d9a61defa38c1ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×12²=0.1584 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 12, "energy": 0.15839999999999999}, "prompt_sha1": "8f17c2c149c9471d12f90df66ccc45fb00ff5fac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 115200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(16×115200) = 52.083333.\nNearest integer divisor D = 52.\nActual baud = 96000000/(16×52) = 115384.615 baud.\nError = (115384.615-115200)/115200×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 16, "baud": 115200, "divisor": 52, "actual": 115384.61538461539, "error_pct": 0.1602564102564151}, "prompt_sha1": "c76b029e1a2eb15a2f14c778dbd298ba3b86648f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 60 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×60/1000/8 = 750000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 60, "bytes": 750000000.0}, "prompt_sha1": "906f7dd8c22f6656aa3de0a352d45d62b4eb3f3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=680000 ohm and C=680000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=680000×680000×10^-12 s = 0.4624 s.\nf_c=1/(2πRC)=1/(2π×680000×680000×10^-12) = 0.3442 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 680000, "c_f": 6.8e-07, "tau": 0.4624, "fc": 0.3441932160291855}, "prompt_sha1": "6ca47a8e326e33a8ba945ed8fd5912d5478cc5d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 576 elements. Review loop `for i in range(576+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(576+1)` includes index 576, which is out of range for a length-576 sequence. Correct loop: `for i in range(576):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 576, "variant": "one_past"}, "prompt_sha1": "88a22fcb67271f762c2503a816de6ffceebccd42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_57_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 57 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_57_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd57;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_57_ignore", "cycles": 57, "retrigger": false}, "prompt_sha1": "ff3c8fb7448525f6d9d481b628156202b5c207d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 24 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 24000000/(4×38400) = 156.250000.\nNearest integer divisor D = 156.\nActual baud = 24000000/(4×156) = 38461.538 baud.\nError = (38461.538-38400)/38400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 24000000, "oversample": 4, "baud": 38400, "divisor": 156, "actual": 38461.53846153846, "error_pct": 0.1602564102564088}, "prompt_sha1": "7f20d94127447aa8abe277fdb01d2b4332696753", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x2DF8EC0C, clear bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 8)`. Result = 0x2DF8EC0C.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 771288076, "bit": 8, "op": "clear", "result": 771288076}, "prompt_sha1": "0711f3e941369d8596fcf024d8c2b2b7cc8f6021", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_103` for a synchronous sampled input `noisy`. Update output `clean` only after observing 103 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_103 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 102) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_103", "stable_samples": 103}, "prompt_sha1": "acb7cf404a18aa586a5ac92a40c4e832b285af1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 46-bit up/down counter `updown_46_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_46_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [45:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_46_wrap", "width": 46, "wrap": true}, "prompt_sha1": "4b695797dc51d17d4d1d805f8ac81cbe5370b640", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=470 nF and is stepped to 9 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=9(1-e^-4)=8.835159 V; τ=0.0001034 s and t=0.0004136 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 4.7000000000000005e-07, "multiple": 4, "vin": 9, "vc": 8.835159250001393}, "prompt_sha1": "2f7ac873c516972849a49fd84f6a7d08d0e375b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w64_4925` implementing a dual-clock asynchronous FIFO with depth 16 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w64_4925 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 64,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w64_4925", "depth": 16, "width": 64, "ptr_w": 4}, "prompt_sha1": "391abeffadcba25bbcd3c77999228283d9cf37e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 55-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^55/2^11 = 2^44 = 17592186044416 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 55, "page_exp": 11, "entries": 17592186044416}, "prompt_sha1": "21f35c1b687eed6e2d553618104b5116092f6f35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 237 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×237/(24×10^6) = 0.00049375 = 0.049375%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 50, "cycles": 237, "load": 0.00049375}, "prompt_sha1": "130f72a2620c5fb4f454e971cb8ffec2c81a24f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.4 V source drives a 6800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.4-2.2 = 6.2 V.\nI = V/R = 6.2/6800 A = 0.9118 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.4, "vf": 2.2, "r": 6800, "current_a": 0.0009117647058823529}, "prompt_sha1": "54cbe52d5f83d32df5f2b7ac29e2182f6278c472", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/2.2 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 2.2, "tau": 9.999999999999999e-05}, "prompt_sha1": "cd9de85c50343e6fd2fa8c8c9d92f4390f81a7d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTTNTNTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 1, 0, 1, 0, 1, 0, 0], "final_state": 1}, "prompt_sha1": "1d091f74bd834ff556b80da47a2d80db2b4cf42e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_427563` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_427563 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_427563"}, "prompt_sha1": "ad583e28e0718f17a69ee9041e24a8d11cc38a4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 20%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.200 × 3 = 0.150000.\nEffective CPI = 1.2 + 0.150000 = 1.350000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.2, "penalty": 3, "result": 1.35}, "prompt_sha1": "2437b2bbbb710a46514bac84ab8953cbd0a750ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `len` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n total += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `data[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n total += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "74632b28091eab59d3d04023948499843c50640e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock C then IO; consumer acquires IO then C. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds C while waiting for IO, while consumer holds IO while waiting for C; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "701285f38b4ff75c07751a1d69e52a2f4038e1d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 19-bit left-shift register module `shiftreg_left_19`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `19-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_19 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [18:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[17:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_19", "width": 19, "direction": "left"}, "prompt_sha1": "645b2dd7b5415332feea6baf229c594e7f39084f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=27000 ohm and C=2700000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=27000×2700000×10^-12 s = 0.0729 s.\nf_c=1/(2πRC)=1/(2π×27000×2700000×10^-12) = 2.1832 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 27000, "c_f": 2.7e-06, "tau": 0.0729, "fc": 2.183195378489648}, "prompt_sha1": "1cf918351abca0e49c435a6f4dfb3a977cea6fe3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=4.7 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×1/(4.7+1) = 1.578947 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 4.7, "r2": 1, "vout": 1.5789473684210527}, "prompt_sha1": "b3a67e63e5863e3f0138690ba90de4c6c0df2408", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=2.2 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×47/(2.2+47) = 11.463415 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 2.2, "r2": 47, "vout": 11.463414634146341}, "prompt_sha1": "4dcdc5a4a73dd44facbb8e75d819c4389efc378a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xC1. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xC1 >> 3) & 0xF = 0x8 (8).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 3, "value": 193, "mask": 15, "field": 8}, "prompt_sha1": "91e5342da5f6169f87c9bf939866c4b17750a1eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w48_cin` implementing a 48-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `48-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w48_cin (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic cin,\n output logic [47:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w48_cin", "width": 48, "cin": true}, "prompt_sha1": "bed3b308bf3f276639b07d43734c2dc44a1dfab6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 7` on one shared integer without synchronization. Assume `counter` initially equals 113. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 113; T2 reads 113; both compute 120; T1 writes 120; T2 writes 120. The observed final value is 120, but two serial increments would produce 127.\n\n```\nlock(mutex)\ncounter = counter + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "0483705bae53c82a89e3269c52aa65712d934224", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 2700 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×2700)/(4700+2700) = 1714.864865 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 2700, "req": 1714.864864864865}, "prompt_sha1": "4a18d0923c3e988da8591faab56dcdcd2159ea43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=2.2 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/1 = -2.200000.\nVout = A_v×Vin = -2.200000×0.25 = -0.550000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 2.2, "vin": 0.25, "gain": -2.2, "vout": -0.55}, "prompt_sha1": "666e59565c4b608263bdf154b9462e5e5290b37a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x6D. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x6D >> 3) & 0xF = 0xD (13).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 3, "value": 109, "mask": 15, "field": 13}, "prompt_sha1": "c4c674e62ca6769bff15a8e6ea861e79b4b19985", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_562960` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_562960 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_562960"}, "prompt_sha1": "8f657be2c2a7a50c31417b5096ac9a52a834d5d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(8×10^6) s = 256.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 2048, "time_us": 256.0}, "prompt_sha1": "f4fe1ffc3b64e5851d78aba915291c69aa508b1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=100 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/100 = -1.000000.\nVout = A_v×Vin = -1.000000×0.5 = -0.500000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 100, "vin": 0.5, "gain": -1.0, "vout": -0.5}, "prompt_sha1": "1d96a1628ff7b48fd203c070461b5bc99b9b4dc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=22 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×1/(22+1) = 0.217391 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 22, "r2": 1, "vout": 0.21739130434782608}, "prompt_sha1": "a91d1aa5e1bc7c48dff5c23575d51d76dd4abb5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 825999273, carries 57053 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 57053+0+0 = 57053. ACK = (825999273+57053) mod 2^32 = 826056326.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 825999273, "payload": 57053, "syn": 0, "fin": 0, "ack": 826056326}, "prompt_sha1": "71b968057eee36a0ab03282c52a7ac0a1b76f796", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m19404` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 19404 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m19404 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd19404;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m19404", "width": 16, "max": 19404}, "prompt_sha1": "560aab61e9039e8e19df3ddc01f36f4bd50d121b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x39A4. Extract the 6-bit field starting at bit 9 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x39A4 >> 9) & 0x3F = 0x1C (28).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 9, "value": 14756, "mask": 63, "field": 28}, "prompt_sha1": "a696aa181c2ee289a6059d6e3c1fcd9bf0de8294", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_7` for a 7-bit unsigned input `data`, `3-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_7 (\n input logic [6:0] data,\n input logic [2:0] shamt,\n output logic [6:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_7", "width": 7, "direction": "left", "arithmetic": false}, "prompt_sha1": "29010ca1698203677a67ef14ae47a11c2371ed6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.96. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.96) + 0.96/6) = 5.000000.\nThe theoretical speedup is about 5.000×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.96, "n": 6, "result": 4.999999999999999}, "prompt_sha1": "4cefa50feb723a7ed7384723ba31845580b5c436", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=1000 nF and is stepped to 1.8 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1.8(1-e^-3)=1.710383 V; τ=0.0001 s and t=0.0003 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 1.0000000000000002e-06, "multiple": 3, "vin": 1.8, "vc": 1.7103832769378449}, "prompt_sha1": "9dbdaad1b2de4af7b990d50885f63ff3f1170ecf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 81661171, carries 22072 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 22072+1+0 = 22073. ACK = (81661171+22073) mod 2^32 = 81683244.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 81661171, "payload": 22072, "syn": 1, "fin": 0, "ack": 81683244}, "prompt_sha1": "afdf1da3eb2bddb72d094d7155f4eef7fb09fac8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_10_msb` for `10-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_10_msb (\n input logic [9:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 10; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_10_msb", "width": 10, "priority": "high"}, "prompt_sha1": "eb58ec73a63f2c35482b10f70880146c979afb05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(1×10^6) s = 24.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 24, "time_us": 24.0}, "prompt_sha1": "4beca15d41730c1a08010a984f1da4d73b22f5a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×4 KiB = 192 KiB = 196608 bytes = 0.187500 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 4, "reach": 196608}, "prompt_sha1": "39106f8d133cf97415461662fd34830d07a7d122", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 16-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/16 = 512.\nOffset bits = log2(16) = 4.\nIndex bits = log2(512) = 9.\nTag bits = 64-9-4 = 51.\nCheck: 51+9+4 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 16, "addr_bits": 64, "lines": 512, "offset_bits": 4, "index_bits": 9, "tag_bits": 51}, "prompt_sha1": "0129f12504773bd8c78d32b29e317ffcc5e7bb80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=40 ms, C=1 ms,T=25 ms, C=1 ms,T=25 ms, C=5 ms,T=40 ms, C=3 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/40 + 1/25 + 1/25 + 5/40 + 3/200 = 0.270000 = 27.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 40], [1, 25], [1, 25], [5, 40], [3, 200]], "utilization": 0.27}, "prompt_sha1": "02250ed4c347da3f2d88989768f86ec83bb7b1b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7001-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7001×8 = 56008 bits.\nSerialization delay = bits/rate = 56008/(5000×10^6) s = 1.12016e-05 s = 11.201600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7001, "rate_mbps": 5000, "delay_s": 1.12016e-05}, "prompt_sha1": "72182814bd46317bb98149590e72d7fa69aa35c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 120 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 120000000/(8×4800) = 3125.000000.\nNearest integer divisor D = 3125.\nActual baud = 120000000/(8×3125) = 4800.000 baud.\nError = (4800.000-4800)/4800×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 120000000, "oversample": 8, "baud": 4800, "divisor": 3125, "actual": 4800.0, "error_pct": 0.0}, "prompt_sha1": "bd0edb0a33f82cef5dba50219ce36158811cfa40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xF0, clear bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 6)`. Result = 0xB0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 240, "bit": 6, "op": "clear", "result": 176}, "prompt_sha1": "464d87534547a82bb975e09ff1ea24703e3f55d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=220 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/10 = -22.000000.\nVout = A_v×Vin = -22.000000×0.25 = -5.500000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 220, "vin": 0.25, "gain": -22.0, "vout": -5.5}, "prompt_sha1": "453bd8540e1781d9f911e1e6f69c2b057857f7c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 59 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 59-17 = 42.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 59, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 42}, "prompt_sha1": "ad58f27651b2377fb7d6fa9b2081e1ffd1917adf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_69` for a synchronous sampled input `noisy`. Update output `clean` only after observing 69 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_69 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 68) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_69", "stable_samples": 69}, "prompt_sha1": "372141bdc1833f216e46e6853bdd98def61326f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x48_write_bypass` with 64 entries of 48 bits. Inputs: `clk`, `we`, `6-bit waddr`, `48-bit wdata`, `6-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [47:0] wdata,\n input logic [5:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x48_write_bypass", "entries": 64, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "7c7eda2cdd3a360d85cd9c46900bdf44dcf78b09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `completed = completed + 7` on one shared integer without synchronization. Assume `completed` initially equals 470. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 470; T2 reads 470; both compute 477; T1 writes 477; T2 writes 477. The observed final value is 477, but two serial increments would produce 484.\n\n```\nlock(mutex)\ncompleted = completed + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "4d53444a39a189f658822930dc52b576bbc59e8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4500-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4500×8 = 36000 bits.\nSerialization delay = bits/rate = 36000/(10000×10^6) s = 3.6e-06 s = 3.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4500, "rate_mbps": 10000, "delay_s": 3.6e-06}, "prompt_sha1": "26db2a6188ac427dd73d4ec7b755c1893d31b364", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_4382` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_4382 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_4382", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "9ddedbea501c765d487f1f6414a569ef9e5af137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 97.7% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.977 = 0.023.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.023×190 ns = 6.1200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.977, "penalty": 190, "result": 6.120000000000004}, "prompt_sha1": "b1999b4d2527b7396a0cfe3a22126cb68fd8f3fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 256-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/256 = 16.\nOffset bits = log2(256) = 8.\nIndex bits = log2(16) = 4.\nTag bits = 28-4-8 = 16.\nCheck: 16+4+8 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 256, "addr_bits": 28, "lines": 16, "offset_bits": 8, "index_bits": 4, "tag_bits": 16}, "prompt_sha1": "cd2d072018c10a6e4ecc2f99a617c908ac65c259", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0010011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0010011", "ones": 3, "parity": 1}, "prompt_sha1": "b86edfcab6d70f1bcf20c8219cfbe5554d14968e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 32-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^32/2^21 = 2^11 = 2048 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 32, "page_exp": 21, "entries": 2048}, "prompt_sha1": "e8b3bb2e05e6de2413a0eaf0409d46d0f06fbc4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(20×10^6) s = 6.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 128, "time_us": 6.3999999999999995}, "prompt_sha1": "369786709f8928673747b9771d82fc319e145459", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock QUEUE then RX; consumer acquires RX then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds QUEUE while waiting for RX, while consumer holds RX while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire QUEUE before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "27ec94a2f9127af47d0115f84b803c70773b3fd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 8 = 0.180000.\nEffective CPI = 1 + 0.180000 = 1.180000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.15, "penalty": 8, "result": 1.18}, "prompt_sha1": "b7a134f62ec490b7b33bf26b353b959b487e6280", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'V', 'V', 'P', 'P', 'V', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 9 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "V", "V", "P", "P", "V", "V", "V", "V", "P", "V", "P", "P", "V", "P", "V", "P", "V", "V", "V"], "value": 9, "blocked": 0}, "prompt_sha1": "417b5a8f5014ef0b166d32b7d075c63b22fab56a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 29-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^29/2^16 = 2^13 = 8192 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 29, "page_exp": 16, "entries": 8192}, "prompt_sha1": "6c90375aaa42e9d41ff757f6e72ccfc2fdb7ee46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-24 = 1976 bytes.\nRound down to an 8-byte multiple: floor((1976)/8)×8 = 1976 bytes.\nFragments required = ceil(2000/1976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 24, "payload": 2000, "max_payload": 1976, "fragments": 2}, "prompt_sha1": "419cd7585b490280ac3989e26d90484c56546524", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 24 data bits per transfer at 800 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 24/8 = 3. Bandwidth = 3×800×10^6×2 = 4.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 24, "rate_mt": 800, "channels": 2, "gbps": 4.8}, "prompt_sha1": "702edd780d42e17c8d46ef0c6358fedf5c162cf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w32_4788` implementing a dual-clock asynchronous FIFO with depth 32 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w32_4788 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 32,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w32_4788", "depth": 32, "width": 32, "ptr_w": 5}, "prompt_sha1": "b0e5b187bb490940338c3ea858cdcf7555206227", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 1394 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×1394/(64×10^6) = 0.2178125 = 21.781250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 10000, "cycles": 1394, "load": 0.2178125}, "prompt_sha1": "2f2a946b65773377b723d4e1c2fc6f467e370280", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×9²=0.19035 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 9, "energy": 0.19035000000000002}, "prompt_sha1": "c4f6a1afce442d8839278a9b48bbd3f5892916be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_155` generating a one-clock-cycle `tick` every 155 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_155 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 154) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_155", "divide": 155}, "prompt_sha1": "e90eaeac23edff2ed63c1739fbb0479520003f1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1450 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-20-28 = 1402 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 20, "tcphdr": 28, "mss": 1402}, "prompt_sha1": "d2cfa0a3fac52bfdb0dc12d0cd0216d881436610", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 128 data bits per transfer at 6400 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 128/8 = 16. Bandwidth = 16×6400×10^6×3 = 307.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 128, "rate_mt": 6400, "channels": 3, "gbps": 307.2}, "prompt_sha1": "8c2936e29dd8e21d689cff012d00ffdad78c6ba3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1535 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1535/(1535+40+8) = 0.969678 = 96.97%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1535, "iphdr": 40, "eff": 0.9696778269109286}, "prompt_sha1": "0174e0850d842c716114a43edbc0323b93015b3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 2048. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2048/4095 × 3 V = 1.500366 V.\nThus the estimated input is about 1.5004 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 2048, "volts": 1.5003663003663004}, "prompt_sha1": "cc2e31cee45b89c25735d09f79dfcbc49bed1140", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 27 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×27)/(47+27) = 17.148649 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 27, "req": 17.14864864864865}, "prompt_sha1": "a920e298ae2de6106f3a22bd05aa55f1cb611c0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 9 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 1.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 9-1.6 = 7.4 V.\nI = V/R = 7.4/680 A = 10.8824 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 9.0, "vf": 1.6, "r": 680, "current_a": 0.010882352941176471}, "prompt_sha1": "8f62be9010a0e4994ca27ed2307247b174fd22c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 38-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^38/2^21 = 2^17 = 131072 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 38, "page_exp": 21, "entries": 131072}, "prompt_sha1": "a491b1d6403db013c68d054df4f670731bb19789", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-32 = 1216 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 32, "mss": 1216}, "prompt_sha1": "b88aa143299adcee590a57b051a52d3dc6bd7492", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "e9ea7737073dfcf55055895d9e1f9007edf65f50", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "91e02b5928eaf5106c782fa270a6cdc5ebbb4d914ce95902c14ac72f2d6d275e", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 1267, "original_row_sha256": "7cc33884f11d62e2c5813d36a7080c99cf030e04eb8f106c3eb1d87ec1f12ac7", "version": "v1.0.0-rc1"}}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 753 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 753/(753+20+8) = 0.964149 = 96.41%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 753, "iphdr": 20, "eff": 0.9641485275288092}, "prompt_sha1": "878d781cbe1a45421ba05d1fa717f6cd2abc0172", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.3 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 1.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.3-1.8 = 1.5 V.\nI = V/R = 1.5/330 A = 4.5455 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.3, "vf": 1.8, "r": 330, "current_a": 0.004545454545454544}, "prompt_sha1": "88ad2d0ca856c694800bc0ea0ebfa1d8e5bc6076", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×5²=0.0005875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 5, "energy": 0.0005875}, "prompt_sha1": "4ac03974259fe186e671f2d88f09e280fb4559d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 10 V source drives a 1000 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 10-3.4 = 6.6 V.\nI = V/R = 6.6/1000 A = 6.6000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 10.0, "vf": 3.4, "r": 1000, "current_a": 0.0066}, "prompt_sha1": "709eec28d23b724aff8496d4fd9009d38f399a5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/1000=0.024 A. P=V²/R=24²/1000=0.576 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 1000, "i": 0.024, "p": 0.576}, "prompt_sha1": "f797a780dde66b0b8ef967c20c2521d0f5e04794", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 12-bit up/down counter `updown_12_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_12_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [11:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 12'd4095) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_12_sat", "width": 12, "wrap": false}, "prompt_sha1": "c47763a9af6404e404f0fabbc83db30e18bfd73a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `n` elements of type `int`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n result += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `a[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n result += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ff290a1b7c312826adf8aa1a817861734e16ef78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_61_msb` for `61-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_61_msb (\n input logic [60:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 61; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_61_msb", "width": 61, "priority": "high"}, "prompt_sha1": "e40a5b65f484d14b3523374cc0c947dd13f8b0c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 88.6% hit rate, and a 30 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.886 = 0.114.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.114×30 ns = 7.9200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.886, "penalty": 30, "result": 7.92}, "prompt_sha1": "81a5ead06192465ae1a4b94aef9cd5eb999c79fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w16_2314` implementing a dual-clock asynchronous FIFO with depth 8 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w16_2314 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 16,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w16_2314", "depth": 8, "width": 16, "ptr_w": 3}, "prompt_sha1": "b2f8008485c4027c0a5101cbf5d3cd22b0da0e41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 58-bit left-shift register module `shiftreg_left_58`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `58-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_58 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [57:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[56:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_58", "width": 58, "direction": "left"}, "prompt_sha1": "f428a33dfd8a97ddcf5c35d86816bdaed047bd8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.5 ns hit time, 94.4% hit rate, and a 65 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.944 = 0.056.\nAMAT = hit time + miss rate × miss penalty\n= 3.5 ns + 0.056×65 ns = 7.1400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.5, "hit_rate": 0.944, "penalty": 65, "result": 7.140000000000003}, "prompt_sha1": "603a07af9fc5ad1dd0ebce8183a441d761d2623b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 16-way set-associative cache uses 32-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/32 = 4096.\nSets = 4096/16 = 256.\nOffset bits = log2(32) = 5; index bits = log2(256) = 8; tag bits = 40-5-8 = 27.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 32, "ways": 16, "addr_bits": 40, "lines": 4096, "sets": 256, "offset": 5, "index": 8, "tag": 27}, "prompt_sha1": "95fa30d9d721d0fd2e16747468b52309c4585168", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65305; x = x + 609;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65305+609 = 65914. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65914) mod 2^16 = 378. So `x` stores 378. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65305, "add": 609, "result": 378}, "prompt_sha1": "65b7f7b421eea02156964c89efaeba3eb1898e36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 75%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.050×(5+0.250×60) = 2.500000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.95, "l2": 5, "l2_hit": 0.75, "mem": 60, "amat": 2.500000000000001}, "prompt_sha1": "437180bc2961c2365dfa495f849309fc0dd45ad4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 45 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 45 = 47.\nClock pulses = 47×9 = 423.\nTime = 423/400000 s = 1057.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 45, "clocks": 423, "time_s": 0.0010575}, "prompt_sha1": "716472705a518c661836b59405437ec41e22c6aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×8 KiB = 1536 KiB = 1572864 bytes = 1.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 8, "reach": 1572864}, "prompt_sha1": "0ac09f1d3a3dd52198e7d64334c590fadfed76d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 2` on one shared integer without synchronization. Assume `credits` initially equals 144. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 144; T2 reads 144; both compute 146; T1 writes 146; T2 writes 146. The observed final value is 146, but two serial increments would produce 148.\n\n```\nlock(mutex)\ncredits = credits + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "d1470decf6b75504836d9580afbfd68bb8f5f364", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×512 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 512, "reach": 134217728}, "prompt_sha1": "90e97d663e64f8cba88a17b1b5130f3e59c4f889", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_2494` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_2494 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_2494", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "3f166ace2ccc7052f732ad967629aed58e047585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-40 = 536 bytes.\nRound down to an 8-byte multiple: floor((536)/8)×8 = 536 bytes.\nFragments required = ceil(3000/536) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 40, "payload": 3000, "max_payload": 536, "fragments": 6}, "prompt_sha1": "4efbe57370d3b46e1bd9e7a2d55a7291aa2ad16c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 95%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.100×(12+0.050×50) = 2.450000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.9, "l2": 12, "l2_hit": 0.95, "mem": 50, "amat": 2.45}, "prompt_sha1": "5d169d868e06ebb871a37ef8add15c9117c23b39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 10000 = 2500. Verification: 2500/10000 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 25, "high": 2500}, "prompt_sha1": "09ab1e67957787f8e1fc478b19f7bc2ebd88a086", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 2.5 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×2.5/(3.5×10^9) = 0.000714285714 s = 0.714286 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 2.5, "ghz": 3.5, "sec": 0.0007142857142857143}, "prompt_sha1": "6db24377e1da50c364ddb2afc3f04386d485997b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 478 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×478/(24×10^6) = 0.398333333 = 39.833333%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 20000, "cycles": 478, "load": 0.3983333333333333}, "prompt_sha1": "493526330fc41b9c4b3bee3d45481fa18ccdf6eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 610263149, carries 5931 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5931+1+0 = 5932. ACK = (610263149+5932) mod 2^32 = 610269081.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 610263149, "payload": 5931, "syn": 1, "fin": 0, "ack": 610269081}, "prompt_sha1": "787908f9cbda3d4c1dba19c17fbdf7f17bad78fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 2-way set-associative cache uses 16-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/16 = 512.\nSets = 512/2 = 256.\nOffset bits = log2(16) = 4; index bits = log2(256) = 8; tag bits = 48-4-8 = 36.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 16, "ways": 2, "addr_bits": 48, "lines": 512, "sets": 256, "offset": 4, "index": 8, "tag": 36}, "prompt_sha1": "4f27d3ecf09022e25f2d9666c716504b78d0cc93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 64 data bits per transfer at 200 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 64/8 = 8. Bandwidth = 8×200×10^6×1 = 1.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 64, "rate_mt": 200, "channels": 1, "gbps": 1.6}, "prompt_sha1": "ec27610a297490b9e70c743112e64370ca7b193b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2098317245, carries 58619 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 58619+1+1 = 58621. ACK = (2098317245+58621) mod 2^32 = 2098375866.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2098317245, "payload": 58619, "syn": 1, "fin": 1, "ack": 2098375866}, "prompt_sha1": "141c097485b45fe3fe4bdfa7181de0c3223cfb82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 16-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/16 = 64.\nOffset bits = log2(16) = 4.\nIndex bits = log2(64) = 6.\nTag bits = 24-6-4 = 14.\nCheck: 14+6+4 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 16, "addr_bits": 24, "lines": 64, "offset_bits": 4, "index_bits": 6, "tag_bits": 14}, "prompt_sha1": "419446c67a14e37d28da3e9adefed80607f8d337", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.238.108.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.238.108.0\nBroadcast address: 10.238.108.255\nUsable host range: 10.238.108.1 to 10.238.108.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.238.108.0/24", "usable": 254, "first": "10.238.108.1", "last": "10.238.108.254", "broadcast": "10.238.108.255"}, "prompt_sha1": "97878a4e10398429b00be283fbc2435f143ef4fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (128×8) = 4882.812500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 128, "pps": 4882.8125}, "prompt_sha1": "be35001080b528bef20b9dbd53dd8fb79446de4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_59` for a 59-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_59 (\n input logic [58:0] data,\n input logic [5:0] shamt,\n output logic [58:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_59", "width": 59, "direction": "right", "arithmetic": false}, "prompt_sha1": "78aa415ebb88763b800244b5c0ea62690b0fc557", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6596 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6596/(6596+40+8) = 0.992775 = 99.28%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6596, "iphdr": 40, "eff": 0.9927754364840458}, "prompt_sha1": "23e4001b1d836d26faa9b94ea19bd706c7d664b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `words` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n result += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `data[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n result += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "cda727ab5a92fa6f72315cf3f98f101276e4aafe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/1000 = 1e-07 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 1000, "tau": 1.0000000000000001e-07}, "prompt_sha1": "6d23c961cd0a5cfce2308a1544fab474fcbcdc14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1843` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1843 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1843 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1843;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1843", "width": 11, "max": 1843}, "prompt_sha1": "0408841c0a67465f7ce471f6aeacce8bd9076d62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 192 payload bytes plus 38 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 192/(192+38) = 0.834783 = 83.48%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 192, "overhead": 38, "efficiency": 0.8347826086956521}, "prompt_sha1": "e284509ba5f35096703d1b840084a271b44581b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=22 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×100/(22+100) = 4.098361 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 22, "r2": 100, "vout": 4.098360655737705}, "prompt_sha1": "091132308fab54e0881a853c054462a4232e0e5c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/8000 = 18000.\nWith prescaler divisor limited to at most 32, the largest divisor of 18000 that also keeps the period count within 16 bits is 30.\nPeriod count = 18000/30 = 600.\nPSC register = 30-1 = 29.\nARR register = 600-1 = 599.\nVerification: 144000000/(30×600) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 8000, "total_division": 18000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 30, "period": 600, "psc_reg": 29, "arr_reg": 599}, "prompt_sha1": "e40c93e59c5685e7ef297dc86727afbebbe86744", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w16_nocin` implementing a 16-bit unsigned adder with inputs `a`, `b` and outputs `16-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w16_nocin (\n input logic [15:0] a,\n input logic [15:0] b,\n output logic [15:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w16_nocin", "width": 16, "cin": false}, "prompt_sha1": "8b2fc8c5b58db4282cc8a823d0e80aa436d2bc37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w26_signed` comparing two 26-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w26_signed (\n input logic signed [25:0] a,\n input logic signed [25:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w26_signed", "width": 26, "signed": true}, "prompt_sha1": "4e850ec2762de561ff9984404f7633248e2caa10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_2867` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_2867 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_2867"}, "prompt_sha1": "4f00e096f7670d9f74a6ef816ce08c0d5579287e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w8_6733` implementing a dual-clock asynchronous FIFO with depth 4 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w8_6733 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 8,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w8_6733", "depth": 4, "width": 8, "ptr_w": 2}, "prompt_sha1": "9d39dee9c19d1f170be37135ff8dd3ef643c6200", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=200 ms, C=3 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/200 + 3/20 = 0.175000 = 17.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 200], [3, 20]], "utilization": 0.175}, "prompt_sha1": "677bc50badd12915b5fba755b5200911cdaea2ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=2.2 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×47/(2.2+47) = 3.152439 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 2.2, "r2": 47, "vout": 3.152439024390244}, "prompt_sha1": "7fc361646548c689eee4d49f9103a9c5995c6633", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7417 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7417/(7417+40+8) = 0.993570 = 99.36%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7417, "iphdr": 40, "eff": 0.9935699933020764}, "prompt_sha1": "f1dee8e620f9761edc5c220858e326b4793b4c20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^11 V = 0.001611328125 V = 1611.328125 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 3.3, "step": 0.001611328125}, "prompt_sha1": "ce6c246d421c60f0546ef4f9f519d555a8c33e6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 777 elements. Review loop `for i in range(777-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(777-1)` produces indices 0 through 775, so index 776 is skipped. Correct loop: `for i in range(777):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 777, "variant": "miss_last"}, "prompt_sha1": "ef4824cbf2bf1c00da50805f78a1398c8ee07852", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 29 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 29-14 = 15.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 29, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 15}, "prompt_sha1": "ff370e7f3859bc291cd57c3f4b1972edcb7a7e4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 9-bit up/down counter `updown_9_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_9_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [8:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 9'd511) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_9_sat", "width": 9, "wrap": false}, "prompt_sha1": "097c8f712f30d17d9706980059ab5fb0111aaeef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [24, 17, 30, 10, 24, 23]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [120, 92, 128, 58, 122, 119].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [24, 17, 30, 10, 24, 23], "finish": [120, 92, 128, 58, 122, 119]}, "prompt_sha1": "080d4df02ba0e891b2521e890465e1a45ec3bae9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 89.8% hit rate, and a 35 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.898 = 0.102.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.102×35 ns = 7.5700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.898, "penalty": 35, "result": 7.569999999999999}, "prompt_sha1": "ce40ccf5541757c01ace49e2e9ff08b3025d0932", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 41715 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 41715/50000000 s; frequency = 50000000/41715 = 1198.609613 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 41715, "hz": 1198.6096128490951}, "prompt_sha1": "6b7c26ecb2680eddd9f7ef815042bcab3e6f1875", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_58` for a synchronous sampled input `noisy`. Update output `clean` only after observing 58 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_58 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 57) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_58", "stable_samples": 58}, "prompt_sha1": "c443f09fa2f70013bd28cf320dd53b22922eb26b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 3 = 0.006000.\nEffective CPI = 1 + 0.006000 = 1.006000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.02, "penalty": 3, "result": 1.006}, "prompt_sha1": "57565fde22be3c94cc21a593aba14d345abd6b0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/1 = 1 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 1, "tau": 1.0}, "prompt_sha1": "a6561fc897479e432902b92daa6e403d79313f6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=1 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×47/(1+47) = 23.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 1, "r2": 47, "vout": 23.5}, "prompt_sha1": "e8db8a450ef5530f4a4d89429327500546361026", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3290 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3290/(3290+40+8) = 0.985620 = 98.56%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3290, "iphdr": 40, "eff": 0.9856201318154584}, "prompt_sha1": "cd6f9b8304c31d2219e8ab56d7f3b4b263a1161d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 128-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/128 = 8192.\nSets = 8192/4 = 2048.\nOffset bits = log2(128) = 7; index bits = log2(2048) = 11; tag bits = 57-7-11 = 39.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 128, "ways": 4, "addr_bits": 57, "lines": 8192, "sets": 2048, "offset": 7, "index": 11, "tag": 39}, "prompt_sha1": "1744d635b04cfb8dcc53a36759ae57f162bb8c10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 4-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/32 = 1024.\nSets = 1024/4 = 256.\nOffset bits = log2(32) = 5; index bits = log2(256) = 8; tag bits = 57-5-8 = 44.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 32, "ways": 4, "addr_bits": 57, "lines": 1024, "sets": 256, "offset": 5, "index": 8, "tag": 44}, "prompt_sha1": "c9eef905dd2fe516a22f9824b66c59ffbc852d22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_60_msb` for `60-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_60_msb (\n input logic [59:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 60; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_60_msb", "width": 60, "priority": "high"}, "prompt_sha1": "f2ebd53f7c4dc629e8dc4b6a2afb06f790c424a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 180 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 180 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 180.0}, "prompt_sha1": "b2c4f4f6070b0dbf930edf783d838f0e96a93bb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6507(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6507(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6507([1, 2]) == 1.5\nassert mean_6507([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6507"}, "prompt_sha1": "a01ebac73ca9a821616c305a76ae1344807d1ee1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1200 ohm and C=22000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1200×22000×10^-12 s = 2.64e-05 s.\nf_c=1/(2πRC)=1/(2π×1200×22000×10^-12) = 6028.5963 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1200, "c_f": 2.2e-08, "tau": 2.6399999999999998e-05, "fc": 6028.59632923846}, "prompt_sha1": "8897a22f62565116397de81ef7f1781ce89cb054", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/680=0.0352941176 A. P=V²/R=24²/680=0.847058824 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 680, "i": 0.03529411764705882, "p": 0.8470588235294118}, "prompt_sha1": "833483657b0c8f433fc12ce4e4897e0cf4320a6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65489; x = x + 86;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65489+86 = 65575. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65575) mod 2^16 = 39. So `x` stores 39. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65489, "add": 86, "result": 39}, "prompt_sha1": "467fa2a33fab6fdcc46757f1868f6a6e11ddb84a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 16-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/16 = 8192.\nOffset bits = log2(16) = 4.\nIndex bits = log2(8192) = 13.\nTag bits = 64-13-4 = 47.\nCheck: 47+13+4 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 16, "addr_bits": 64, "lines": 8192, "offset_bits": 4, "index_bits": 13, "tag_bits": 47}, "prompt_sha1": "176c31ea1e03dcc984d9439aafd5129c8bb78a81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-20 = 8960 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 20, "mss": 8960}, "prompt_sha1": "8f6111f2ef9c8c561addaee71f30db1de5c337d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 30-bit right-shift register module `shiftreg_right_30`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `30-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_30 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [29:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[29:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_30", "width": 30, "direction": "right"}, "prompt_sha1": "a2bc0ed88ce50f0efea8e0e088602cd5c619e523", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1024 counts per period. What compare/high-time count produces exactly 87.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.875 × 1024 = 896. Verification: 896/1024 = 0.875, which is 87.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1024, "duty": 87.5, "high": 896}, "prompt_sha1": "47dd7966317dd6e52cd97df17dbc8e156ac8b3b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x2C8DE5D1D92E in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 2C 8D E5 D1 D9 2E.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 48987957745966, "endian": "big", "bytes": [44, 141, 229, 209, 217, 46]}, "prompt_sha1": "84867ea64bfaeccbe8ff639865229da52433b354", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 8 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×50×10^6 = 400000000 B/s. Time = 131072/400000000 = 0.00032768 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 8, "rate_mhz": 50, "sec": 0.00032768}, "prompt_sha1": "665fb943c1c4fe15ca5b1a180c2a6d9bf97942ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 2.5 V reference and returns code 1870. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 1870/4095 × 2.5 V = 1.141636 V.\nThus the estimated input is about 1.1416 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 2.5, "code": 1870, "volts": 1.1416361416361416}, "prompt_sha1": "998a5c365278daf410e2d3f8d9d010982858b477", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 0 and tail index 2, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (0-2) mod 8 = 6. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 0, "tail": 2, "occupancy": 6}, "prompt_sha1": "53a04fc7c869d82c750399f1a410f003422d857b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 85%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.040×(15+0.150×80) = 2.280000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.96, "l2": 15, "l2_hit": 0.85, "mem": 80, "amat": 2.280000000000001}, "prompt_sha1": "42a8fab5a352453245faf5db0481fed23ea55baf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 63-bit up/down counter `updown_63_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_63_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [62:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_63_wrap", "width": 63, "wrap": true}, "prompt_sha1": "4c2038da92a1104206054ca74cd4f8076c1bf0f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_37_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 37 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_37_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd37;\n end else begin\n if (pulse_in)\n count <= 6'd37;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_37_retrig", "cycles": 37, "retrigger": true}, "prompt_sha1": "4527c4682d6f7e37c58fdb77f9f3ed255a5a8c59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 0, 0], "final_state": 0}, "prompt_sha1": "e5a62acd0b59e8a5d735af974d1279db507d0422", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_78` for a synchronous sampled input `noisy`. Update output `clean` only after observing 78 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_78 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 77) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_78", "stable_samples": 78}, "prompt_sha1": "2597ff6516ae78b100b1b5b0af6077e7658af24c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 9000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 9000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 9000.0}, "prompt_sha1": "441b205bcc97162627f359e617dbef4376c12b85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w16_1191` implementing a dual-clock asynchronous FIFO with depth 16 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w16_1191 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 16,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w16_1191", "depth": 16, "width": 16, "ptr_w": 4}, "prompt_sha1": "13608cfa18f529f3440617238743d16095ed03d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=20 ms, C=2 ms,T=100 ms, C=2 ms,T=5 ms, C=5 ms,T=100 ms, C=1 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/20 + 2/100 + 2/5 + 5/100 + 1/20 = 0.720000 = 72.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 20], [2, 100], [2, 5], [5, 100], [1, 20]], "utilization": 0.7200000000000001}, "prompt_sha1": "09ba397744ede1da3cdfdba10280e32f7e1a1458", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 104 and initial occupancy is 72. In an abstract batch, producer attempts to enqueue 182 items first, dropping any excess beyond capacity; then consumer removes up to 173 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=104, dropped=150; consumed=104; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 104, "start": 72, "prod": 182, "cons": 173, "dropped": 150, "consumed": 104, "final": 0}, "prompt_sha1": "68b05f6db2a7cb693ff765862443c925e4ea1fe4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 80 MHz, prescaler divisor is 615, and period is 27106 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 80000000/(615×27106) = 4.798985 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 80000000, "prescaler": 615, "period": 27106, "hz": 4.79898549446647}, "prompt_sha1": "804e3cf6bc6cb3f31d4feb317bb75da1ad18b896", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(24×10^6) s = 0.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 8, "time_us": 0.33333333333333337}, "prompt_sha1": "34f89b868a34802b57a709925d9cb8b0629b7ffe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×100²=5e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 100, "energy": 4.9999999999999996e-05}, "prompt_sha1": "b4a99daf1efdaab52aff69c5cdb551586ec95f81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3586585686, carries 17974 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 17974+0+1 = 17975. ACK = (3586585686+17975) mod 2^32 = 3586603661.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3586585686, "payload": 17974, "syn": 0, "fin": 1, "ack": 3586603661}, "prompt_sha1": "06b710565983afc8b7a2611288a43bcde0bf4687", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xB7F315C6, set bit 40 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 40)`. Result = 0x100B7F315C6.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3086161350, "bit": 40, "op": "set", "result": 1102597789126}, "prompt_sha1": "d4fb8cd3e57dec0fa7c7c111fc51b281db14b03a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 74 and initial occupancy is 17. In an abstract batch, producer attempts to enqueue 174 items first, dropping any excess beyond capacity; then consumer removes up to 97 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=74, dropped=117; consumed=74; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 74, "start": 17, "prod": 174, "cons": 97, "dropped": 117, "consumed": 74, "final": 0}, "prompt_sha1": "4474e9dbc9e7044b9c00aad89f0b9ec4efa78cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/470=0.00212765957 A. P=V²/R=1²/470=0.00212765957 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 470, "i": 0.002127659574468085, "p": 0.002127659574468085}, "prompt_sha1": "81065e8f4a82ac544b3c5d9af6d3567c530cf99a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1407-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1407×8 = 11256 bits.\nSerialization delay = bits/rate = 11256/(2500×10^6) s = 4.5024e-06 s = 4.502400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1407, "rate_mbps": 2500, "delay_s": 4.5024e-06}, "prompt_sha1": "6df75e7cf6ed90368d602bc9547eb9f51a30883f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 75%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.040×(5+0.250×100) = 2.700000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.96, "l2": 5, "l2_hit": 0.75, "mem": 100, "amat": 2.700000000000001}, "prompt_sha1": "c1b3a0f613cec78439e7e5862851e3e5ca220a4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^17 V = 2.28881835938e-05 V = 22.888184 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 3.0, "step": 2.288818359375e-05}, "prompt_sha1": "a2dd0747659cd6e5cb687aec1893a45f9a76d9de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 16 = 2.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 16, "spi_hz": 2250000.0}, "prompt_sha1": "9944d93f2b2866b25eff87aee6524da0b6b89c73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 241. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 241/255 × 2.5 V = 2.362745 V.\nThus the estimated input is about 2.3627 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 241, "volts": 2.3627450980392157}, "prompt_sha1": "f893cbd85b7c9058d6209b73e80b7b173e4b7b80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 1011001111111001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 11 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1011001111111001", "ones": 11, "parity": 1}, "prompt_sha1": "6619789574beb008b9acdc135b5e3b93749d44c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x32_no_bypass` with 16 entries of 32 bits. Inputs: `clk`, `we`, `4-bit waddr`, `32-bit wdata`, `4-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [31:0] wdata,\n input logic [3:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x32_no_bypass", "entries": 16, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "f5c539b1ccd764f7945cd43ec3db452424b5acb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_7973` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_7973 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_7973", "width": 24}, "prompt_sha1": "a651e3ab43c8a0146966c2d73e9dad9a3d7a65de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 390 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×390)/(10+390) = 9.750000 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 390, "req": 9.749999999999998}, "prompt_sha1": "933cddc83c4377bd639be747c19e208d5db2ba92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w47_unsigned` comparing two 47-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w47_unsigned (\n input logic [46:0] a,\n input logic [46:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w47_unsigned", "width": 47, "signed": false}, "prompt_sha1": "2694ae0e8305923ca0f9bf61f5d1b93b86b7a2f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 101110101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101110101", "ones": 6, "parity": 0}, "prompt_sha1": "954dacad976eb4cd16db21e24d85e3651b0dc4dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=47 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/100 = -0.470000.\nVout = A_v×Vin = -0.470000×1 = -0.470000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 47, "vin": 1.0, "gain": -0.47, "vout": -0.47}, "prompt_sha1": "000a53deff48ef509acdededf19a786aa94d4b23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [8, 12, 29]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [8, 28, 49].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [8, 12, 29], "finish": [8, 28, 49]}, "prompt_sha1": "459c6297ca32d567138dec416ae2560e3fab7f9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.75 ns hit time, 93.9% hit rate, and a 140 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.939 = 0.061.\nAMAT = hit time + miss rate × miss penalty\n= 4.75 ns + 0.061×140 ns = 13.2900 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.75, "hit_rate": 0.939, "penalty": 140, "result": 13.290000000000008}, "prompt_sha1": "158326df304eec9c9de6cde8923d5bf79e2dae54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTNTTTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 0, 1, 1, 1, 1, 1], "final_state": 3}, "prompt_sha1": "d1dba49d52ad59e5f3a016522a9f8070c747c3d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.96.246.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.96.246.0\nBroadcast address: 10.96.246.7\nUsable host range: 10.96.246.1 to 10.96.246.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.96.246.0/29", "usable": 6, "first": "10.96.246.1", "last": "10.96.246.6", "broadcast": "10.96.246.7"}, "prompt_sha1": "b9f2fecdbe172ea39613b21050c14f581aed8aab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 57-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^57/2^14 = 2^43 = 8796093022208 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 57, "page_exp": 14, "entries": 8796093022208}, "prompt_sha1": "2e2ce27a9a72aaa8f821dac4c2d6595dc89e92e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Give exact timer prescaler and reload register values for a 500 Hz interrupt, but the timer input clock and register conventions are not specified.", "output": "Exact register values cannot be determined without the timer input clock and the device's prescaler/reload conventions. Those must be supplied before solving f_update = f_timer/(prescaler×period_counts).", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "7d017fe7707e5d7d4498fe6d1749488f506b2e76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xA2F0, set bit 13 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 13)`. Result = 0xA2F0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 41712, "bit": 13, "op": "set", "result": 41712}, "prompt_sha1": "3ec8abbee14b46fcdbbd92e0212c1ad510487bd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 00101001010010111110111101011011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 19 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00101001010010111110111101011011", "ones": 19, "parity": 1}, "prompt_sha1": "9e5f5854da887590f150dbb954d7953da814aa50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=2200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×2200×10^-12 s = 0.000594 s.\nf_c=1/(2πRC)=1/(2π×270000×2200×10^-12) = 267.9376 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 2.2e-09, "tau": 0.0005939999999999999, "fc": 267.93761463282044}, "prompt_sha1": "8f389637bd3fcb72eca0a43af20a1f7c97eaa113", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xEEC4C0BF in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: EE C4 C0 BF.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 4005871807, "endian": "big", "bytes": [238, 196, 192, 191]}, "prompt_sha1": "e4dff11eb76471934a53d3feea4ffb5815bf0fb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w31_cin` implementing a 31-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `31-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w31_cin (\n input logic [30:0] a,\n input logic [30:0] b,\n input logic cin,\n output logic [30:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w31_cin", "width": 31, "cin": true}, "prompt_sha1": "5bb5baab56fdba0968badb212585623815695a54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 6 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 6 = 9.\nClock pulses = 9×9 = 81.\nTime = 81/1000000 s = 81.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 6, "clocks": 81, "time_s": 8.1e-05}, "prompt_sha1": "41d530621c97cdc8d450ebfbb4800be517544dbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x8_no_bypass` with 64 entries of 8 bits. Inputs: `clk`, `we`, `6-bit waddr`, `8-bit wdata`, `6-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [7:0] wdata,\n input logic [5:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x8_no_bypass", "entries": 64, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "40ad709c112e92ea85b3a8f15a413561ed7ca28d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w46_cin` implementing a 46-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `46-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w46_cin (\n input logic [45:0] a,\n input logic [45:0] b,\n input logic cin,\n output logic [45:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w46_cin", "width": 46, "cin": true}, "prompt_sha1": "8fecfd1b7a3e2ff3e6efa799d3252d78280afab1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=56000 ohm and C=390000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=56000×390000×10^-12 s = 0.02184 s.\nf_c=1/(2πRC)=1/(2π×56000×390000×10^-12) = 7.2873 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 56000, "c_f": 3.8999999999999997e-07, "tau": 0.02184, "fc": 7.287314244134403}, "prompt_sha1": "80eb7c69327c2f3a025a96017eb72f9baeedb001", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.66.37.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.66.37.0\nBroadcast address: 10.66.37.63\nUsable host range: 10.66.37.1 to 10.66.37.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.66.37.0/26", "usable": 62, "first": "10.66.37.1", "last": "10.66.37.62", "broadcast": "10.66.37.63"}, "prompt_sha1": "7374d2630e3e81427ab2a93d62e19af05bba9ff3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w8_2966` implementing a dual-clock asynchronous FIFO with depth 4 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w8_2966 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 8,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w8_2966", "depth": 4, "width": 8, "ptr_w": 2}, "prompt_sha1": "340c17396643934c24d12e466a3b0dfe5126f09b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×40/1000/8 = 5000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 40, "bytes": 5000.0}, "prompt_sha1": "a0c55ad472b60a2d8e68fecfe20030aa5397585b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 95%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.100×(6+0.050×60) = 1.900000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.9, "l2": 6, "l2_hit": 0.95, "mem": 60, "amat": 1.9000000000000001}, "prompt_sha1": "f2be3efc5dd0201dbaa9ea197b451db024b6421a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10000 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10000×10^6 × 3/1000 = 3e+07 bits = 3.75e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10000, "rtt_ms": 3, "bits": 30000000.0, "bytes": 3750000.0}, "prompt_sha1": "47fd7e05b54e77d76d73b6cd03930a55152a8619", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 61 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 61-12 = 49.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 61, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 49}, "prompt_sha1": "400609923049efe1f47995fe350f9ae1a51cb63f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8656` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8656 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8656"}, "prompt_sha1": "501459602d6ca9f6b092962c6ffe5e466a19d824", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 6000 payload bytes plus 12 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 6000/(6000+12) = 0.998004 = 99.80%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 6000, "overhead": 12, "efficiency": 0.998003992015968}, "prompt_sha1": "7734d07b1bd20defba6e96bdb5d3757b71832dd8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w40_nocin` implementing a 40-bit unsigned adder with inputs `a`, `b` and outputs `40-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w40_nocin (\n input logic [39:0] a,\n input logic [39:0] b,\n output logic [39:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w40_nocin", "width": 40, "cin": false}, "prompt_sha1": "b1d85136b9c8b2d5c4b48964d419a8fd1ad8a491", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock L2 then C; consumer acquires C then L2. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds L2 while waiting for C, while consumer holds C while waiting for L2; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "4eafff65ec2924efa16550b612741f777e7f26c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_9671` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_9671 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_9671", "width": 12}, "prompt_sha1": "1ac82c7e2d3fda9dcf5710c44cb48a596d3bb072", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 90%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.010×(3+0.100×200) = 0.730000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.99, "l2": 3, "l2_hit": 0.9, "mem": 200, "amat": 0.7300000000000002}, "prompt_sha1": "3f23f059d4debcd7d99e8ce9ef0b68430ea36f18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (768×8) = 1627604.166667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 768, "pps": 1627604.1666666667}, "prompt_sha1": "97a4f6a10be61249126911f0abb6544b81be3635", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×1200)/(470+1200) = 337.724551 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 1200, "req": 337.7245508982036}, "prompt_sha1": "177bac7ef46f9429a859eeee4dfbfdb4edf84670", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11101100001000100 using generator polynomial bits 1110011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 011010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 115, "msg_bits": 17, "msg": 120900, "remainder": 26}, "prompt_sha1": "c8d896fc4899e2689ab39302f1f856047666c813", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 23019 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23019/2000000 s; frequency = 2000000/23019 = 86.884747 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 23019, "hz": 86.88474738259698}, "prompt_sha1": "54782436cb8d18af9a628858b757f77f08eb9b22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [24, 19, 28, 20, 6, 17]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [108, 98, 114, 102, 34, 95].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [24, 19, 28, 20, 6, 17], "finish": [108, 98, 114, 102, 34, 95]}, "prompt_sha1": "21ef204f8ee64672898f2d1317778c1791c5828b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3044 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3044/(3044+40+8) = 0.984476 = 98.45%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3044, "iphdr": 40, "eff": 0.9844760672703752}, "prompt_sha1": "7fdd43d6d821b3aee3b77e5573e71541db3570d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_581753` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_581753 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_581753"}, "prompt_sha1": "bce2eb72b296d260f9c0be17db76779509b153fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 807. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 807/16383 × 3 V = 0.147775 V.\nThus the estimated input is about 0.1478 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 807, "volts": 0.14777513275956783}, "prompt_sha1": "ff1e20d235f9f87b394e18f27edd2611dbac0215", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.74. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.74) + 0.74/3) = 1.973684.\nThe theoretical speedup is about 1.974×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.74, "n": 3, "result": 1.9736842105263157}, "prompt_sha1": "a3f4c8205a5629d06ec5449091f68290890060cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (128×8) = 97656250.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 128, "pps": 97656250.0}, "prompt_sha1": "af93eef9855338c3756a9491457f55416cb8ba3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 39 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 39×9 = 351. Time = 351/4800 = 0.073125 s = 73.125000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 5, "parity": 1, "stop": 2, "frames": 39, "seconds": 0.073125}, "prompt_sha1": "dc5acbb4cacca9f4e1dbd3f4b9839cf73259ea4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 120 MHz, prescaler divisor is 328, and period is 33681 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 120000000/(328×33681) = 10.862316 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 120000000, "prescaler": 328, "period": 33681, "hz": 10.862315802279783}, "prompt_sha1": "b8f52de89bdc70eeefef34e8d260083614c5b00c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 818 elements. Review loop `for i in range(818+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(818+1)` includes index 818, which is out of range for a length-818 sequence. Correct loop: `for i in range(818):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 818, "variant": "one_past"}, "prompt_sha1": "f98adc7a07cbbadf9b3cb6466102201e439a45a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_758318` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_758318 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_758318"}, "prompt_sha1": "c4ea39b16a55ff131251d25e9afb06d26be8307b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 53 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 53 = 56.\nClock pulses = 56×9 = 504.\nTime = 504/400000 s = 1260.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 53, "clocks": 504, "time_s": 0.00126}, "prompt_sha1": "989843afea92a4e555e84fb6645a04f699cfe1fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=2.2 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×47/(2.2+47) = 8.597561 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 2.2, "r2": 47, "vout": 8.597560975609756}, "prompt_sha1": "2241179ef7a7b4fc98ea50e90334442c2531118a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=10 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/2.2 = -4.545455.\nVout = A_v×Vin = -4.545455×0.25 = -1.136364 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 10, "vin": 0.25, "gain": -4.545454545454545, "vout": -1.1363636363636362}, "prompt_sha1": "9488079175a818aa2ea1fd191cebe9483977cc5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 273033261, carries 65223 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 65223+0+0 = 65223. ACK = (273033261+65223) mod 2^32 = 273098484.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 273033261, "payload": 65223, "syn": 0, "fin": 0, "ack": 273098484}, "prompt_sha1": "efa05b7cb11851d91a072d27be8ca3debe60099f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 960 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 960 = 144. Verification: 144/960 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 960, "duty": 15, "high": 144}, "prompt_sha1": "e8c59e85fb03f8acb76ec561d83337578db64d4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_4209` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_4209 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_4209", "width": 8}, "prompt_sha1": "997835941b935452b284086e8b83ec204361c314", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 20 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 20000000/500 = 40000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 40000 that also keeps the period count within 16 bits is 8000.\nPeriod count = 40000/8000 = 5.\nPSC register = 8000-1 = 7999.\nARR register = 5-1 = 4.\nVerification: 20000000/(8000×5) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 20000000, "target_hz": 500, "total_division": 40000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 8000, "period": 5, "psc_reg": 7999, "arr_reg": 4}, "prompt_sha1": "6aa9d9c8c265a957cf9404758fc2878c87d8a285", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5859` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5859 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5859"}, "prompt_sha1": "c5931dbbd6c0a1cd2993ff11f89eb576cbfea59e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=47 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/4.7 = -10.000000.\nVout = A_v×Vin = -10.000000×0.2 = -2.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 47, "vin": 0.2, "gain": -10.0, "vout": -2.0}, "prompt_sha1": "351248e19cec1989649cfb644660efa62a184b2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 80%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.050×(4+0.200×120) = 2.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.95, "l2": 4, "l2_hit": 0.8, "mem": 120, "amat": 2.200000000000001}, "prompt_sha1": "96cb770829af4122af331734919755b99b6b213b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_6` for a 6-bit unsigned input `data`, `3-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_6 (\n input logic [5:0] data,\n input logic [2:0] shamt,\n output logic [5:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_6", "width": 6, "direction": "right", "arithmetic": false}, "prompt_sha1": "2c1c8f0b05b531f936ead23999a099deb105fb50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 60-bit up/down counter `updown_60_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_60_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [59:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 60'd1152921504606846975) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_60_sat", "width": 60, "wrap": false}, "prompt_sha1": "ff4ae747c614b70f3a4242a24fa5606572c460ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=4.7 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/2.2 = -2.136364.\nVout = A_v×Vin = -2.136364×0.25 = -0.534091 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 4.7, "vin": 0.25, "gain": -2.1363636363636362, "vout": -0.5340909090909091}, "prompt_sha1": "3622d9c4a64d69fed8f12f9af5ae6531376757bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 95%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.030×(15+0.050×100) = 1.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.97, "l2": 15, "l2_hit": 0.95, "mem": 100, "amat": 1.6000000000000005}, "prompt_sha1": "f41af960cc716c3c5a6c1987371461e59d62401e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_123` for a synchronous sampled input `noisy`. Update output `clean` only after observing 123 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_123 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 122) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_123", "stable_samples": 123}, "prompt_sha1": "f9a9447a782e0bc451497f9398bf15a401e3a51d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x90. Extract the 4-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x90 >> 4) & 0xF = 0x9 (9).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 4, "value": 144, "mask": 15, "field": 9}, "prompt_sha1": "c3cd9b997ec0d985c147199127d2251a27351ba9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 84 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 9600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 84000000/(16×9600) = 546.875000.\nNearest integer divisor D = 547.\nActual baud = 84000000/(16×547) = 9597.806 baud.\nError = (9597.806-9600)/9600×100% = -0.0229%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 84000000, "oversample": 16, "baud": 9600, "divisor": 547, "actual": 9597.806215722121, "error_pct": -0.022851919561238294}, "prompt_sha1": "97515b110c0b2c88e013e168f551744f814e0566", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 1000 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×1000×10^6×2 = 24.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 1000, "channels": 2, "gbps": 24.0}, "prompt_sha1": "b4203e107a21d8b7728b3337fbadec5d7f945c7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 120 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×120)/(150+120) = 66.666667 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 120, "req": 66.66666666666667}, "prompt_sha1": "2dd84f805b210ece0d3d5c49125afa1aef59e7f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x9DF0CEBF. Extract the 4-bit field starting at bit 28 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x9DF0CEBF >> 28) & 0xF = 0x9 (9).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 28, "value": 2649804479, "mask": 15, "field": 9}, "prompt_sha1": "2ecf67ffc11211e4760b20e2347b14bbf9c2edc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_47_2` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 47, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_47_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 46) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_47_2", "red": 28, "green": 47, "yellow": 2}, "prompt_sha1": "8577416245c4aedd1442d74976e8dd8ac41a5db9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 95%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.100×(10+0.050×200) = 3.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.9, "l2": 10, "l2_hit": 0.95, "mem": 200, "amat": 3.2}, "prompt_sha1": "a4aaecc10026607edfa7bcec9d3375c86ad2dc2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 100 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 100000000/800 = 125000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 125000 that also keeps the period count within 16 bits is 15625.\nPeriod count = 125000/15625 = 8.\nPSC register = 15625-1 = 15624.\nARR register = 8-1 = 7.\nVerification: 100000000/(15625×8) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 100000000, "target_hz": 800, "total_division": 125000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 15625, "period": 8, "psc_reg": 15624, "arr_reg": 7}, "prompt_sha1": "ade35ddad4f0d95242de81d8310f93592c171bc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 38319 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 38319/50000000 s; frequency = 50000000/38319 = 1304.835721 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 38319, "hz": 1304.835721182703}, "prompt_sha1": "3e6b760058d015faad86a7faeb74709a8455bc93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.91.228.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.91.228.0\nBroadcast address: 10.91.228.127\nUsable host range: 10.91.228.1 to 10.91.228.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.91.228.0/25", "usable": 126, "first": "10.91.228.1", "last": "10.91.228.126", "broadcast": "10.91.228.127"}, "prompt_sha1": "a4d9e9a8c3ab8daf0830a5c5e33e16da54c4e696", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 256-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/256 = 1024.\nOffset bits = log2(256) = 8.\nIndex bits = log2(1024) = 10.\nTag bits = 48-10-8 = 30.\nCheck: 30+10+8 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 256, "addr_bits": 48, "lines": 1024, "offset_bits": 8, "index_bits": 10, "tag_bits": 30}, "prompt_sha1": "4c6ddd456fb6bec784af533635d256e3e3ef10bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 960 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "92bb841538de33b2d8553847b47224986946f465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 85%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.010×(15+0.150×100) = 2.300000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.99, "l2": 15, "l2_hit": 0.85, "mem": 100, "amat": 2.3000000000000003}, "prompt_sha1": "a3645e240c7fdfaeedef1976f6eb9b5af71df4c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5068 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5068/(5068+40+8) = 0.990618 = 99.06%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5068, "iphdr": 40, "eff": 0.9906176700547302}, "prompt_sha1": "5112beb0ade00d3c020b7d55c0e7e7d1d835106d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `size` elements of type `int`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n acc += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `data[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n acc += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "156624e0c6fe5ef35ec392860b0d3c5e27a1607d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4175287361, carries 27749 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 27749+0+0 = 27749. ACK = (4175287361+27749) mod 2^32 = 4175315110.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4175287361, "payload": 27749, "syn": 0, "fin": 0, "ack": 4175315110}, "prompt_sha1": "51b162e32f5b31d9040a03bf35dd410652fc20a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111101000010010111 using generator polynomial bits 11101. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 29, "msg_bits": 18, "msg": 250007, "remainder": 10}, "prompt_sha1": "31ee5b02ba8e298777e56a4348067f23bf427e49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 5% of instructions, the branch misprediction rate is 20%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.200 × 12 = 0.120000.\nEffective CPI = 1 + 0.120000 = 1.120000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.05, "mispred": 0.2, "penalty": 12, "result": 1.12}, "prompt_sha1": "3a7f32ee56f4b61aa8b86bfe584706a6a140f855", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 34-bit right-shift register module `shiftreg_right_34`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `34-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_34 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [33:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[33:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_34", "width": 34, "direction": "right"}, "prompt_sha1": "544b0f0f7ad24cfa4a42cbf5c2668da550b4461a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_51` for a 51-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_51 (\n input logic [50:0] data,\n input logic [5:0] shamt,\n output logic [50:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_51", "width": 51, "direction": "right", "arithmetic": false}, "prompt_sha1": "116c21d4704477af24e60ae04754d7df096530d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 32-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/32 = 4096.\nOffset bits = log2(32) = 5.\nIndex bits = log2(4096) = 12.\nTag bits = 24-12-5 = 7.\nCheck: 7+12+5 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 32, "addr_bits": 24, "lines": 4096, "offset_bits": 5, "index_bits": 12, "tag_bits": 7}, "prompt_sha1": "afa239a350cd2219ec087004d52b1f03a8480f86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1342848662, carries 58054 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 58054+1+1 = 58056. ACK = (1342848662+58056) mod 2^32 = 1342906718.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1342848662, "payload": 58054, "syn": 1, "fin": 1, "ack": 1342906718}, "prompt_sha1": "f2dd62595ad6b8e3e841f027083601efb3b58207", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-24 = 1224 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 24, "mss": 1224}, "prompt_sha1": "103c3f90c518f40f736b44db69c95b65b07bba86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "56e3d32561a632268879a0962febe14b17b0d00f", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "469eddd0bc907494b947ec1cd4b2891a6e432bfb5c8b1a87e867b97c13a8813c", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 1449, "original_row_sha256": "ba7011613b95b18a7a850999a1035d4f4c7d637d00303bc9496c1e513a1cbd91", "version": "v1.0.0-rc1"}}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=10 ms, C=2 ms,T=100 ms, C=3 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/10 + 2/100 + 3/40 = 0.295000 = 29.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 10], [2, 100], [3, 40]], "utilization": 0.295}, "prompt_sha1": "7f6ea58340e9f4c871163ef2ef66b403f590adb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3.3 V reference and returns code 2121. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 2121/16383 × 3.3 V = 0.427229 V.\nThus the estimated input is about 0.4272 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.3, "code": 2121, "volts": 0.42722944515656475}, "prompt_sha1": "b1e250cb4b48d0091f8313183ac6fc6c3fcf8dcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 212; x = x + 180;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 212+180 = 392. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (392) mod 2^8 = 136. So `x` stores 136. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 212, "add": 180, "result": 136}, "prompt_sha1": "1a28b9d067c93d0133891694d882cd74d14f392a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 4 = 0.090000.\nEffective CPI = 1 + 0.090000 = 1.090000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.15, "penalty": 4, "result": 1.09}, "prompt_sha1": "aef7b932140b47499eb8a91be0c2697566b15913", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=10 nF and is stepped to 1 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1(1-e^-0.5)=0.393469 V; τ=4.7e-05 s and t=2.35e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1e-08, "multiple": 0.5, "vin": 1, "vc": 0.3934693402873666}, "prompt_sha1": "b7342c55419ead6e82b03b3568070154ad43df20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 117 elements. Review loop `for i in range(117-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(117-1)` produces indices 0 through 115, so index 116 is skipped. Correct loop: `for i in range(117):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 117, "variant": "miss_last"}, "prompt_sha1": "ff8538c2e9cc9ad8ccd5b1686d8b728f93c80b12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 29624 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 29624/50000000 s; frequency = 50000000/29624 = 1687.820686 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 29624, "hz": 1687.8206859303268}, "prompt_sha1": "e387c27774bb9364ba8df992315e370f68edea1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3 V reference and returns code 14. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 14/255 × 3 V = 0.164706 V.\nThus the estimated input is about 0.1647 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.0, "code": 14, "volts": 0.16470588235294117}, "prompt_sha1": "f6039e281dfed5b1f7f445d37b421c7881d25c9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 51 and initial occupancy is 39. In an abstract batch, producer attempts to enqueue 91 items first, dropping any excess beyond capacity; then consumer removes up to 11 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=51, dropped=79; consumed=11; final occupancy=40.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 51, "start": 39, "prod": 91, "cons": 11, "dropped": 79, "consumed": 11, "final": 40}, "prompt_sha1": "ce06e76fbeb9472c17db64d525a4e2b8d06ef028", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x6AF7. Extract the 8-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x6AF7 >> 3) & 0xFF = 0x5E (94).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 8, "lsb": 3, "value": 27383, "mask": 255, "field": 94}, "prompt_sha1": "045929a3b1f22d109ae1480d65b0882712c409e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 8%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.080 × 8 = 0.160000.\nEffective CPI = 1.2 + 0.160000 = 1.360000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.08, "penalty": 8, "result": 1.3599999999999999}, "prompt_sha1": "dbc91498a4499efbff96b759c458fa6b598346d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=40 ms, C=1 ms,T=5 ms, C=1 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/40 + 1/5 + 1/5 = 0.475000 = 47.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 40], [1, 5], [1, 5]], "utilization": 0.47500000000000003}, "prompt_sha1": "e2eaa43025e1bb6650874a33f30cc13fd5e2b88e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `words` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `words[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "25744e5343e356f535abf40edcc47c2af0c16f50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 36-bit right-shift register module `shiftreg_right_36`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `36-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_36 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [35:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[35:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_36", "width": 36, "direction": "right"}, "prompt_sha1": "1290015d711ac86c63351f6646bda5d2edde3654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×0.5/1000/8 = 625000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 0.5, "bytes": 625000.0}, "prompt_sha1": "51dbebdebf1181b14b0fa9e5aa91bcfcd758717a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 8 KiB cache with 32-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "d56012fa1db11174b00794d965bc361d1dd969c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [3, 15, 28, 1, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [3, 35, 51, 10, 20].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [3, 15, 28, 1, 4], "finish": [3, 35, 51, 10, 20]}, "prompt_sha1": "b5d5287216d4878b68b9c5c90bb98164b8d5ae7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock QUEUE then BUS; worker_2 acquires BUS then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds QUEUE while waiting for BUS, while worker_2 holds BUS while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUS before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "93d87b01f1ae1061a2986515cbe327364ab99d4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_33_56_14` with RED, GREEN, YELLOW states. Hold RED for 33 clock cycles, GREEN for 56, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_33_56_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 32) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 55) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_33_56_14", "red": 33, "green": 56, "yellow": 14}, "prompt_sha1": "f0f12ef1858db7d7d996714174afa4f73ef30e15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_565935` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_565935 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_565935"}, "prompt_sha1": "f4aa30427da71dcc59e28923f33b7acc19e0c281", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_4802` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_4802 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_4802", "width": 8}, "prompt_sha1": "388f906a1c3fabd95f957e82f6a750be25195b2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 16-way set-associative cache uses 32-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/32 = 8192.\nSets = 8192/16 = 512.\nOffset bits = log2(32) = 5; index bits = log2(512) = 9; tag bits = 40-5-9 = 26.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 32, "ways": 16, "addr_bits": 40, "lines": 8192, "sets": 512, "offset": 5, "index": 9, "tag": 26}, "prompt_sha1": "66a373486b05d5623635ab621bd361eccc74b68e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w64_8650` implementing a dual-clock asynchronous FIFO with depth 16 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w64_8650 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 64,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w64_8650", "depth": 16, "width": 64, "ptr_w": 4}, "prompt_sha1": "0ba27ae4d56a1793d01105f83e080e7896f9a8b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=10 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×4.7/(10+4.7) = 7.673469 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 10, "r2": 4.7, "vout": 7.6734693877551035}, "prompt_sha1": "1e21099dc43cb136b832ac809144a31c149289b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5379-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5379×8 = 43032 bits.\nSerialization delay = bits/rate = 43032/(100×10^6) s = 0.00043032 s = 430.320000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5379, "rate_mbps": 100, "delay_s": 0.00043032}, "prompt_sha1": "bfa70a38d3107d73382b7e9a02015109fbd2ba62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 2000 payload bytes plus 12 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 2000/(2000+12) = 0.994036 = 99.40%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 2000, "overhead": 12, "efficiency": 0.9940357852882704}, "prompt_sha1": "bd00afdd0d8fbb1fed1fb16d1359a7f3854451c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_121_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 121 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_121_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd121;\n end else begin\n if (pulse_in)\n count <= 7'd121;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_121_retrig", "cycles": 121, "retrigger": true}, "prompt_sha1": "ecaef234898858931b0c1407faba413376c22a85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×40/1000/8 = 125000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 40, "bytes": 125000000.0}, "prompt_sha1": "ad2d5f4d4be22ed9997517cfe688ac2645350dc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1800 ohm and C=6800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1800×6800000×10^-12 s = 0.01224 s.\nf_c=1/(2πRC)=1/(2π×1800×6800000×10^-12) = 13.0029 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1800, "c_f": 6.8e-06, "tau": 0.012240000000000001, "fc": 13.002854827769227}, "prompt_sha1": "a49aea8eaf2bc1258767e4d3365fc34ef2d671ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(2×10^6) s = 16.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 32, "time_us": 16.0}, "prompt_sha1": "33b8a967913db0c65441b7d27e25157463c68d89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x57, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x57<<1)|1 = 0xAF = 10101111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 87, "rw": 1, "byte": 175}, "prompt_sha1": "29e2fbd38a0dddb21fa8bef8b9a5fffe133cecfd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x23B4950AF590FEA0 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 23 B4 95 0A F5 90 FE A0.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 2572845161437527712, "endian": "big", "bytes": [35, 180, 149, 10, 245, 144, 254, 160]}, "prompt_sha1": "764228d2f49889a742d0b0b3b27da802f0e8409a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×32 KiB = 1536 KiB = 1572864 bytes = 1.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 32, "reach": 1572864}, "prompt_sha1": "6097cc192562612dfa2bc38341eed71c34444110", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3642-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3642×8 = 29136 bits.\nSerialization delay = bits/rate = 29136/(25000×10^6) s = 1.16544e-06 s = 1.165440 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3642, "rate_mbps": 25000, "delay_s": 1.16544e-06}, "prompt_sha1": "061c91b77e7da578253de21d64b192f5c9099465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 95%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.040×(3+0.050×40) = 2.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.96, "l2": 3, "l2_hit": 0.95, "mem": 40, "amat": 2.2}, "prompt_sha1": "e4579673ece26f6210d8e21c63fdad393d6c58d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 3.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+14 = 17.5. Period = 17.5/10000000 = 1.75e-06 s. Maximum rate = 1/period = 571428.571429 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 3.5, "conv_cycles": 14, "period": 1.75e-06, "rate": 571428.5714285715}, "prompt_sha1": "56c225fa8609fc90c9794fbe16f8cf33def47166", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 0.75 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×0.75/(1.2×10^9) = 0.00625 s = 6.250000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 0.75, "ghz": 1.2, "sec": 0.00625}, "prompt_sha1": "1717e555c4cfe8bbc184edd931368b4139cd9cbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_720997` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_720997 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_720997"}, "prompt_sha1": "06ef1787a07ffd4dbe0ec31849984d607b13b278", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 5 and tail index 8, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (5-8) mod 16 = 13. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 5, "tail": 8, "occupancy": 13}, "prompt_sha1": "87ab70297941d8699c3e4ab1087dfa597d98839b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [12, 25, 14, 9, 21, 14]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [52, 95, 75, 61, 94, 81].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [12, 25, 14, 9, 21, 14], "finish": [52, 95, 75, 61, 94, 81]}, "prompt_sha1": "cf9e558c6342a3f8f897c2813bf480d4892c21e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 713, and period is 29073 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(713×29073) = 7.718637 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 713, "period": 29073, "hz": 7.7186367787542975}, "prompt_sha1": "e06c54fe0d759e22c782cf1fa528802997a853ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/47000=0.000510638298 A. P=V²/R=24²/47000=0.0122553191 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 47000, "i": 0.0005106382978723404, "p": 0.01225531914893617}, "prompt_sha1": "c192a22be844175e39714c9869cafdfa7912dbcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 15 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 15/1000 = 30000 bits = 3750 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 15, "bits": 30000.0, "bytes": 3750.0}, "prompt_sha1": "28a5bd968e637dd1bbddd8a82e258c37a04cb956", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=220 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/1 = -220.000000.\nVout = A_v×Vin = -220.000000×0.5 = -110.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 220, "vin": 0.5, "gain": -220.0, "vout": -110.0}, "prompt_sha1": "b80eedc411975ed38865604b1ec14e6450da5b89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [17, 16, 1]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [34, 33, 5].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [17, 16, 1], "finish": [34, 33, 5]}, "prompt_sha1": "822070743d48d4cde971afc08a75eb9754679100", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_4036` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_4036 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_4036", "width": 12}, "prompt_sha1": "a205a6044bbc35fed69415fcd0fac9434ac24ca4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_37` for a synchronous sampled input `noisy`. Update output `clean` only after observing 37 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_37 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 36) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_37", "stable_samples": 37}, "prompt_sha1": "2c3e1905851d043489460eee8139e2a2f313f07b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 32 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 32/(32+64) = 0.333333 = 33.33%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 32, "overhead": 64, "efficiency": 0.3333333333333333}, "prompt_sha1": "239e4a629971b616cd2eec516c470b16f43ad785", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_8713` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_8713 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_8713"}, "prompt_sha1": "13147aed6769ae9e03a366069117cd1d0d66c763", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [29, 10, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [55, 25, 46].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [29, 10, 16], "finish": [55, 25, 46]}, "prompt_sha1": "fa553d7f5c06a64788e1fbef0c07337eb771228d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=8200 ohm and C=3900000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=8200×3900000×10^-12 s = 0.03198 s.\nf_c=1/(2πRC)=1/(2π×8200×3900000×10^-12) = 4.9767 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 8200, "c_f": 3.9e-06, "tau": 0.03198, "fc": 4.976702410628373}, "prompt_sha1": "d4c1994ae3b2a89719bcb9d1416f5e22b173827d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 256-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/256 = 4.\nOffset bits = log2(256) = 8.\nIndex bits = log2(4) = 2.\nTag bits = 28-2-8 = 18.\nCheck: 18+2+8 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 256, "addr_bits": 28, "lines": 4, "offset_bits": 8, "index_bits": 2, "tag_bits": 18}, "prompt_sha1": "32f47be2945f398c0ab88152bb55d41ca21f9a4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_299478` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_299478 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_299478"}, "prompt_sha1": "f1fe4809bcf9e2bcb6b0ed0a365ecf1d5f49fd60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1769 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1769/(1769+20+8) = 0.984418 = 98.44%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1769, "iphdr": 20, "eff": 0.9844184752365053}, "prompt_sha1": "cc346b678eb5b9d5708b652cb40d9803d92487e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_46` for a 46-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_46 (\n input logic [45:0] data,\n input logic [5:0] shamt,\n output logic [45:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_46", "width": 46, "direction": "left", "arithmetic": false}, "prompt_sha1": "a046f5f1670afa8436451e7a3f0c3bf53affb7f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [4, 8, 26, 6, 3, 29]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [19, 33, 71, 28, 15, 76].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [4, 8, 26, 6, 3, 29], "finish": [19, 33, 71, 28, 15, 76]}, "prompt_sha1": "522fc68a51e14ab142b88e56506729d9e22159e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_6057` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_6057 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_6057", "width": 8}, "prompt_sha1": "619d7b61fe21863f9acdfc7430f15505e48b73d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2587(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2587(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2587([1, 2]) == 1.5\nassert mean_2587([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2587"}, "prompt_sha1": "8f1f1604f0669fe337c5b12258b3992a74717f61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_78` generating a one-clock-cycle `tick` every 78 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_78 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 77) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_78", "divide": 78}, "prompt_sha1": "8a8899185543f3192b22f1ac385cc0803c80fa3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=50 ms, C=1 ms,T=5 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/50 + 1/5 + 2/25 = 0.320000 = 32.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 50], [1, 5], [2, 25]], "utilization": 0.32}, "prompt_sha1": "f76e05ea1f495e39d587922aeeb6c26d4cc16d03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (9000×8) = 555555.555556 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 9000, "pps": 555555.5555555555}, "prompt_sha1": "2db79dcb132c3acc54c607066f0878ee709edda9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 230400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(4×230400) = 6.510417.\nNearest integer divisor D = 7.\nActual baud = 6000000/(4×7) = 214285.714 baud.\nError = (214285.714-230400)/230400×100% = -6.9940%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 4, "baud": 230400, "divisor": 7, "actual": 214285.7142857143, "error_pct": -6.994047619047618}, "prompt_sha1": "7fea7000db41d9cf97ace2db5e304b4e5ec815b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 956 elements. Review loop `for i in range(956-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(956-1)` produces indices 0 through 954, so index 955 is skipped. Correct loop: `for i in range(956):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 956, "variant": "miss_last"}, "prompt_sha1": "1f6db0dc0ce5418822c73729e4e4aaa18b5f150f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111011000110101101010 using generator polynomial bits 10011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 19, "msg_bits": 21, "msg": 1936746, "remainder": 6}, "prompt_sha1": "26975693c9dc83d22831f56a3137ebb291c2f9e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `entries` elements of type `double`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n result += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `values[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n result += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "125320c7a86200fc8ab429aa1c18e69c69c50606", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w24_unsigned` comparing two 24-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w24_unsigned (\n input logic [23:0] a,\n input logic [23:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w24_unsigned", "width": 24, "signed": false}, "prompt_sha1": "354a9067589fe1eeaf537230bbb2a2786c0a5025", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "P", "P", "P", "V", "V", "P", "V", "V"], "value": 5, "blocked": 0}, "prompt_sha1": "a131b8ed561f32d94cccd1d4e347c952d2e121f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 2-way set-associative cache uses 128-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/128 = 1024.\nSets = 1024/2 = 512.\nOffset bits = log2(128) = 7; index bits = log2(512) = 9; tag bits = 57-7-9 = 41.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 128, "ways": 2, "addr_bits": 57, "lines": 1024, "sets": 512, "offset": 7, "index": 9, "tag": 41}, "prompt_sha1": "008e7bc3c3e2867278e9875838329b1814b48dd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3817` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3817 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3817"}, "prompt_sha1": "aca8444b9380ee548b2fd8b0eb3e1c6bf8d5bb4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=100 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/47 = -2.127660.\nVout = A_v×Vin = -2.127660×0.5 = -1.063830 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 100, "vin": 0.5, "gain": -2.127659574468085, "vout": -1.0638297872340425}, "prompt_sha1": "9aa016b387973e72f12e884fa347056e9b754a54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 440 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 440 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 440.00000000000006}, "prompt_sha1": "3d5d9a50d77e49bf61e5026be04d84fcbdde5035", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_232` generating a one-clock-cycle `tick` every 232 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_232 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 231) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_232", "divide": 232}, "prompt_sha1": "9162a48b4a436515bab73419f0cb39b08ec37f94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111101101100101100000 using generator polynomial bits 111110011. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 00111110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 499, "msg_bits": 21, "msg": 2021728, "remainder": 62}, "prompt_sha1": "bfe9bf93a383baf41af8df7eed46aa2777e904ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8861(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8861(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8861([1, 2]) == 1.5\nassert mean_8861([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8861"}, "prompt_sha1": "5f872d334e1acdbfad6409b7cc31214cf53eb6f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 2000 payload bytes plus 38 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 2000/(2000+38) = 0.981354 = 98.14%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 2000, "overhead": 38, "efficiency": 0.9813542688910697}, "prompt_sha1": "f4dbf0b483c472736cab4117a2be4fb84324deed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 982507899, carries 56284 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 56284+0+0 = 56284. ACK = (982507899+56284) mod 2^32 = 982564183.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 982507899, "payload": 56284, "syn": 0, "fin": 0, "ack": 982564183}, "prompt_sha1": "fb0a493b780275dbdd3df8f36822b07c00586eca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 17.7 V source drives a 150 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 17.7-2.9 = 14.8 V.\nI = V/R = 14.8/150 A = 98.6667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 17.7, "vf": 2.9, "r": 150, "current_a": 0.09866666666666667}, "prompt_sha1": "1b5a8ce8c8c2af3759baf140ab3aa4ccb77135ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7528(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7528(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7528([1, 2]) == 1.5\nassert mean_7528([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7528"}, "prompt_sha1": "cb2cbfbcfcc35ee55946e01998de271faa7106aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x87498D151DA5D52D in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 2D D5 A5 1D 15 8D 49 87.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 9748477990251386157, "endian": "little", "bytes": [45, 213, 165, 29, 21, 141, 73, 135]}, "prompt_sha1": "c7797f98d052bd9e9d5b49b172bdb5a47aab0ddc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 53-bit up/down counter `updown_53_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_53_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [52:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 53'd9007199254740991) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_53_sat", "width": 53, "wrap": false}, "prompt_sha1": "1686d435c3a35004c395364907c0bd8a1a55a3c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=1 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(1+10) = 4.545455 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 1, "r2": 10, "vout": 4.545454545454546}, "prompt_sha1": "2133d0216433635fee586c54d5ab9171ed2b3613", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×4 KiB = 32 KiB = 32768 bytes = 0.031250 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 4, "reach": 32768}, "prompt_sha1": "6b7c81af39580af8346544d83c1d2fe37e66a474", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock B then STATE; T2 acquires STATE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds B while waiting for STATE, while T2 holds STATE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2e7ac5b4e220b16af6047442dffb63550991ac1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x829D, set bit 14 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 14)`. Result = 0xC29D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 33437, "bit": 14, "op": "set", "result": 49821}, "prompt_sha1": "0adfebec7b6f6a58bcdfe9b266cacb784b7a2ef1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.40.197.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.40.197.0\nBroadcast address: 10.40.197.31\nUsable host range: 10.40.197.1 to 10.40.197.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.40.197.0/27", "usable": 30, "first": "10.40.197.1", "last": "10.40.197.30", "broadcast": "10.40.197.31"}, "prompt_sha1": "4a138b3c8630cce5caa14fa48de8ebf165e16fe0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x40_no_bypass` with 4 entries of 40 bits. Inputs: `clk`, `we`, `2-bit waddr`, `40-bit wdata`, `2-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [39:0] wdata,\n input logic [1:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x40_no_bypass", "entries": 4, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "03a6d63650ab2e5cf55603f4bba1609ba15c7eec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 3` on one shared integer without synchronization. Assume `events` initially equals 216. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 216; T2 reads 216; both compute 219; T1 writes 219; T2 writes 219. The observed final value is 219, but two serial increments would produce 222.\n\n```\nlock(mutex)\nevents = events + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "2d703a54a9ed81637aaa886103ceabab5a2092e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_21_msb` for `21-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_21_msb (\n input logic [20:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 21; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_21_msb", "width": 21, "priority": "high"}, "prompt_sha1": "cab13e48bbed4cae3f214a4b4d6d20379843c81b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 65536 bytes over a datapath transferring 16 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×4×10^6 = 64000000 B/s. Time = 65536/64000000 = 0.001024 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 65536, "width": 16, "rate_mhz": 4, "sec": 0.001024}, "prompt_sha1": "21fede953c26e29729df356abf91549be48ab2ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 20 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 20 MHz / 128 = 0.156250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 20000000.0, "divider": 128, "spi_hz": 156250.0}, "prompt_sha1": "166ab5cf94cddf02692ff369dfeb9edbf409348a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 39434 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 39434/100000 s; frequency = 100000/39434 = 2.535883 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 39434, "hz": 2.5358827407820663}, "prompt_sha1": "548f337dd83cc933ba978081f6d9294f5f2489d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7555(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7555(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7555([1, 2]) == 1.5\nassert mean_7555([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7555"}, "prompt_sha1": "73607cc447a1b413c9149a306016629fccf9689b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1400 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-20-40 = 1340 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 20, "tcphdr": 40, "mss": 1340}, "prompt_sha1": "4138b5dacbc8edce5b1a35787c66bbd2c90d56f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=1000 nF and is stepped to 9 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=9(1-e^-1)=5.689085 V; τ=0.0001 s and t=0.0001 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 1.0000000000000002e-06, "multiple": 1, "vin": 9, "vc": 5.6890850294570185}, "prompt_sha1": "48b1b2f171a2bd55be4769f055c3501d5668749e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNTTTNTNTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1], "final_state": 2}, "prompt_sha1": "d89ae559cd4bbeceac2784e73d843a993304fdaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 200 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×200×10^6×1 = 6.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 200, "channels": 1, "gbps": 6.4}, "prompt_sha1": "313e6e8c0175e6c57b4f20003beb3a34e07acf45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 9.8 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 2.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 9.8-2.7 = 7.1 V.\nI = V/R = 7.1/560 A = 12.6786 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 9.8, "vf": 2.7, "r": 560, "current_a": 0.01267857142857143}, "prompt_sha1": "0e2fed653bafb8646696c8e5f1a5be7ff0acfb5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×2048 KiB = 2097152 KiB = 2147483648 bytes = 2048.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 2048, "reach": 2147483648}, "prompt_sha1": "65a7b77774242198ffa83274f2c8d08787c06ffe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 594 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "f7ba03ab25f1e21ae4c46cd20401b575b0596ee2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_509076` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_509076 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_509076"}, "prompt_sha1": "f85c09f4af0ff3bbb112cb24e6ef99605a1d392d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 912 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×912/(400×10^6) = 2.28e-05 = 0.002280%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 10, "cycles": 912, "load": 2.28e-05}, "prompt_sha1": "254c55694a665b20ce891b6ecbfbebb28b13536f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=100 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/2.2 = -45.454545.\nVout = A_v×Vin = -45.454545×0.05 = -2.272727 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 100, "vin": 0.05, "gain": -45.45454545454545, "vout": -2.272727272727273}, "prompt_sha1": "734d5fae0735a6b4a4e9803dca1bbd4ee6ebcac9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×0.1/1000/8 = 1250.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 0.1, "bytes": 1250.0}, "prompt_sha1": "d8be760ae495288320490df35fbba7210a27207b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_8` for a synchronous sampled input `noisy`. Update output `clean` only after observing 8 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_8 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 7) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_8", "stable_samples": 8}, "prompt_sha1": "3bfd45748f6de0a0d14a96dc4eb2ab08049dd7e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_58` for a 58-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_58 (\n input logic signed [57:0] data,\n input logic [5:0] shamt,\n output logic signed [57:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_58", "width": 58, "direction": "right", "arithmetic": true}, "prompt_sha1": "7c4770208a1b43c470de132321bead4b1b3f2aa8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 64 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 64-17 = 47.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 64, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 47}, "prompt_sha1": "b9f367e1f1cc306c5e771ddc743bd425651742f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 25000 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 25000×10^6 / (9000×8) = 347222.222222 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "frame_bytes": 9000, "pps": 347222.22222222225}, "prompt_sha1": "3fced00b8ad2318ab18c3660fc9185f1546c51d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_4571` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_4571 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_4571", "width": 4}, "prompt_sha1": "a284fbd419abd3c55b7545b0b33b84d03f0c1e7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 44612. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 44612/65535 × 3 V = 2.042206 V.\nThus the estimated input is about 2.0422 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 44612, "volts": 2.042206454566262}, "prompt_sha1": "f6196f55b373c8c8a1061c459f0b032fe2d5fddc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 2.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+10 = 12.5. Period = 12.5/8000000 = 1.5625e-06 s. Maximum rate = 1/period = 640000.000000 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 2.5, "conv_cycles": 10, "period": 1.5625e-06, "rate": 640000.0}, "prompt_sha1": "0c13feeffdc4cd271173b4256c3f03a7be06cada", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 1.5 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×1.5/(0.5×10^9) = 0.15 s = 150.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 1.5, "ghz": 0.5, "sec": 0.15}, "prompt_sha1": "a3044ca9c7a4e387cd5931534a61603adb9b9c8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×56000)/(680+56000) = 671.841920 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 56000, "req": 671.8419195483416}, "prompt_sha1": "ef5c85a2adcbb29d3cc595899d50ea568c9c858c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 38117 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 38117/2000000 s; frequency = 2000000/38117 = 52.470026 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 38117, "hz": 52.47002649736338}, "prompt_sha1": "97e253f616dac6972de57b49c2af035ba869bf99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 865 elements. Review loop `for i in range(865+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(865+1)` includes index 865, which is out of range for a length-865 sequence. Correct loop: `for i in range(865):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 865, "variant": "one_past"}, "prompt_sha1": "7857bd5c8893f0d955324d4fae75995f00afb69e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5541(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5541(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5541([1, 2]) == 1.5\nassert mean_5541([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5541"}, "prompt_sha1": "34f89cb5f064aa2b88da0b06ff8b55c83cf8d0d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/100000=2e-05 A. P=V²/R=2²/100000=4e-05 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 100000, "i": 2e-05, "p": 4e-05}, "prompt_sha1": "5de53ff4f4bca4d274d298701dbc498ac2261f22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=10 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×47/(10+47) = 2.721053 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 10, "r2": 47, "vout": 2.721052631578947}, "prompt_sha1": "6b804ce3f7de921bc41c540a51aab2d9c149d19b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `entries` elements of type `float`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n total += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `table[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n total += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "f5965f4d3c41a0de0ce4688b4cea65093479fe69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 1600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×1600×10^6×3 = 57.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 1600, "channels": 3, "gbps": 57.6}, "prompt_sha1": "bb6a3d9e00ec9ce80bce29a98001c93d970c3aef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7A, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x7A<<1)|0 = 0xF4 = 11110100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 122, "rw": 0, "byte": 244}, "prompt_sha1": "8506bf50feec160ac17f5f59f246b6780b3d73be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.27.34.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.27.34.0\nBroadcast address: 10.27.34.3\nUsable host range: 10.27.34.1 to 10.27.34.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.27.34.0/30", "usable": 2, "first": "10.27.34.1", "last": "10.27.34.2", "broadcast": "10.27.34.3"}, "prompt_sha1": "cd5ff90ca5189723f5fb93307c1fad1dfacf1b01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 8 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×1×10^6 = 8000000 B/s. Time = 16384/8000000 = 0.002048 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 8, "rate_mhz": 1, "sec": 0.002048}, "prompt_sha1": "966fdffe3a9e5f850c6321ca5fdc7e1cd67d02d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 240 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 240/(240+40+8) = 0.833333 = 83.33%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 240, "iphdr": 40, "eff": 0.8333333333333334}, "prompt_sha1": "df508faa02c1671087e47bfee5fd0460dec0e555", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×80/1000/8 = 250000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 80, "bytes": 250000000.0}, "prompt_sha1": "f4dfeb9a69d98ceeccfe7fc885947a05e1fee41e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 17 elements. Review loop `for i in range(17-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(17-1)` produces indices 0 through 15, so index 16 is skipped. Correct loop: `for i in range(17):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 17, "variant": "miss_last"}, "prompt_sha1": "b0b025b700a192929497449692ea65b52defdd69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 60 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 60×11 = 660. Time = 660/921600 = 0.000716145833 s = 0.716146 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 7, "parity": 1, "stop": 2, "frames": 60, "seconds": 0.0007161458333333333}, "prompt_sha1": "3a9ce63fa75bd754300fe3f45a69cd1ce3016098", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 10; x = x + 261;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 10+261 = 271. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (271) mod 2^8 = 15. So `x` stores 15. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 10, "add": 261, "result": 15}, "prompt_sha1": "ed980273cfd103ba5e4915729d50fb6984e46ba4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 19 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 19-2.3 = 16.7 V.\nI = V/R = 16.7/330 A = 50.6061 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 19.0, "vf": 2.3, "r": 330, "current_a": 0.050606060606060606}, "prompt_sha1": "2b35f9364e3aca0b719b67ce96b8ee2c8d26c584", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x8_write_bypass` with 4 entries of 8 bits. Inputs: `clk`, `we`, `2-bit waddr`, `8-bit wdata`, `2-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [7:0] wdata,\n input logic [1:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x8_write_bypass", "entries": 4, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "d019b358e98602e00496a8b1f5a8e0d5cfd309af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 128-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/128 = 256.\nOffset bits = log2(128) = 7.\nIndex bits = log2(256) = 8.\nTag bits = 52-8-7 = 37.\nCheck: 37+8+7 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 128, "addr_bits": 52, "lines": 256, "offset_bits": 7, "index_bits": 8, "tag_bits": 37}, "prompt_sha1": "eb324e56f6b60c92520262543fef7649951a9efd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 3389 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 50000×3389/(32×10^6) = 5.2953125 = 529.531250%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 50000, "cycles": 3389, "load": 5.2953125}, "prompt_sha1": "d8456dcaf95f618cb34de90ef9358e23cadf1406", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "880cfcdcdb53244be9feaf93aeacc95ce6ffca97", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "376cfb8c6b1331c62b7a3253ac2853e53b4c7d61c1237fb3d1b0fb7e94be6f7f", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 1580, "original_row_sha256": "e5a7da60e9bf27b0ad01d2415921a64bd08e87d73a43290be373fe82f671553d", "version": "v1.0.0-rc1"}}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 247.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+8 = 255.5. Period = 255.5/10000000 = 2.555e-05 s. Maximum rate = 1/period = 39138.943249 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 247.5, "conv_cycles": 8, "period": 2.555e-05, "rate": 39138.94324853229}, "prompt_sha1": "44c2ce8ea36b6e1f064e6b73ae325bc901ae2dda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_96_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 96 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_96_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd96;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_96_ignore", "cycles": 96, "retrigger": false}, "prompt_sha1": "225c6b40fe2d1cea0614a45492e95b55fc68f2e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8302` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8302 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8302"}, "prompt_sha1": "5bd51806a08bd48816d1721f21bfa1092d02da03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×128 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 128, "reach": 33554432}, "prompt_sha1": "94712042b4995e1d5dcde05843a16915dd83fc29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 4 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×4/(0.8×10^9) = 2.5 s = 2500.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 4.0, "ghz": 0.8, "sec": 2.5}, "prompt_sha1": "5681c2eeec611461172e79158da46cc9d1b0aaee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/47=1.0212766 A. P=V²/R=48²/47=49.0212766 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 47, "i": 1.0212765957446808, "p": 49.02127659574468}, "prompt_sha1": "79c9e73c6e9900fb085b506363ea0adaecc6ae32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_3474` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_3474 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_3474"}, "prompt_sha1": "bf637e9801e7affdb1e0a123a58be1ffb51c2a4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock L1 then C; task_B acquires C then L1. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds L1 while waiting for C, while task_B holds C while waiting for L1; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "4614d120f88a316110a3c5e672df761796b19939", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 53 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 53-13 = 40.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 53, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 40}, "prompt_sha1": "3c9446bd1fa7c79afaa14a682bc051b65119e20f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=1800 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×1800×10^-12 s = 0.000486 s.\nf_c=1/(2πRC)=1/(2π×270000×1800×10^-12) = 327.4793 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 1.8e-09, "tau": 0.000486, "fc": 327.4793067734472}, "prompt_sha1": "903f25020fa4647be4d7f3893ca870ddcc32bbd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×128 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 128, "reach": 134217728}, "prompt_sha1": "0695519c1d128a81b3c091af0a4786dfdfa475f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 45-bit left-shift register module `shiftreg_left_45`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `45-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_45 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [44:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[43:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_45", "width": 45, "direction": "left"}, "prompt_sha1": "3a563928242d9b041ca938acb7ae8cb47e4bcd26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x15E1. Extract the 8-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x15E1 >> 1) & 0xFF = 0xF0 (240).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 8, "lsb": 1, "value": 5601, "mask": 255, "field": 240}, "prompt_sha1": "99fa26587bdd7d9a15837ab6158ec4f1ccbad134", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=1 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×4.7/(1+4.7) = 19.789474 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 1, "r2": 4.7, "vout": 19.789473684210527}, "prompt_sha1": "a2719cdc2d4669cd54b3db901c94c8ecfbdd1728", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 5 = 0.012500.\nEffective CPI = 1.2 + 0.012500 = 1.212500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.05, "penalty": 5, "result": 1.2125}, "prompt_sha1": "8c016eac5e60d2080660c00482bb72f7f2db7056", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.1 V source drives a 470 ohm resistor in series with an LED whose forward voltage is assumed to be 1.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.1-1.6 = 6.5 V.\nI = V/R = 6.5/470 A = 13.8298 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.1, "vf": 1.6, "r": 470, "current_a": 0.013829787234042552}, "prompt_sha1": "7b3fd31e742b240ef81981f907bcc2aab629b820", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 598 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×598/(200×10^6) = 0.0299 = 2.990000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 10000, "cycles": 598, "load": 0.0299}, "prompt_sha1": "418cdbd23f4da4ca32f9e1ed1403f836ff54b09f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 2-way set-associative cache uses 64-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/64 = 256.\nSets = 256/2 = 128.\nOffset bits = log2(64) = 6; index bits = log2(128) = 7; tag bits = 40-6-7 = 27.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 64, "ways": 2, "addr_bits": 40, "lines": 256, "sets": 128, "offset": 6, "index": 7, "tag": 27}, "prompt_sha1": "e04dccefbbea63ecc1299d8ffd86e37ff8d2d19f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=47 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×47/(47+47) = 1.650000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 47, "r2": 47, "vout": 1.65}, "prompt_sha1": "ddec00fcd921a1453496b865192729e26e85d262", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2634319481, carries 22053 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 22053+0+0 = 22053. ACK = (2634319481+22053) mod 2^32 = 2634341534.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2634319481, "payload": 22053, "syn": 0, "fin": 0, "ack": 2634341534}, "prompt_sha1": "82cfe85bf9fb98e331bfadcd58318ae9eca2e8b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock B then STATE; T2 acquires STATE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds B while waiting for STATE, while T2 holds STATE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "6e2be1579c1c7a822fdc2404868675c410c5d356", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x71AA. Extract the 6-bit field starting at bit 0 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x71AA >> 0) & 0x3F = 0x2A (42).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 0, "value": 29098, "mask": 63, "field": 42}, "prompt_sha1": "660070ff41d76eb8f143a70bd0ea4728e376aea7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 21 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 21 = 23.\nClock pulses = 23×9 = 207.\nTime = 207/100000 s = 2070.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 21, "clocks": 207, "time_s": 0.00207}, "prompt_sha1": "800a3cf7c356c994aafb8c8a1ba60c780a4a82cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2931 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2931/(2931+20+8) = 0.990537 = 99.05%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2931, "iphdr": 20, "eff": 0.990537343697195}, "prompt_sha1": "01eceb7544610f6e90656b60e689a29b794b8684", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 48-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^48/2^11 = 2^37 = 137438953472 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 48, "page_exp": 11, "entries": 137438953472}, "prompt_sha1": "b39a054ffa7f2db1fb343dcb303827af3564d235", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3992` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3992 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3992"}, "prompt_sha1": "f36b5ab6c5e79338b1ed66e0904dfd88c80bf42d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10×10^6 × 3/1000 = 30000 bits = 3750 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10, "rtt_ms": 3, "bits": 30000.0, "bytes": 3750.0}, "prompt_sha1": "2f12e19a9a4da2a767194a12f2bd6fb8b47914d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3900 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3900×12000×10^-12 s = 4.68e-05 s.\nf_c=1/(2πRC)=1/(2π×3900×12000×10^-12) = 3400.7466 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3900, "c_f": 1.2e-08, "tau": 4.68e-05, "fc": 3400.7466472627207}, "prompt_sha1": "cf2718fdaa98cd9381b21cf89b8052df2f72a832", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 5000 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 5000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 5000}, "prompt_sha1": "2f802826019f14fa424b92d25e2e2560d6358854", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_70_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 70 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_70_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd70;\n end else begin\n if (pulse_in)\n count <= 7'd70;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_70_retrig", "cycles": 70, "retrigger": true}, "prompt_sha1": "ae39b4e6ef510d3d5a5e74c85982cf1db78ae010", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 70%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.100×(4+0.300×50) = 3.900000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.9, "l2": 4, "l2_hit": 0.7, "mem": 50, "amat": 3.8999999999999995}, "prompt_sha1": "d014f119dadb438c6dd1dec015c9b075c825128c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.52. Using Amdahl's law, compute the theoretical speedup on 24 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.52) + 0.52/24) = 1.993355.\nThe theoretical speedup is about 1.993×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.52, "n": 24, "result": 1.9933554817275747}, "prompt_sha1": "9a5f661319e314d07c097ed124c59b6c434d14a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_31_msb` for `31-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_31_msb (\n input logic [30:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 31; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_31_msb", "width": 31, "priority": "high"}, "prompt_sha1": "d5d7c2b9e03e90d6cea3151ffa6b7d4a3863b46b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(2×10^6) s = 1024.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 2048, "time_us": 1024.0}, "prompt_sha1": "2a484716535c2e852823114892408681ac6162a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 822 elements. Review loop `for i in range(822-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(822-1)` produces indices 0 through 820, so index 821 is skipped. Correct loop: `for i in range(822):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 822, "variant": "miss_last"}, "prompt_sha1": "cfb557459398eaf25bed86bece6b5004b626b6f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x16_write_bypass` with 32 entries of 16 bits. Inputs: `clk`, `we`, `5-bit waddr`, `16-bit wdata`, `5-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [15:0] wdata,\n input logic [4:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x16_write_bypass", "entries": 32, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "38f58c9556be35ee4d2510b6fe3fafff6eb08a5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×1024 KiB = 49152 KiB = 50331648 bytes = 48.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 1024, "reach": 50331648}, "prompt_sha1": "1b8f48637dc487889515622e05ed96b63d2f2a26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [27, 19, 7, 12, 24]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [89, 73, 37, 59, 87].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [27, 19, 7, 12, 24], "finish": [89, 73, 37, 59, 87]}, "prompt_sha1": "1e7d95d144282f4f782ecea0c33c74f6485aaf6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (512×8) = 2441406.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 512, "pps": 2441406.25}, "prompt_sha1": "2cb846e9621955f3d1663169e0a382bcea6deb16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `completed = completed + 3` on one shared integer without synchronization. Assume `completed` initially equals 388. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 388; T2 reads 388; both compute 391; T1 writes 391; T2 writes 391. The observed final value is 391, but two serial increments would produce 394.\n\n```\nlock(mutex)\ncompleted = completed + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "5e3e2aee77ac143b1c32e6c1f3bec561fa321f5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 220 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00022×1.8²=0.0003564 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00021999999999999998, "v": 1.8, "energy": 0.0003564}, "prompt_sha1": "211e65d9299887b8835809f5023ef3a4e6c43bf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(12×10^6) s = 10.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 128, "time_us": 10.666666666666668}, "prompt_sha1": "35422e86e2b9a7ed4cb223ec30f4e847cbbf2099", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNTNTNTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 1, 0, 1, 0, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "3f37931a7f4c0c71d1db790d1c5d932ef2e951af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_109` generating a one-clock-cycle `tick` every 109 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_109 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 108) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_109", "divide": 109}, "prompt_sha1": "5dd34178d5ccca6e000c0e8530443fad1b7fc9d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 561. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 561/1023 × 5 V = 2.741935 V.\nThus the estimated input is about 2.7419 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 561, "volts": 2.7419354838709675}, "prompt_sha1": "048c96e37e4e89564b29fa3783aaa9b270a48deb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 101001000110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101001000110", "ones": 5, "parity": 1}, "prompt_sha1": "cf29473b704efa6cc3631734cb0ac0698546e29b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 43 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 43-17 = 26.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 43, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 26}, "prompt_sha1": "8ed7fae2c71a68d8a1486ceb4176553f73477738", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x5F66, set bit 10 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 10)`. Result = 0x5F66.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 24422, "bit": 10, "op": "set", "result": 24422}, "prompt_sha1": "1aaf0c4675fe71881ec73c1025dc60f6be7a5de3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3.3 V reference and returns code 4. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 4/1023 × 3.3 V = 0.012903 V.\nThus the estimated input is about 0.0129 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.3, "code": 4, "volts": 0.012903225806451613}, "prompt_sha1": "4e81bce8186b9a6aeca851665220ee6b78114d66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7359(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7359(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7359([1, 2]) == 1.5\nassert mean_7359([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7359"}, "prompt_sha1": "848f43d7f118e8175c2b8781d1bae132558abd67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3363730990, carries 47858 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 47858+1+1 = 47860. ACK = (3363730990+47860) mod 2^32 = 3363778850.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3363730990, "payload": 47858, "syn": 1, "fin": 1, "ack": 3363778850}, "prompt_sha1": "b5146c21514be426e660269c08553e6eacbefbf9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w8_3113` implementing a dual-clock asynchronous FIFO with depth 16 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w8_3113 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 8,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w8_3113", "depth": 16, "width": 8, "ptr_w": 4}, "prompt_sha1": "881261975d6661c8fb60262c7ec6b838301fecee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×200/1000/8 = 250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 200, "bytes": 250000.0}, "prompt_sha1": "670789609f8958db7f0f7b3ad6b429b13bdc3e49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3039 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3039/(3039+40+8) = 0.984451 = 98.45%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3039, "iphdr": 40, "eff": 0.9844509232264335}, "prompt_sha1": "905edc4f231a0fadbe555732335f094eb3463643", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4614-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4614×8 = 36912 bits.\nSerialization delay = bits/rate = 36912/(100×10^6) s = 0.00036912 s = 369.120000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4614, "rate_mbps": 100, "delay_s": 0.00036912}, "prompt_sha1": "c4adbcd00ab066fa16365cd7d194b2a96cddbad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0111000001101101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0111000001101101", "ones": 8, "parity": 0}, "prompt_sha1": "701b97a46f2f314a83126b950bab9ee65db9b274", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 4 = 18.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 4, "spi_hz": 18000000.0}, "prompt_sha1": "7b3c24b87c1083ca6bbfc5471e437bc9d6a93d54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 237 and tail index 235, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (237-235) mod 512 = 2. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 237, "tail": 235, "occupancy": 2}, "prompt_sha1": "59f45dd25d3a156ebdb1346cecf0266939e2b84b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w10_m778` with clk, asynchronous active-low rst_n, active-high enable, and output logic [9:0] count. On reset count=0. When enabled it increments until 778 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w10_m778 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [9:0] count\n);\n localparam logic [9:0] LIMIT = 10'd778;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w10_m778", "width": 10, "max": 778}, "prompt_sha1": "2b9ae6c0dd56c2af26f7609421d5323b14366f06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 31 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 31-10 = 21.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 31, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 21}, "prompt_sha1": "d86938958fb3d085153ec069d9e0eca9e4aa9841", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w64_4755` implementing a dual-clock asynchronous FIFO with depth 64 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w64_4755 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 64,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w64_4755", "depth": 64, "width": 64, "ptr_w": 6}, "prompt_sha1": "5563ac90673a923684e9b1ad3dd5fcaea2c15a12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x86F9, clear bit 13 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 13)`. Result = 0x86F9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 34553, "bit": 13, "op": "clear", "result": 34553}, "prompt_sha1": "afb8269a32c564cdc5f00caf08af106b7af0c1ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_38_53_6` with RED, GREEN, YELLOW states. Hold RED for 38 clock cycles, GREEN for 53, and YELLOW for 6; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_38_53_6 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 37) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 52) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 5) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_38_53_6", "red": 38, "green": 53, "yellow": 6}, "prompt_sha1": "1baa3d69555d507f27c0537ea36045f94ea50285", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^11 V = 0.0029296875 V = 2929.687500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 6.0, "step": 0.0029296875}, "prompt_sha1": "a957441202aa74a824271387f3e004a85805de52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x532C2266, clear bit 34 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 34)`. Result = 0x532C2266.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 1395401318, "bit": 34, "op": "clear", "result": 1395401318}, "prompt_sha1": "1e1cbb818882c6ec98a865addae61d90275c575d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=22 nF and is stepped to 1.8 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1.8(1-e^-3)=1.710383 V; τ=0.0001034 s and t=0.0003102 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 2.2000000000000002e-08, "multiple": 3, "vin": 1.8, "vc": 1.7103832769378449}, "prompt_sha1": "508886162c512a8a87fc8e4d33dd0e49c9799756", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 100 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 3987 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×3987/(100×10^6) = 0.03987 = 3.987000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 100, "irq_hz": 1000, "cycles": 3987, "load": 0.03987}, "prompt_sha1": "ec49d0a430fef659c950cafe7beed4b5a30fca4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `samples` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `words[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "e901ddc810745ad9fe0d79523e416bd3e13ba393", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 1.2 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×1.2/(5×10^9) = 0.024 s = 24.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 1.2, "ghz": 5.0, "sec": 0.024}, "prompt_sha1": "1d7466481a93105f87782d8fa5e0a346af40a02b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 4 MHz. Sampling consumes 3.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+20 = 23.5. Period = 23.5/4000000 = 5.875e-06 s. Maximum rate = 1/period = 170212.765957 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 4000000.0, "sample_cycles": 3.5, "conv_cycles": 20, "period": 5.875e-06, "rate": 170212.76595744683}, "prompt_sha1": "e0281588ca75cfe3aa57a4f1c33be7e421b41eab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10111111111001001110 using generator polynomial bits 10111011. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0000000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 187, "msg_bits": 20, "msg": 785998, "remainder": 0}, "prompt_sha1": "456936c80fce58e13adf1188abd6437e36c7b80c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6191 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6191/(6191+20+8) = 0.995498 = 99.55%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6191, "iphdr": 20, "eff": 0.9954976684354397}, "prompt_sha1": "ebe42395142618ca4bf547073d752f71c5b097d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_174` generating a one-clock-cycle `tick` every 174 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_174 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 173) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_174", "divide": 174}, "prompt_sha1": "fa6cb24eebe15e60aeb2eddec0d1cf14f34ba73c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_1947` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_1947 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_1947"}, "prompt_sha1": "efba737db0568761abfd57e2df44f1f294f4e67e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 56-bit left-shift register module `shiftreg_left_56`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `56-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_56 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [55:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[54:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_56", "width": 56, "direction": "left"}, "prompt_sha1": "305573e98d91389f321a2cd34a50927c1a945bf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNTTTTNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 1, 1, 1, 1, 0, 0, 1, 0], "final_state": 1}, "prompt_sha1": "8f7d24f95fbeef93a428b951eb4b056de9297f13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 70%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(15+0.300×40) = 1.540000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 15, "l2_hit": 0.7, "mem": 40, "amat": 1.5400000000000005}, "prompt_sha1": "2f61c092feaea05c03942364e5ed4a4597bcade0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xA1158068. Extract the 4-bit field starting at bit 20 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xA1158068 >> 20) & 0xF = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 20, "value": 2702540904, "mask": 15, "field": 1}, "prompt_sha1": "0ace0ad50e9b41cde9da36b5dd3bdc06e50285c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5476` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5476 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5476"}, "prompt_sha1": "1df42a8b0a675d4107f7e95ccd5f05b0fab7c693", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 90%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.010×(3+0.100×150) = 1.180000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.99, "l2": 3, "l2_hit": 0.9, "mem": 150, "amat": 1.1800000000000002}, "prompt_sha1": "4906e0c72e94d532f4016bee812c11e8e92dd12e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Give exact timer prescaler and reload register values for a 100 Hz interrupt, but the timer input clock and register conventions are not specified.", "output": "Exact register values cannot be determined without the timer input clock and the device's prescaler/reload conventions. Those must be supplied before solving f_update = f_timer/(prescaler×period_counts).", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "81b63a38889330e75368aaf55b2c752074eb3cd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x3783 in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 83 37.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 14211, "endian": "little", "bytes": [131, 55]}, "prompt_sha1": "8060e8ed70e0d4df84c47b532c502c785e59088a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 14 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+14) = 0.919540 = 91.95%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 14, "efficiency": 0.9195402298850575}, "prompt_sha1": "6fb4d9f0f5fd7ef51f3ad11b96b3c055bdcc6145", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7620` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7620 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7620"}, "prompt_sha1": "18d5acbf4ce6c4c5fccdf29e4fa7d9cc8c00149b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=25 ms, C=5 ms,T=25 ms, C=2 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/25 + 5/25 + 2/20 = 0.380000 = 38.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 25], [5, 25], [2, 20]], "utilization": 0.38}, "prompt_sha1": "2f5a08c58a7d8ec83ddf19ba0471ccf1db947eba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_118_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 118 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_118_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd118;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_118_ignore", "cycles": 118, "retrigger": false}, "prompt_sha1": "390fd6dc5f2a6ef4897723b4ff9bc54b4b5aeeab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=2.2 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/100 = -0.022000.\nVout = A_v×Vin = -0.022000×1 = -0.022000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 2.2, "vin": 1.0, "gain": -0.022000000000000002, "vout": -0.022000000000000002}, "prompt_sha1": "d311fa8620ed478f56cc3d5ec85b6993a942311b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 2.5 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×2.5/(2.5×10^9) = 0.005 s = 5.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 2.5, "ghz": 2.5, "sec": 0.005}, "prompt_sha1": "cb8ae3f0d51c8686d955c4ea05a0a96812da9a48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7340` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7340 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7340"}, "prompt_sha1": "40bd8db0512c161e20291a23988480d982817ee9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_1625` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_1625 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_1625", "width": 5}, "prompt_sha1": "c2db7b67dc7c70d02694d920acc9545cb802c3c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_811199` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_811199 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_811199"}, "prompt_sha1": "812859f6d7206f9b987fc93be20370393a0f4926", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [5, 27, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [5, 56, 58].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [5, 27, 26], "finish": [5, 56, 58]}, "prompt_sha1": "4292038a2755cd2a17226509883a91e159498f1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xA60D519E. Extract the 5-bit field starting at bit 5 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xA60D519E >> 5) & 0x1F = 0xC (12).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 5, "value": 2785890718, "mask": 31, "field": 12}, "prompt_sha1": "ef458419d6297f81284f99a4893e79d081979ebe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 96; x = x + 446;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 96+446 = 542. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (542) mod 2^8 = 30. So `x` stores 30. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 96, "add": 446, "result": 30}, "prompt_sha1": "2ea8b2eec9079b9aa3d4084ef215a9ccf2614819", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w52_nocin` implementing a 52-bit unsigned adder with inputs `a`, `b` and outputs `52-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w52_nocin (\n input logic [51:0] a,\n input logic [51:0] b,\n output logic [51:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w52_nocin", "width": 52, "cin": false}, "prompt_sha1": "501872aff578dd4a414a407036c7f6b2dff329e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 31 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 31×13 = 403. Time = 403/38400 = 0.0104947917 s = 10.494792 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 9, "parity": 1, "stop": 2, "frames": 31, "seconds": 0.010494791666666666}, "prompt_sha1": "f68aa8268b360811969d6b9b019f7cd52c3f6b29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 500 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 500×10^6 × 0.5/1000 = 250000 bits = 31250 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 500, "rtt_ms": 0.5, "bits": 250000.0, "bytes": 31250.0}, "prompt_sha1": "74ddc0b600efae037d872588500dadde795d5def", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m22` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 22 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m22 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd22;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m22", "width": 5, "max": 22}, "prompt_sha1": "f9cf797582e372611f9b82b5710e40c97013d025", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_5` for a 5-bit unsigned input `data`, `3-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_5 (\n input logic [4:0] data,\n input logic [2:0] shamt,\n output logic [4:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_5", "width": 5, "direction": "left", "arithmetic": false}, "prompt_sha1": "3a8497c8b793c6670cdde92f6d6167f1060e4c65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 8%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.080 × 4 = 0.032000.\nEffective CPI = 1.1 + 0.032000 = 1.132000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.08, "penalty": 4, "result": 1.1320000000000001}, "prompt_sha1": "64428af26edc4fd3d0f7f36e61434c7807f56206", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_48` for a 48-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_48 (\n input logic [47:0] data,\n input logic [5:0] shamt,\n output logic [47:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_48", "width": 48, "direction": "right", "arithmetic": false}, "prompt_sha1": "f106d380963d3494fcf339bb9fc7d0cf9a07b328", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_33_13` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 33, and YELLOW for 13; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_33_13 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 32) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 12) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_33_13", "red": 20, "green": 33, "yellow": 13}, "prompt_sha1": "52049e10e85295c8bc37646b90add5e5f9e61aed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 623, and period is 43557 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(623×43557) = 2.358490 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 623, "period": 43557, "hz": 2.3584896099872603}, "prompt_sha1": "ec1448231890fa5af0f06ab4d87eed3d2fde0712", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 96 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 96 MHz / 256 = 0.375000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 96000000.0, "divider": 256, "spi_hz": 375000.0}, "prompt_sha1": "7593aa1b2ed196aa070821ce3341d6b813b179f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 57600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(4×57600) = 26.041667.\nNearest integer divisor D = 26.\nActual baud = 6000000/(4×26) = 57692.308 baud.\nError = (57692.308-57600)/57600×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 4, "baud": 57600, "divisor": 26, "actual": 57692.307692307695, "error_pct": 0.1602564102564151}, "prompt_sha1": "702b76047fcea35098ad068e05f235fbc449eaaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['P', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["P", "V", "P", "V", "V", "P", "V", "V", "P", "V"], "value": 3, "blocked": 0}, "prompt_sha1": "fe64c5b4cf8539239ae7c89580eee225b81de70b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111001 using generator polynomial bits 1001. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 9, "msg_bits": 6, "msg": 57, "remainder": 6}, "prompt_sha1": "6f5e95d50c10ae8ce579d385f8469cd66b0ec35c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 256-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/256 = 512.\nOffset bits = log2(256) = 8.\nIndex bits = log2(512) = 9.\nTag bits = 48-9-8 = 31.\nCheck: 31+9+8 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 256, "addr_bits": 48, "lines": 512, "offset_bits": 8, "index_bits": 9, "tag_bits": 31}, "prompt_sha1": "5f00c301799a06bd11145504556b65659ad1cb57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 4 and tail index 15, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (4-15) mod 32 = 21. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 4, "tail": 15, "occupancy": 21}, "prompt_sha1": "4b60f35cbff3498731cb6b206b1b56934309bff8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_30` generating a one-clock-cycle `tick` every 30 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_30 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 29) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_30", "divide": 30}, "prompt_sha1": "acc46123006f3b159420539cdfa5f7733366a504", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 60 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 60-10 = 50.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 60, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 50}, "prompt_sha1": "644b72f06e51e23457b59966ee993b03dfc9f9f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w32_5666` implementing a dual-clock asynchronous FIFO with depth 32 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w32_5666 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 32,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w32_5666", "depth": 32, "width": 32, "ptr_w": 5}, "prompt_sha1": "6cf90b39e38d7847f130a23ec6e5477d63e265bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w30_nocin` implementing a 30-bit unsigned adder with inputs `a`, `b` and outputs `30-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w30_nocin (\n input logic [29:0] a,\n input logic [29:0] b,\n output logic [29:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w30_nocin", "width": 30, "cin": false}, "prompt_sha1": "f00c3e226df1e4dab4b75caa2d291a0a212064e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 125 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/125 = 400000.\nWith prescaler divisor limited to at most 256, the largest divisor of 400000 that also keeps the period count within 16 bits is 250.\nPeriod count = 400000/250 = 1600.\nPSC register = 250-1 = 249.\nARR register = 1600-1 = 1599.\nVerification: 50000000/(250×1600) = 125 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 125, "total_division": 400000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 1600, "psc_reg": 249, "arr_reg": 1599}, "prompt_sha1": "eb9eb534bbaf68e73d7642fe24ffb88415ee0804", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [19, 3, 15, 3]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [40, 11, 37, 22].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [19, 3, 15, 3], "finish": [40, 11, 37, 22]}, "prompt_sha1": "81a56ed7dd562e06d5eb18c652b00afaa85eca04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 5600 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×5600)/(470+5600) = 433.607908 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 5600, "req": 433.60790774299835}, "prompt_sha1": "c85fa6263b2d505b8a2af3278728d18f79f46ace", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 8-way set-associative cache uses 128-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/128 = 256.\nSets = 256/8 = 32.\nOffset bits = log2(128) = 7; index bits = log2(32) = 5; tag bits = 64-7-5 = 52.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 128, "ways": 8, "addr_bits": 64, "lines": 256, "sets": 32, "offset": 7, "index": 5, "tag": 52}, "prompt_sha1": "ba7b406dae6ecc418c353b151d1065c8c04133d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 8000 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 8000 = 2000. Verification: 2000/8000 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 8000, "duty": 25, "high": 2000}, "prompt_sha1": "abd221df0a7257bf65302909e865930ba0e76b4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 64 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 115200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 64000000/(4×115200) = 138.888889.\nNearest integer divisor D = 139.\nActual baud = 64000000/(4×139) = 115107.914 baud.\nError = (115107.914-115200)/115200×100% = -0.0799%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 64000000, "oversample": 4, "baud": 115200, "divisor": 139, "actual": 115107.91366906474, "error_pct": -0.07993605115907738}, "prompt_sha1": "363940cf61775573592d971c8c941fcc03219f85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=1 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×22/(1+22) = 4.782609 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 1, "r2": 22, "vout": 4.782608695652174}, "prompt_sha1": "64aa0a6e93ab2b45eaa3ae391186c61298e1f1bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 15957. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 15957/65535 × 3 V = 0.730465 V.\nThus the estimated input is about 0.7305 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 15957, "volts": 0.7304646372167544}, "prompt_sha1": "b1c36cc9384666a26347eacc04443da21acb47eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_247` generating a one-clock-cycle `tick` every 247 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_247 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 246) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_247", "divide": 247}, "prompt_sha1": "0917ea14988d1bbcd5b519c62b141dcd9ad1960d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 20/1000 = 40000 bits = 5000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 20, "bits": 40000.0, "bytes": 5000.0}, "prompt_sha1": "f9d0f60acbb20ffdddfac32d4c3037beeac95387", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_21` for a 21-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_21 (\n input logic [20:0] data,\n input logic [4:0] shamt,\n output logic [20:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_21", "width": 21, "direction": "left", "arithmetic": false}, "prompt_sha1": "57d9f7ca82af831538eb6e594b1b7d20818333e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w51_unsigned` comparing two 51-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w51_unsigned (\n input logic [50:0] a,\n input logic [50:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w51_unsigned", "width": 51, "signed": false}, "prompt_sha1": "3bf256f3eea51cfcacc8633fc9886c1c06ae6373", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 1.2 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×1.2/(5×10^9) = 0.0012 s = 1.200000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 1.2, "ghz": 5.0, "sec": 0.0012}, "prompt_sha1": "6dbf149710e7ce4b867270c98da1b238faa91095", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 1.2 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×1.2/(0.5×10^9) = 0.0024 s = 2.400000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 1.2, "ghz": 0.5, "sec": 0.0024}, "prompt_sha1": "5ccbb1b01341440b1badb58d54d97d96eb827f99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1280 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-20-20 = 1240 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 20, "tcphdr": 20, "mss": 1240}, "prompt_sha1": "2dee0f167e45b1c80ab0698fb92d93a7493cedf9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=22 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/1 = -22.000000.\nVout = A_v×Vin = -22.000000×0.2 = -4.400000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 22, "vin": 0.2, "gain": -22.0, "vout": -4.4}, "prompt_sha1": "7dbf4eb5f8adb53a4998ead58ce742625b619f65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8719 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8719/(8719+20+8) = 0.996799 = 99.68%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8719, "iphdr": 20, "eff": 0.9967989024808506}, "prompt_sha1": "518de2d7ffd6b5d415be2e54873c9e0aa5f39404", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2647(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2647(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2647([1, 2]) == 1.5\nassert mean_2647([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2647"}, "prompt_sha1": "2198980b554048d9740367e67a540587bd89388c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 568 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "1d7c7667876a75ff5f6227fefb82f8cce821cdea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2212263432, carries 8442 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 8442+0+1 = 8443. ACK = (2212263432+8443) mod 2^32 = 2212271875.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2212263432, "payload": 8442, "syn": 0, "fin": 1, "ack": 2212271875}, "prompt_sha1": "066e17c5680fc4afc5917ee42a5aae8e022717ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 188 and tail index 215, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (188-215) mod 1024 = 997. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 188, "tail": 215, "occupancy": 997}, "prompt_sha1": "60b79be8a86b64dc399ce2f2084e4c1a56f0ce50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w16_5289` implementing a dual-clock asynchronous FIFO with depth 32 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w16_5289 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 16,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w16_5289", "depth": 32, "width": 16, "ptr_w": 5}, "prompt_sha1": "b381b43a6af6856e14ee1e6895ad98959699217e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 2` on one shared integer without synchronization. Assume `requests` initially equals 94. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 94; T2 reads 94; both compute 96; T1 writes 96; T2 writes 96. The observed final value is 96, but two serial increments would produce 98.\n\n```\nlock(mutex)\nrequests = requests + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "2efb70bb3e030aa5fe0a0e5cecdf70675b746dae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 15%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.150 × 12 = 0.090000.\nEffective CPI = 1.2 + 0.090000 = 1.290000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.15, "penalty": 12, "result": 1.29}, "prompt_sha1": "02ae9fb7758eb13a35f43a4d3f4cc2c35728ec6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 4 = 2.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 4, "spi_hz": 2000000.0}, "prompt_sha1": "0b353b3eb0e72a5f06cbcce6c8af3e4ffc5cd69b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 242 and tail index 63, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (242-63) mod 256 = 179. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 242, "tail": 63, "occupancy": 179}, "prompt_sha1": "9eb9645952d89545075f3748f23d3c7bcd3c8624", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5293 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5293/(5293+40+8) = 0.991013 = 99.10%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5293, "iphdr": 40, "eff": 0.9910129189290395}, "prompt_sha1": "f915c03b3e724916d1490083b4b8d6193b67f13a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 2 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×40×10^6 = 80000000 B/s. Time = 512/80000000 = 6.4e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 2, "rate_mhz": 40, "sec": 6.4e-06}, "prompt_sha1": "e415e50ae71dc898730ab0a1624d90b1b6657f8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 70%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(12+0.300×60) = 1.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 12, "l2_hit": 0.7, "mem": 60, "amat": 1.6000000000000005}, "prompt_sha1": "1fd3a1fb950de1770daa76acff9358fb83f55d53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1775481804, carries 40508 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 40508+1+0 = 40509. ACK = (1775481804+40509) mod 2^32 = 1775522313.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1775481804, "payload": 40508, "syn": 1, "fin": 0, "ack": 1775522313}, "prompt_sha1": "c6bb719a14fafc34534c0314b29cb356cab749b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x41, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x41<<1)|1 = 0x83 = 10000011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 65, "rw": 1, "byte": 131}, "prompt_sha1": "87174fd8c3dd5179fa34f334c242c31f42cad4b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2029785525, carries 58304 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 58304+0+1 = 58305. ACK = (2029785525+58305) mod 2^32 = 2029843830.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2029785525, "payload": 58304, "syn": 0, "fin": 1, "ack": 2029843830}, "prompt_sha1": "ef1c08870875f3ceaad22113ae83d12bd19dae71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_8496` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_8496 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_8496", "width": 10}, "prompt_sha1": "b87d87227267b6adaff7fa22ebc520a9a436ecdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 28 and initial occupancy is 16. In an abstract batch, producer attempts to enqueue 17 items first, dropping any excess beyond capacity; then consumer removes up to 150 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=28, dropped=5; consumed=28; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 28, "start": 16, "prod": 17, "cons": 150, "dropped": 5, "consumed": 28, "final": 0}, "prompt_sha1": "053a1c3671cbb01986eec78b5284b21d667c5f4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 8` on one shared integer without synchronization. Assume `packets` initially equals 446. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 446; T2 reads 446; both compute 454; T1 writes 454; T2 writes 454. The observed final value is 454, but two serial increments would produce 462.\n\n```\nlock(mutex)\npackets = packets + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "7d7623c2c8edb8575cf833189311dce5455b31c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 5 and tail index 2, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (5-2) mod 16 = 3. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 5, "tail": 2, "occupancy": 3}, "prompt_sha1": "bd7ecdfcc36e89bc0c08e51cb41e437c191d586d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_9_lsb` for `9-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_9_lsb (\n input logic [8:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 8; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_9_lsb", "width": 9, "priority": "low"}, "prompt_sha1": "14603aa9c015886092f2ada96a442a1d62e65fc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 47 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 47×13 = 611. Time = 611/2400 = 0.254583333 s = 254.583333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 9, "parity": 1, "stop": 2, "frames": 47, "seconds": 0.25458333333333333}, "prompt_sha1": "29492739bb5a8335720560b5a71aa9c89dada671", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [4, 29, 13]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [8, 46, 31].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [4, 29, 13], "finish": [8, 46, 31]}, "prompt_sha1": "1a7db6a9093a704dfc12f449d0e3180ecb87fbb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/200 = 840000.\nWith prescaler divisor limited to at most 128, the largest divisor of 840000 that also keeps the period count within 16 bits is 125.\nPeriod count = 840000/125 = 6720.\nPSC register = 125-1 = 124.\nARR register = 6720-1 = 6719.\nVerification: 168000000/(125×6720) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 200, "total_division": 840000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 6720, "psc_reg": 124, "arr_reg": 6719}, "prompt_sha1": "9f784429bdce5cf770787395b2264978cd3373d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.75 ns hit time, 97.2% hit rate, and a 40 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.972 = 0.028.\nAMAT = hit time + miss rate × miss penalty\n= 3.75 ns + 0.028×40 ns = 4.8700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.75, "hit_rate": 0.972, "penalty": 40, "result": 4.870000000000001}, "prompt_sha1": "98f4d66cbdd43de071dbe529a07b48ca0222570c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x986CCD in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: CD 6C 98.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 9989325, "endian": "little", "bytes": [205, 108, 152]}, "prompt_sha1": "a0da7adbf046fc73aef8cdec61f6ae6ce08e7bcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_31` for a 31-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_31 (\n input logic signed [30:0] data,\n input logic [4:0] shamt,\n output logic signed [30:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_31", "width": 31, "direction": "right", "arithmetic": true}, "prompt_sha1": "65d361e122d207a838a75512d8004c00b215d3a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 22-bit left-shift register module `shiftreg_left_22`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `22-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_22 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [21:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[20:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_22", "width": 22, "direction": "left"}, "prompt_sha1": "90307b412697af025fd0266bed76fc5b022d2c2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×100000 = 200000 Hz. Proposed rate 1e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100000, "min_fs": 200000, "proposed": 1000000}, "prompt_sha1": "41e791c244ef974a43016cc1f301d606033e007f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.249.100.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.249.100.0\nBroadcast address: 10.249.100.15\nUsable host range: 10.249.100.1 to 10.249.100.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.249.100.0/28", "usable": 14, "first": "10.249.100.1", "last": "10.249.100.14", "broadcast": "10.249.100.15"}, "prompt_sha1": "3ae2aebf8a1685f843bd679a05bcd12f78522d94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=1 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×1/(1+1) = 6.000000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 1, "r2": 1, "vout": 6.0}, "prompt_sha1": "4a53d94feb2e92a23ace3d5d715bdfdb4a61659f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w64_signed` comparing two 64-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w64_signed (\n input logic signed [63:0] a,\n input logic signed [63:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w64_signed", "width": 64, "signed": true}, "prompt_sha1": "cbb83b1d368aa5b2b5649997bf17da3675d5f6a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on N; 0->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "9b85e09027c9cdbec21ecf48d0fcc45aa316fddb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_24` for a 24-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_24 (\n input logic [23:0] data,\n input logic [4:0] shamt,\n output logic [23:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_24", "width": 24, "direction": "left", "arithmetic": false}, "prompt_sha1": "be75796d1442ef6ed9758a1aeca17e8bc36c2b4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 28060 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 28060/1000 s; frequency = 1000/28060 = 0.035638 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 28060, "hz": 0.03563791874554526}, "prompt_sha1": "f094e8b62df634676f1a9bc3706924adc1cf6cdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 40 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 40 MHz / 32 = 1.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 40000000.0, "divider": 32, "spi_hz": 1250000.0}, "prompt_sha1": "87f91f924b871c04cb592b319a414c8142905f44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10×10^6 / (1500×8) = 833.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "frame_bytes": 1500, "pps": 833.3333333333334}, "prompt_sha1": "68a681b378e479803f77c5e0f89d86b414859a49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×9²=4.05e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 9, "energy": 4.05e-05}, "prompt_sha1": "d18d1594778fd0eb62fd67773573cc4acfdb53c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 16 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×160×10^6 = 2560000000 B/s. Time = 4096/2560000000 = 1.6e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 16, "rate_mhz": 160, "sec": 1.6e-06}, "prompt_sha1": "d87a714edb646b519e85ae02622b0b3ec9763e98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_19_msb` for `19-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_19_msb (\n input logic [18:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 19; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_19_msb", "width": 19, "priority": "high"}, "prompt_sha1": "304718202343f3a239c1f89816264173c1ede8ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/1000 = 1e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 1000, "tau": 1e-06}, "prompt_sha1": "a57d63f8df1fed7a69b7fe8149c0efa6a9f80148", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "V", "V", "P", "V", "V", "V", "P", "V", "P", "P", "P", "P", "P", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "15f5dab24487e6bcbc457c5e872f91180d729420", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(3000/968) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 3000, "max_payload": 968, "fragments": 4}, "prompt_sha1": "bec4cefed419763ef7aa367b7bd58df4cb4480a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock B then DMA; task_B acquires DMA then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds B while waiting for DMA, while task_B holds DMA while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before DMA. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "afc5824c15d78fdfc070b1af913df57acf65b8e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/680=0.00147058824 A. P=V²/R=1²/680=0.00147058824 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 680, "i": 0.0014705882352941176, "p": 0.0014705882352941176}, "prompt_sha1": "e361c8ce9c87aea2520ea9c8de3442122749904a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 256-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/256 = 16.\nOffset bits = log2(256) = 8.\nIndex bits = log2(16) = 4.\nTag bits = 48-4-8 = 36.\nCheck: 36+4+8 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 256, "addr_bits": 48, "lines": 16, "offset_bits": 8, "index_bits": 4, "tag_bits": 36}, "prompt_sha1": "23c6ce6d558ec67c13c8f9b4c9a5f42499471d5c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10011010110011010110 using generator polynomial bits 110001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 00110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 49, "msg_bits": 20, "msg": 634070, "remainder": 6}, "prompt_sha1": "624533cc8eff4f16d73b7fb4cb50ee82197a3a87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_88` for a synchronous sampled input `noisy`. Update output `clean` only after observing 88 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_88 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 87) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_88", "stable_samples": 88}, "prompt_sha1": "4c10ce0d6954bb6b6f559f27c0300488a6bc0105", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 24 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 115200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 24000000/(16×115200) = 13.020833.\nNearest integer divisor D = 13.\nActual baud = 24000000/(16×13) = 115384.615 baud.\nError = (115384.615-115200)/115200×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 24000000, "oversample": 16, "baud": 115200, "divisor": 13, "actual": 115384.61538461539, "error_pct": 0.1602564102564151}, "prompt_sha1": "fdf67c07cdd80828b504543b3aba1fd16717e4fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1450 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-20-32 = 1398 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 20, "tcphdr": 32, "mss": 1398}, "prompt_sha1": "77f59cc8793b52f5a3192dea4075fda693db74c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 34 and tail index 29, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (34-29) mod 128 = 5. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 34, "tail": 29, "occupancy": 5}, "prompt_sha1": "88e4fa064741b48ddea5d3606f11b01d130dac45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/1000=0.005 A. P=V²/R=5²/1000=0.025 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 1000, "i": 0.005, "p": 0.025}, "prompt_sha1": "75b94c113c917f45dc7fe116c740d8af8bdbd228", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [11, 22, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [27, 49, 43].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [11, 22, 16], "finish": [27, 49, 43]}, "prompt_sha1": "2eaa2892730cd36c85ec1666f8bcaa54e5ceb5bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×4 KiB = 256 KiB = 262144 bytes = 0.250000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 4, "reach": 262144}, "prompt_sha1": "55f22f82990829b3ad74a07b12e642d5557ec0e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=1 ms,T=40 ms, C=5 ms,T=100 ms, C=4 ms,T=10 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 1/40 + 5/100 + 4/10 + 3/25 = 0.720000 = 72.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [1, 40], [5, 100], [4, 10], [3, 25]], "utilization": 0.72}, "prompt_sha1": "78b767eab098cabaf8406873da3b4840e1839a76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=10 nF and is stepped to 3.3 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=3.3(1-e^-2)=2.853394 V; τ=2.2e-06 s and t=4.4e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 1e-08, "multiple": 2, "vin": 3.3, "vc": 2.8533935653191778}, "prompt_sha1": "b7c016d93d1dcd32fffb031030427c858d77012d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_22` for a synchronous sampled input `noisy`. Update output `clean` only after observing 22 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_22 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 21) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_22", "stable_samples": 22}, "prompt_sha1": "d8ce024c33d1c067b316b7110790c3035bb46ff0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 2700 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×2700)/(22000+2700) = 2404.858300 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 2700, "req": 2404.858299595142}, "prompt_sha1": "84a1fb4dc07b95b062b26eff85dd63e51fc52de6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNNNTTTNNTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1], "final_state": 2}, "prompt_sha1": "4ce0372a3a719bd48c9cb20273f6455e85b8cea6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 443 elements. Review loop `for i in range(443+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(443+1)` includes index 443, which is out of range for a length-443 sequence. Correct loop: `for i in range(443):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 443, "variant": "one_past"}, "prompt_sha1": "3708c2c6abe2fe5fdb1e8902dd84070a7735c355", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w8_1738` implementing a dual-clock asynchronous FIFO with depth 4 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w8_1738 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 8,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w8_1738", "depth": 4, "width": 8, "ptr_w": 2}, "prompt_sha1": "d766c363fcc516ebce1234eaf270f69292366262", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'V', 'V', 'P', 'P', 'V', 'V', 'V', 'V', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 9 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "V", "V", "P", "P", "V", "V", "V", "V", "P", "V", "V", "P"], "value": 9, "blocked": 0}, "prompt_sha1": "1e98664fceaae29b965446afe8992f70f2e2cbac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 30 and initial occupancy is 13. In an abstract batch, producer attempts to enqueue 9 items first, dropping any excess beyond capacity; then consumer removes up to 29 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=22, dropped=0; consumed=22; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 30, "start": 13, "prod": 9, "cons": 29, "dropped": 0, "consumed": 22, "final": 0}, "prompt_sha1": "7ccded43ea31b5b50e284ffc97443c52524e958c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 9000 bytes, IP header 40 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-40-20 = 8940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 40, "tcphdr": 20, "mss": 8940}, "prompt_sha1": "155edeaa3749a455991a6dfd5bf2f35a6db67f30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xE1. Extract the 5-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xE1 >> 2) & 0x1F = 0x18 (24).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 2, "value": 225, "mask": 31, "field": 24}, "prompt_sha1": "e85ed73e548391fe5798e7820d88bdfc6531853a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 4 = 4.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 4, "spi_hz": 4000000.0}, "prompt_sha1": "5b8ccd83151752d47df911c556bcb74990a414a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.63. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.63) + 0.63/10) = 2.309469.\nThe theoretical speedup is about 2.309×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.63, "n": 10, "result": 2.3094688221709005}, "prompt_sha1": "9a348719e6b82f2d8e7e3176193ecd6ac2f87bf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.58. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.58) + 0.58/64) = 2.330663.\nThe theoretical speedup is about 2.331×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.58, "n": 64, "result": 2.3306627822286963}, "prompt_sha1": "b6adbccfd9fa7ca0610d14865fd40120a029df88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w60_nocin` implementing a 60-bit unsigned adder with inputs `a`, `b` and outputs `60-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w60_nocin (\n input logic [59:0] a,\n input logic [59:0] b,\n output logic [59:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w60_nocin", "width": 60, "cin": false}, "prompt_sha1": "60a79a68a47c3b5f29a842bbb6db4d37400e218d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/2.2 = 0.000213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 2.2, "tau": 0.0002136363636363636}, "prompt_sha1": "3bb97c9362a62a7ed32a07f077a8dbb8947ece50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-28 = 972 bytes.\nRound down to an 8-byte multiple: floor((972)/8)×8 = 968 bytes.\nFragments required = ceil(2000/968) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 28, "payload": 2000, "max_payload": 968, "fragments": 3}, "prompt_sha1": "506c6d23809030a53ae7b7b67452ee2ce83c9a1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_40_lsb` for `40-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_40_lsb (\n input logic [39:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 39; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_40_lsb", "width": 40, "priority": "low"}, "prompt_sha1": "d351446af8450824010bb456ff87c4d7bc424582", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 2.5 V reference and returns code 9994. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 9994/16383 × 2.5 V = 1.525056 V.\nThus the estimated input is about 1.5251 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 2.5, "code": 9994, "volts": 1.525056460965635}, "prompt_sha1": "ca7f459c58fa3612798531e52d1c4e118f794b7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_37_41_2` with RED, GREEN, YELLOW states. Hold RED for 37 clock cycles, GREEN for 41, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_37_41_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 36) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 40) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_37_41_2", "red": 37, "green": 41, "yellow": 2}, "prompt_sha1": "ddac1f85aff5d06509142e19740d60160ccf3179", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 10000 = 1500. Verification: 1500/10000 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 15, "high": 1500}, "prompt_sha1": "93a43e72c3b8d232446b89ba4398d0abb9b1d0a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 21-bit ADC spanning 0 to 2.56 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.56/2^21 V = 1.220703125e-06 V = 1.220703 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 21, "vref": 2.56, "step": 1.220703125e-06}, "prompt_sha1": "61232db7f46ebb5c446eafdc706cdad8b7230b06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_8500` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_8500 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_8500"}, "prompt_sha1": "221807208ef4a5eb2e6f7b35f9af7cd5b7a6831a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w45_nocin` implementing a 45-bit unsigned adder with inputs `a`, `b` and outputs `45-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w45_nocin (\n input logic [44:0] a,\n input logic [44:0] b,\n output logic [44:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w45_nocin", "width": 45, "cin": false}, "prompt_sha1": "ff11d3af9199a67dc88b5946d2e355ab9226ca75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6488` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6488 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6488"}, "prompt_sha1": "9dfff77db33a03a20a59a2921fbf9110eda6881c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(40×10^6) s = 3.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 128, "time_us": 3.1999999999999997}, "prompt_sha1": "6b8ad351336b71cc65f124007c70bc7e89643151", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x48_no_bypass` with 8 entries of 48 bits. Inputs: `clk`, `we`, `3-bit waddr`, `48-bit wdata`, `3-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [47:0] wdata,\n input logic [2:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x48_no_bypass", "entries": 8, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "065c33a39d41c7af6a59dad933ddd45ac91f4180", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8698 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8698/(8698+20+8) = 0.996791 = 99.68%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8698, "iphdr": 20, "eff": 0.9967911987164795}, "prompt_sha1": "3c24678b73f7bec714cda17f12ade1b7034de743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 10/1000 = 20000 bits = 2500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 10, "bits": 20000.0, "bytes": 2500.0}, "prompt_sha1": "9eb2a8450a513562c98bfa3181fb90759d16e91a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=100 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/100 = -1.000000.\nVout = A_v×Vin = -1.000000×0.2 = -0.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 100, "vin": 0.2, "gain": -1.0, "vout": -0.2}, "prompt_sha1": "f087ae69b39ba06b1f4b4a5d6a2d820411a68f99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 256-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/256 = 128.\nOffset bits = log2(256) = 8.\nIndex bits = log2(128) = 7.\nTag bits = 36-7-8 = 21.\nCheck: 21+7+8 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 256, "addr_bits": 36, "lines": 128, "offset_bits": 8, "index_bits": 7, "tag_bits": 21}, "prompt_sha1": "135181c48e8677eba7a6b7879053a2d929300fee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 9-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^9 V = 0.005859375 V = 5859.375000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 9, "vref": 3.0, "step": 0.005859375}, "prompt_sha1": "6d9505e5c4e7d556d2ea42f313c388b8f80aa571", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×56000)/(470+56000) = 466.088188 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 56000, "req": 466.0881884186294}, "prompt_sha1": "8057427cd5645a73e56e7e955933b64651f462b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 4-way set-associative cache uses 256-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/256 = 1024.\nSets = 1024/4 = 256.\nOffset bits = log2(256) = 8; index bits = log2(256) = 8; tag bits = 64-8-8 = 48.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 256, "ways": 4, "addr_bits": 64, "lines": 1024, "sets": 256, "offset": 8, "index": 8, "tag": 48}, "prompt_sha1": "f2008b601d137a98bf07fd02a8974172e40ef2cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1657` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1657 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1657 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1657;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1657", "width": 11, "max": 1657}, "prompt_sha1": "c138368d59127c1bc64afd90d2ff3c67bb4ff8f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_38_17_6` with RED, GREEN, YELLOW states. Hold RED for 38 clock cycles, GREEN for 17, and YELLOW for 6; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_38_17_6 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 37) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 16) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 5) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_38_17_6", "red": 38, "green": 17, "yellow": 6}, "prompt_sha1": "5a0463ea47adf9f491ef81df8a44d08c3724ff5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7869` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7869 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7869"}, "prompt_sha1": "d6f6231d55e6010ba1f22e5e6eb6c7aae672496a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 6 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 6 = 8.\nClock pulses = 8×9 = 72.\nTime = 72/1000000 s = 72.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 6, "clocks": 72, "time_s": 7.2e-05}, "prompt_sha1": "44c357f4f65548da82c61a24cbd2f9dd11d49d71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×64 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 64, "reach": 4194304}, "prompt_sha1": "11e44f1f62d1ea926c230fa3bb54b8cf68216190", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 128-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/128 = 1024.\nOffset bits = log2(128) = 7.\nIndex bits = log2(1024) = 10.\nTag bits = 28-10-7 = 11.\nCheck: 11+10+7 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 128, "addr_bits": 28, "lines": 1024, "offset_bits": 7, "index_bits": 10, "tag_bits": 11}, "prompt_sha1": "e1ee0787bef585ccfaee75e0ad8546c2aa2e1a26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTNNNTTNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "c498b9f52f6fe295729b8b215ec79b253b1c2e1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=2.2 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(2.2+10) = 4.098361 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 2.2, "r2": 10, "vout": 4.0983606557377055}, "prompt_sha1": "d8e3b266174ed099a1ad9706a3ba19c3d1e08406", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 90.7% hit rate, and a 110 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.907 = 0.093.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.093×110 ns = 11.7300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.907, "penalty": 110, "result": 11.729999999999997}, "prompt_sha1": "47d6c390c7f0adfbd59bbb6261be9fe3d066f829", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 54 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 54×9 = 486. Time = 486/1000000 = 0.000486 s = 0.486000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 5, "parity": 1, "stop": 2, "frames": 54, "seconds": 0.000486}, "prompt_sha1": "0d2963590f06130db29f53874a2fb9d70d9438f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=47 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×10/(47+10) = 1.578947 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 47, "r2": 10, "vout": 1.5789473684210527}, "prompt_sha1": "c6fc5263a2f37bf2fe12387a652cfb8fe76a08b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_55` for a synchronous sampled input `noisy`. Update output `clean` only after observing 55 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_55 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 54) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_55", "stable_samples": 55}, "prompt_sha1": "01fe1b3b437de0d9e7f9827dc05637c4bcb1979b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 10-bit right-shift register module `shiftreg_right_10`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `10-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_10 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [9:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[9:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_10", "width": 10, "direction": "right"}, "prompt_sha1": "3cd2139702e7acb428b3aaa35b08ca16a6a3d2ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_4454` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_4454 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_4454", "width": 32}, "prompt_sha1": "756c21ddfe89b0f65229d728dddf64a3b02fd378", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 37-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^37/2^15 = 2^22 = 4194304 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 37, "page_exp": 15, "entries": 4194304}, "prompt_sha1": "90e45d2ea7d0e26dc69a860315f9a34d91d6045e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 2-way set-associative cache uses 64-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/64 = 1024.\nSets = 1024/2 = 512.\nOffset bits = log2(64) = 6; index bits = log2(512) = 9; tag bits = 32-6-9 = 17.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 64, "ways": 2, "addr_bits": 32, "lines": 1024, "sets": 512, "offset": 6, "index": 9, "tag": 17}, "prompt_sha1": "c674c4eccaeca6975beb03801daa130afd97c765", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7E, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x7E<<1)|0 = 0xFC = 11111100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 126, "rw": 0, "byte": 252}, "prompt_sha1": "f4d79d7755f9e4582bd635e07c04374855424600", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 3000 counts per period. What compare/high-time count produces exactly 55% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.55 × 3000 = 1650. Verification: 1650/3000 = 0.55, which is 55%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 3000, "duty": 55, "high": 1650}, "prompt_sha1": "a0d36a496d04350ce71fd442bcaf92bdc20003ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w34_nocin` implementing a 34-bit unsigned adder with inputs `a`, `b` and outputs `34-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w34_nocin (\n input logic [33:0] a,\n input logic [33:0] b,\n output logic [33:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w34_nocin", "width": 34, "cin": false}, "prompt_sha1": "6749daac45b78f226bb15777ce167f2d7fdb597f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 5-bit up/down counter `updown_5_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_5_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [4:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_5_wrap", "width": 5, "wrap": true}, "prompt_sha1": "5125219b5b2ecd3c3af27a0dab44a525cbe5fc36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 6` on one shared integer without synchronization. Assume `events` initially equals 290. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 290; T2 reads 290; both compute 296; T1 writes 296; T2 writes 296. The observed final value is 296, but two serial increments would produce 302.\n\n```\nlock(mutex)\nevents = events + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "f1cfe590c7f0ab0b98fb519f41a0d99aef6868ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10000 Mbit/s and RTT 60 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10000×10^6 × 60/1000 = 6e+08 bits = 7.5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10000, "rtt_ms": 60, "bits": 600000000.0, "bytes": 75000000.0}, "prompt_sha1": "bb157769e4103a4a296880dfb24fd1f4c03453a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(4×10^6) s = 16.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 64, "time_us": 16.0}, "prompt_sha1": "fda0cbda408a7e42e121c7e345cb8824bde2ea13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-20 = 1260 bytes.\nRound down to an 8-byte multiple: floor((1260)/8)×8 = 1256 bytes.\nFragments required = ceil(6000/1256) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 20, "payload": 6000, "max_payload": 1256, "fragments": 5}, "prompt_sha1": "6a6ab9e9052001bc4ce0a65051f6f98cbb9a61d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 47 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 47 = 50.\nClock pulses = 50×9 = 450.\nTime = 450/100000 s = 4500.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 47, "clocks": 450, "time_s": 0.0045}, "prompt_sha1": "07a820e735db22bd5ff6c83ca896aa0e30cd4342", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 4-way set-associative cache uses 128-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/128 = 512.\nSets = 512/4 = 128.\nOffset bits = log2(128) = 7; index bits = log2(128) = 7; tag bits = 48-7-7 = 34.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 128, "ways": 4, "addr_bits": 48, "lines": 512, "sets": 128, "offset": 7, "index": 7, "tag": 34}, "prompt_sha1": "2ee836e996d528204d6a007add06910ac21dfbba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 64 KiB cache with 128-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "1b846f582e9df27173721e1c80b346dff87a4f70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 36 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 36 = 38.\nClock pulses = 38×9 = 342.\nTime = 342/100000 s = 3420.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 36, "clocks": 342, "time_s": 0.00342}, "prompt_sha1": "51c8caccf5bb43c29178ab9409a3b2832f37c314", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=560000 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=560000×12000×10^-12 s = 0.00672 s.\nf_c=1/(2πRC)=1/(2π×560000×12000×10^-12) = 23.6838 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 560000, "c_f": 1.2e-08, "tau": 0.00672, "fc": 23.683771293436806}, "prompt_sha1": "3cebe365a9cdc6f102ddb3f151d8d59a8ee42b8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^13 V = 0.0002197265625 V = 219.726562 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 1.8, "step": 0.0002197265625}, "prompt_sha1": "edefbae3c1f8fad536a797006c301a196bcafca6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×560)/(2200+560) = 446.376812 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 560, "req": 446.3768115942029}, "prompt_sha1": "66b995d5e4e94541743de543f9a31672261a563e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m2` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 2 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m2 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd2;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m2", "width": 3, "max": 2}, "prompt_sha1": "e45354a08419745c26663e930711a6f6489fa5d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x11, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x11<<1)|0 = 0x22 = 00100010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 17, "rw": 0, "byte": 34}, "prompt_sha1": "3ad02dc76e747271d7f354106c34161d7a168b9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m20` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 20 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m20 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd20;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m20", "width": 5, "max": 20}, "prompt_sha1": "9a0d40499c47c50f197523265a3d78d8f5b1c043", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×4 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 4, "reach": 8388608}, "prompt_sha1": "19113c8818f035a52f2f5f8adc641e9cb914a41e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock L2 then QUEUE; consumer acquires QUEUE then L2. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds L2 while waiting for QUEUE, while consumer holds QUEUE while waiting for L2; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire L2 before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "29b2e829050c8e8a8e9fed216a35b0f0db1856e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 80 Hz satisfies it.", "output": "Nyquist minimum is 2×10 = 20 Hz. Proposed rate 80 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10, "min_fs": 20, "proposed": 80}, "prompt_sha1": "90e856686ec4efccaaf3da8d8d82a93841337d4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×4 KiB = 384 KiB = 393216 bytes = 0.375000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 4, "reach": 393216}, "prompt_sha1": "12139f8b537dc0aa9d44a0ac0919df136177cf4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_15` for a synchronous sampled input `noisy`. Update output `clean` only after observing 15 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_15 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 14) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_15", "stable_samples": 15}, "prompt_sha1": "2c2197ad758c1d65679157750058ce7fedf18d66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6759 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6759/(6759+40+8) = 0.992948 = 99.29%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6759, "iphdr": 40, "eff": 0.9929484354341119}, "prompt_sha1": "d1356a27a98ab9f67330c119af37a5bffeb37b95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=2.2 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×22/(2.2+22) = 10.909091 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 2.2, "r2": 22, "vout": 10.90909090909091}, "prompt_sha1": "6194d8524de5defcac1db883994ff76b0d80d5fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 16000 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-40-52 = 15908 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 40, "tcphdr": 52, "mss": 15908}, "prompt_sha1": "6276f5084fc0e016eeb3a77b70ca1cc59ca88081", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8742(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8742(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8742([1, 2]) == 1.5\nassert mean_8742([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8742"}, "prompt_sha1": "db81b78d876ae668d3f703ed3c0312294bf9ef58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 61-bit right-shift register module `shiftreg_right_61`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `61-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_61 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [60:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[60:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_61", "width": 61, "direction": "right"}, "prompt_sha1": "43eb268ced7f373b953c12371879ec53a6f3784f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 40 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 40 MHz / 16 = 2.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 40000000.0, "divider": 16, "spi_hz": 2500000.0}, "prompt_sha1": "ec8f0489423c144077b228c2a081f065e8486007", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_5` for a synchronous sampled input `noisy`. Update output `clean` only after observing 5 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_5 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 4) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_5", "stable_samples": 5}, "prompt_sha1": "a9090319bc12e76ed56e41c3a48545e6478aaa50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=50 ms, C=5 ms,T=100 ms, C=2 ms,T=5 ms, C=1 ms,T=5 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/50 + 5/100 + 2/5 + 1/5 + 4/20 = 0.950000 = 95.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 50], [5, 100], [2, 5], [1, 5], [4, 20]], "utilization": 0.9500000000000001}, "prompt_sha1": "af92b360695512f50ed918eb506c16f5707248d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w8_unsigned` comparing two 8-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w8_unsigned (\n input logic [7:0] a,\n input logic [7:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w8_unsigned", "width": 8, "signed": false}, "prompt_sha1": "661d6c1964978a6536b40764737bc0c767340cdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 41-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^41/2^21 = 2^20 = 1048576 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 41, "page_exp": 21, "entries": 1048576}, "prompt_sha1": "935fb276c573d34404a91d3cba3797cb206d431d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 25-bit left-shift register module `shiftreg_left_25`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `25-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_25 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [24:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[23:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_25", "width": 25, "direction": "left"}, "prompt_sha1": "e513c39cd16a60011a88b91b70cd50dab51f1322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 1696 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×1696/(16×10^6) = 0.0212 = 2.120000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 200, "cycles": 1696, "load": 0.0212}, "prompt_sha1": "5b3c4ff4ffdf74f1fcd50e61292c1982c13e35e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65314; x = x + 623;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65314+623 = 65937. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65937) mod 2^16 = 401. So `x` stores 401. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65314, "add": 623, "result": 401}, "prompt_sha1": "5bef5ed7aa7f74b376bb601ee2413baa502f3c99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.90. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.90) + 0.90/2) = 1.818182.\nThe theoretical speedup is about 1.818×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.9, "n": 2, "result": 1.8181818181818181}, "prompt_sha1": "8f8f4e2ac441d232bee0b4d3559186b0a9c404a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (64×8) = 39062.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 64, "pps": 39062.5}, "prompt_sha1": "47d5ae1232cd5300d7067bf2faad78a5ef5a7e6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.87. Using Amdahl's law, compute the theoretical speedup on 48 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.87) + 0.87/48) = 6.751055.\nThe theoretical speedup is about 6.751×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.87, "n": 48, "result": 6.751054852320674}, "prompt_sha1": "312dcc410b4be80623f1546e246d2e72140bc0f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_46` generating a one-clock-cycle `tick` every 46 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_46 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 45) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_46", "divide": 46}, "prompt_sha1": "a99d1e18df141dd03cba6857966a96ba27c9773a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['P', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 1 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["P", "V", "V", "V", "P", "P", "P", "P", "P", "P"], "value": 0, "blocked": 1}, "prompt_sha1": "e73a948e2e41611aa7237165e9966389355e5dbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01001011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01001011", "ones": 4, "parity": 0}, "prompt_sha1": "cffb639e2cf96216a37109db3cecdfa9660dc34d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 4668 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×4668/(32×10^6) = 0.29175 = 29.175000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 2000, "cycles": 4668, "load": 0.29175}, "prompt_sha1": "fee480c964a4845e1d88ce5e2679be1e077832a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 20 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 20 MHz / 16 = 1.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 20000000.0, "divider": 16, "spi_hz": 1250000.0}, "prompt_sha1": "8a8e63148198f61642efdaf54a7ad918af90d0e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 357388731, carries 47022 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 47022+0+1 = 47023. ACK = (357388731+47023) mod 2^32 = 357435754.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 357388731, "payload": 47022, "syn": 0, "fin": 1, "ack": 357435754}, "prompt_sha1": "c688083a5b32caaa46f2d3259acd5e4eadb46561", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_55` generating a one-clock-cycle `tick` every 55 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_55 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 54) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_55", "divide": 55}, "prompt_sha1": "03e363702452d95de5baff9167d57d5a76826199", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7718-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7718×8 = 61744 bits.\nSerialization delay = bits/rate = 61744/(5000×10^6) s = 1.23488e-05 s = 12.348800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7718, "rate_mbps": 5000, "delay_s": 1.23488e-05}, "prompt_sha1": "17fb93a2879cdab925c403006fe0d19792aa87f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 23 and initial occupancy is 14. In an abstract batch, producer attempts to enqueue 115 items first, dropping any excess beyond capacity; then consumer removes up to 106 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=23, dropped=106; consumed=23; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 23, "start": 14, "prod": 115, "cons": 106, "dropped": 106, "consumed": 23, "final": 0}, "prompt_sha1": "69f7b7405eb44fb6988da3a92b4bf04e09472de0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100011 using generator polynomial bits 111011. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 10001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 59, "msg_bits": 6, "msg": 35, "remainder": 17}, "prompt_sha1": "a08ba8388e3071940e635fccf62b399722d22137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 960 counts per period. What compare/high-time count produces exactly 95% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.95 × 960 = 912. Verification: 912/960 = 0.95, which is 95%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 960, "duty": 95, "high": 912}, "prompt_sha1": "0c89908ef3185597c06b5461b01f0825bec5982d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [7, 14, 7, 23, 22]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [31, 52, 35, 72, 73].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [7, 14, 7, 23, 22], "finish": [31, 52, 35, 72, 73]}, "prompt_sha1": "3504596e2488a01881cfc4d000b6b24ce4c3eb97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_316070` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_316070 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_316070"}, "prompt_sha1": "80f95c30861e17d61b6a44cfe2dcb46fe948d703", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 52 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+52) = 0.754717 = 75.47%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 52, "efficiency": 0.7547169811320755}, "prompt_sha1": "cdafa667cdf93b0b4809fdd524176c0cfeeeba16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-40 = 1208 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 40, "mss": 1208}, "prompt_sha1": "91887cf6468bbe41eba48b52e8ac9cc460ba9667", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "3e89da040e6819dbae74dd253c0e301e986bc2b3", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "b392f3d9fe3c86168eba2bb93f00f27c997fb4ffa156dc93383d364cd4a23c79", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 1867, "original_row_sha256": "b1f81c5440e8cc90c13a8553253a9046cc21eecea3e0fa1584fb45860b5b1dfa", "version": "v1.0.0-rc1"}}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=220 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/22 = -10.000000.\nVout = A_v×Vin = -10.000000×0.1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 220, "vin": 0.1, "gain": -10.0, "vout": -1.0}, "prompt_sha1": "c764cb0ec35883c908a48f56a991a749b021bab1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^16 = 2^18 = 262144 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 16, "entries": 262144}, "prompt_sha1": "b4dd8c1f7fa46bc7e877b7caaa568578877bd6e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x0B125324792CC2E9 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 0B 12 53 24 79 2C C2 E9.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 797791500114903785, "endian": "big", "bytes": [11, 18, 83, 36, 121, 44, 194, 233]}, "prompt_sha1": "a6ef7b3fae743ea4f3e620382059ff6aa7202a7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock DMA then IO; worker_2 acquires IO then DMA. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds DMA while waiting for IO, while worker_2 holds IO while waiting for DMA; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DMA before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "5355dfe3674b0aa4c2e47729884f3312cd7df159", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 24 MHz. Sampling consumes 7.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+12 = 19.5. Period = 19.5/24000000 = 8.125e-07 s. Maximum rate = 1/period = 1230769.230769 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 24000000.0, "sample_cycles": 7.5, "conv_cycles": 12, "period": 8.125e-07, "rate": 1230769.2307692308}, "prompt_sha1": "1fe96313d7cd64eb784371b73ca1c989a3941515", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.5 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.5/(1×10^9) = 0.003 s = 3.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.5, "ghz": 1.0, "sec": 0.003}, "prompt_sha1": "5c4ff17944ee22b9b51563dae6323d056a41ca97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m3443` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 3443 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m3443 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd3443;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m3443", "width": 12, "max": 3443}, "prompt_sha1": "84bf39240a8ae1db923346d3f5442014b7f26feb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 6 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 11 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+2 = 10. Total bits = 11×10 = 110. Time = 110/9600 = 0.0114583333 s = 11.458333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 6, "parity": 1, "stop": 2, "frames": 11, "seconds": 0.011458333333333333}, "prompt_sha1": "63527fd01a9785ae2739a7324da0d6b4df32c58b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=5600 ohm and C=390000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=5600×390000×10^-12 s = 0.002184 s.\nf_c=1/(2πRC)=1/(2π×5600×390000×10^-12) = 72.8731 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 5600, "c_f": 3.8999999999999997e-07, "tau": 0.0021839999999999997, "fc": 72.87314244134403}, "prompt_sha1": "c147efe2c7742e5cdcc338613d459351273430dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_708791` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_708791 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_708791"}, "prompt_sha1": "0715da85b61d3765ef3242ad43e2886e9e74503d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=39000 ohm and C=5600000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=39000×5600000×10^-12 s = 0.2184 s.\nf_c=1/(2πRC)=1/(2π×39000×5600000×10^-12) = 0.7287 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 39000, "c_f": 5.6e-06, "tau": 0.21839999999999998, "fc": 0.7287314244134402}, "prompt_sha1": "c695c3718f9e49d741b5975cf93d2232b7bdc504", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 43 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 43×8 = 344. Time = 344/9600 = 0.0358333333 s = 35.833333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 5, "parity": 1, "stop": 1, "frames": 43, "seconds": 0.035833333333333335}, "prompt_sha1": "3119b6eb7198f28cb4ade7534b6ad100f2e4ad57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock B then STATE; consumer acquires STATE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds B while waiting for STATE, while consumer holds STATE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "3200e17ee472b9a07273493d15dcc8b054df4b6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×48²=0.0001152 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 48, "energy": 0.0001152}, "prompt_sha1": "25ea3a92676e64007cf0875064c77cd20a246b24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 7 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 24 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+2 = 10. Total bits = 24×10 = 240. Time = 240/460800 = 0.000520833333 s = 0.520833 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 7, "parity": 0, "stop": 2, "frames": 24, "seconds": 0.0005208333333333333}, "prompt_sha1": "54532fb4aca86a8e45587d720c1ff6e1141ffd40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551541; x = x + 344;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551541+344 = 18446744073709551885. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551885) mod 2^64 = 269. So `x` stores 269. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551541, "add": 344, "result": 269}, "prompt_sha1": "55d55726988355f22d10de2c0f840a8b9a0aa51f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 5` on one shared integer without synchronization. Assume `events` initially equals 137. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 137; T2 reads 137; both compute 142; T1 writes 142; T2 writes 142. The observed final value is 142, but two serial increments would produce 147.\n\n```\nlock(mutex)\nevents = events + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "1fb160b5504fd328da1fa1d7b011e4b3639ed7fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×5/1000/8 = 15625000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 5, "bytes": 15625000.0}, "prompt_sha1": "cd072e361d093a8c24cea8b9bc8928679930bab8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 50 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 50 = 53.\nClock pulses = 53×9 = 477.\nTime = 477/1000000 s = 477.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 50, "clocks": 477, "time_s": 0.000477}, "prompt_sha1": "13934b45c759f02b012cddadf5b2c58d1c43acfd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 8` on one shared integer without synchronization. Assume `requests` initially equals 318. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 318; T2 reads 318; both compute 326; T1 writes 326; T2 writes 326. The observed final value is 326, but two serial increments would produce 334.\n\n```\nlock(mutex)\nrequests = requests + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "d2358157b21935c89a2007885e1b9505af17cd27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_134` generating a one-clock-cycle `tick` every 134 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_134 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 133) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_134", "divide": 134}, "prompt_sha1": "d26fb6293d89beadac68b2518bdc99b87ab3d3e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 2000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 4400 Hz satisfies it.", "output": "Nyquist minimum is 2×2000 = 4000 Hz. Proposed rate 4400 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 2000, "min_fs": 4000, "proposed": 4400.0}, "prompt_sha1": "41512b0fc3a4661d77d150a662339c10c4ad68d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×8 KiB = 1024 KiB = 1048576 bytes = 1.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 8, "reach": 1048576}, "prompt_sha1": "5eedceb92887ff2347eb2ac3e158c4eb7d06f301", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 110111011100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110111011100", "ones": 8, "parity": 0}, "prompt_sha1": "e1cabe5aa0bd183ec2b3e1e43b87dcc790f75c3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 27 and initial occupancy is 23. In an abstract batch, producer attempts to enqueue 148 items first, dropping any excess beyond capacity; then consumer removes up to 186 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=27, dropped=144; consumed=27; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 27, "start": 23, "prod": 148, "cons": 186, "dropped": 144, "consumed": 27, "final": 0}, "prompt_sha1": "5b21dc8c60446d5573aefffa68827325fa76a295", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 54 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 54 = 56.\nClock pulses = 56×9 = 504.\nTime = 504/1000000 s = 504.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 54, "clocks": 504, "time_s": 0.000504}, "prompt_sha1": "a35ef8d28923c6d00da64d3b0027b5bb397797bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_4282` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_4282 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_4282"}, "prompt_sha1": "be499a28342ec1b956dee24209e879dee2d83b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_854678` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_854678 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_854678"}, "prompt_sha1": "f1d285695eaea0b4d47a6c1622b11cd8aa2d9c1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 53 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 53 = 55.\nClock pulses = 55×9 = 495.\nTime = 495/400000 s = 1237.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 53, "clocks": 495, "time_s": 0.0012375}, "prompt_sha1": "3ec7a299f765de91a207d9c800dc85dc04d4cc32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-40 = 3920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 40, "mss": 3920}, "prompt_sha1": "5a00614832608f5309411e917c4a00197b06a19c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.87. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.87) + 0.87/32) = 6.361829.\nThe theoretical speedup is about 6.362×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.87, "n": 32, "result": 6.36182902584493}, "prompt_sha1": "e64b2989383cac8ed199544bf8ca3a32a34d70c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w64_7581` implementing a dual-clock asynchronous FIFO with depth 128 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w64_7581 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 64,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w64_7581", "depth": 128, "width": 64, "ptr_w": 7}, "prompt_sha1": "289ab569cba68b86a323bf1bedfd23be39796f65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3329 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3329/(3329+20+8) = 0.991659 = 99.17%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3329, "iphdr": 20, "eff": 0.991659219541257}, "prompt_sha1": "77a2aca7bc8a670b0debbbcd7b2106d8ba2c0b98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65413; x = x + 311;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65413+311 = 65724. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65724) mod 2^16 = 188. So `x` stores 188. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65413, "add": 311, "result": 188}, "prompt_sha1": "32d3333fdd6099b9941f9aab0285d6dd33ed8b59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6073` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6073 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6073"}, "prompt_sha1": "1138e3582311138e799934162a6d5c51b3859a45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 2 = 40.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 2, "spi_hz": 40000000.0}, "prompt_sha1": "b9e78461f1fa3f5f4eba61ee6f3d70e668a85857", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967078; x = x + 616;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967078+616 = 4294967694. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967694) mod 2^32 = 398. So `x` stores 398. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967078, "add": 616, "result": 398}, "prompt_sha1": "a8fff828d698822f82ddb77ede989532fd0d17bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 16-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/16 = 64.\nOffset bits = log2(16) = 4.\nIndex bits = log2(64) = 6.\nTag bits = 40-6-4 = 30.\nCheck: 30+6+4 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 16, "addr_bits": 40, "lines": 64, "offset_bits": 4, "index_bits": 6, "tag_bits": 30}, "prompt_sha1": "f07663539a600fd7aa34744a97f186eaea755eb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_68_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 68 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_68_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd68;\n end else begin\n if (pulse_in)\n count <= 7'd68;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_68_retrig", "cycles": 68, "retrigger": true}, "prompt_sha1": "d0c576ca1c70a2520043c5df7a6df085d5e5c2d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w57_unsigned` comparing two 57-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w57_unsigned (\n input logic [56:0] a,\n input logic [56:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w57_unsigned", "width": 57, "signed": false}, "prompt_sha1": "2a865e9d6aef11b638e2449ae01220dc762a3333", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 10000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 10000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 10000}, "prompt_sha1": "f803c04f3282a57e25024b0ba5d23fa5b581c3ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_20_msb` for `20-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_20_msb (\n input logic [19:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 20; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_20_msb", "width": 20, "priority": "high"}, "prompt_sha1": "6c4c4e3ae67baa3fae33dbbdfadd4eeade00f4cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10001000001000011001 using generator polynomial bits 110001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 11011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 49, "msg_bits": 20, "msg": 557593, "remainder": 27}, "prompt_sha1": "13f91f94807a8cbc1c76247c11835dbbaaf574d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 6 and initial occupancy is 5. In an abstract batch, producer attempts to enqueue 83 items first, dropping any excess beyond capacity; then consumer removes up to 197 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=6, dropped=82; consumed=6; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 6, "start": 5, "prod": 83, "cons": 197, "dropped": 82, "consumed": 6, "final": 0}, "prompt_sha1": "c0fd09e7d2d7b352b84a05f357c7a710457ed9da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 50 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 50 MHz / 128 = 0.390625 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 50000000.0, "divider": 128, "spi_hz": 390625.0}, "prompt_sha1": "da2f1ea40899f499969b90ea84b37f4cc4b10252", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w53_signed` comparing two 53-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w53_signed (\n input logic signed [52:0] a,\n input logic signed [52:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w53_signed", "width": 53, "signed": true}, "prompt_sha1": "04553c3b2285b90fc3ef339ab269dcc2d09be976", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22 ohm and 2700 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22×2700)/(22+2700) = 21.822190 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22, "r2": 2700, "req": 21.822189566495226}, "prompt_sha1": "ed90a5d5fcd43b80420866b9ee605ef6b43c57e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=10 ms, C=4 ms,T=50 ms, C=4 ms,T=10 ms, C=3 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/10 + 4/50 + 4/10 + 3/5 = 1.580000 = 158.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 10], [4, 50], [4, 10], [3, 5]], "utilization": 1.58}, "prompt_sha1": "1bab1b88a3eacbec5a2ec984df667cf9147ea342", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 9 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 62 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+2 = 12. Total bits = 62×12 = 744. Time = 744/230400 = 0.00322916667 s = 3.229167 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 9, "parity": 0, "stop": 2, "frames": 62, "seconds": 0.0032291666666666666}, "prompt_sha1": "bab62b824ba19cb7be69bab6446837b8cf1402a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_16` for a 16-bit signed input `data`, `4-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_16 (\n input logic signed [15:0] data,\n input logic [3:0] shamt,\n output logic signed [15:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_16", "width": 16, "direction": "right", "arithmetic": true}, "prompt_sha1": "4d2a8e274757f78494e195942737bf655739666a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/100=0.02 A. P=V²/R=2²/100=0.04 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 100, "i": 0.02, "p": 0.04}, "prompt_sha1": "2004c2876aea63cc37bf09f0de3cc384403cafbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1×10^6 × 300/1000 = 300000 bits = 37500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1, "rtt_ms": 300, "bits": 300000.0, "bytes": 37500.0}, "prompt_sha1": "8e54a6dc8f2e4184e46699d37a1afcdd75910208", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 3-bit left-shift register module `shiftreg_left_3`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `3-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_3 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [2:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[1:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_3", "width": 3, "direction": "left"}, "prompt_sha1": "f6f10f79eac68d63d37ec23d8317e0988777ae16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 200000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 200000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 200000}, "prompt_sha1": "196e119ce244e0594a32982f08472bb63149e0e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2828 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "5a729094b7390a8d69b28582f16d9c98da4f2dd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 1 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0d5ffe77c4a045ff4d689e162ab67b68051b9544", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 320 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 320/(320+28) = 0.919540 = 91.95%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 320, "overhead": 28, "efficiency": 0.9195402298850575}, "prompt_sha1": "b2d369f622c10827a15597e56956583829c8449c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-40 = 1960 bytes.\nRound down to an 8-byte multiple: floor((1960)/8)×8 = 1960 bytes.\nFragments required = ceil(5000/1960) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 40, "payload": 5000, "max_payload": 1960, "fragments": 3}, "prompt_sha1": "54ad9d9897ed35ac199caa78a044cb3e308feff6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 559544368, carries 5886 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5886+0+0 = 5886. ACK = (559544368+5886) mod 2^32 = 559550254.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 559544368, "payload": 5886, "syn": 0, "fin": 0, "ack": 559550254}, "prompt_sha1": "0b0657387e373a50ee6464c43896bfa98fec4325", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['V', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 4 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["V", "V", "V", "P", "P", "P", "V", "P", "V", "V", "P", "P", "P", "P", "P", "P"], "value": 0, "blocked": 4}, "prompt_sha1": "93833df13f4e61b4b9d438ac8918b37b197283e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w22_nocin` implementing a 22-bit unsigned adder with inputs `a`, `b` and outputs `22-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w22_nocin (\n input logic [21:0] a,\n input logic [21:0] b,\n output logic [21:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w22_nocin", "width": 22, "cin": false}, "prompt_sha1": "7730d51210a338a9645d7f50519a20518a5917a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 96 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 96 MHz / 8 = 12.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 96000000.0, "divider": 8, "spi_hz": 12000000.0}, "prompt_sha1": "d1c372840d2e4bac75c611376f23715dff865771", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 48-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^48/2^15 = 2^33 = 8589934592 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 48, "page_exp": 15, "entries": 8589934592}, "prompt_sha1": "0ba8d0fa06606d53698af4ed3efe454a1eb32b5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 4690 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×4690/(400×10^6) = 0.0058625 = 0.586250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 500, "cycles": 4690, "load": 0.0058625}, "prompt_sha1": "00d657bfb7a91d63bfd2ef65e2e5eed5acee25e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_10` for a 10-bit unsigned input `data`, `4-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_10 (\n input logic [9:0] data,\n input logic [3:0] shamt,\n output logic [9:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_10", "width": 10, "direction": "left", "arithmetic": false}, "prompt_sha1": "6d4c5ed3d548a99e657e809de08a48085a489800", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x3926 in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 39 26.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 14630, "endian": "big", "bytes": [57, 38]}, "prompt_sha1": "a43e79e40777fefaffeeba7c8254e68cdb30976b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=22 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×2.2/(22+2.2) = 0.818182 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 22, "r2": 2.2, "vout": 0.8181818181818182}, "prompt_sha1": "0c381f14174f05097be5094cdb335be7b734506b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w64_2955` implementing a dual-clock asynchronous FIFO with depth 4 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w64_2955 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 64,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w64_2955", "depth": 4, "width": 64, "ptr_w": 2}, "prompt_sha1": "97bfe3aa5aa66f22cf93c42900d446a65ece2599", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTTNNNTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 1, 0, 0, 0, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "9017d64fb0e1507d6b274aedb0c4d91325ff0248", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 2000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×2000×10^6×8 = 96.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 2000, "channels": 8, "gbps": 96.0}, "prompt_sha1": "d91890132f55947a7a17d1d11e7385360f20bc1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 40 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 40-15 = 25.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 40, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 25}, "prompt_sha1": "553143748a735ab22ec2b1eb7240bbbbc559df9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['V', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["V", "P", "P", "P", "P", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "320562ec5365906b7a197f1c631ba1641c1955ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 300 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 300 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 300}, "prompt_sha1": "c4d4ef47e6ac17a0fe0701e56e4309882df2ee27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 320 payload bytes plus 128 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 320/(320+128) = 0.714286 = 71.43%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 320, "overhead": 128, "efficiency": 0.7142857142857143}, "prompt_sha1": "bac332f8c71c926a49d036acfb50cd222d810a8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×2.5²=3.125e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 2.5, "energy": 3.1249999999999997e-06}, "prompt_sha1": "25f401a18af612502dcda0d22ad45fba0117baeb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 40 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 40 MHz / 8 = 5.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 40000000.0, "divider": 8, "spi_hz": 5000000.0}, "prompt_sha1": "f79fa1619859002d5e48c7f0aa0a438130c3b94f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 1 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×1/(2×10^9) = 0.0025 s = 2.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 1.0, "ghz": 2.0, "sec": 0.0025}, "prompt_sha1": "6c0005da5d5404c571eeb50895d7abad891fa093", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x6A6FF6C5. Extract the 8-bit field starting at bit 15 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x6A6FF6C5 >> 15) & 0xFF = 0xDF (223).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 15, "value": 1785722565, "mask": 255, "field": 223}, "prompt_sha1": "856c17b9dd55d35514d7c1c2361b4cf92021d1cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 10% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.1 × 80 = 8. Verification: 8/80 = 0.1, which is 10%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 10, "high": 8}, "prompt_sha1": "90a3cfecdd001964367b699c08edc874b8aa788f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×12²=0.003384 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 12, "energy": 0.003384}, "prompt_sha1": "6bb2769fb9faa1e7e6c5f9a87c55e0c5edf6c7b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 2 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×2/(2.5×10^9) = 0.016 s = 16.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 2.0, "ghz": 2.5, "sec": 0.016}, "prompt_sha1": "1be24cd129335c5b2774f7c0f771eec066fd6eb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_2067` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_2067 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_2067"}, "prompt_sha1": "722890af0a390965334204170f39c5cf9e402f38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=4.7 nF and is stepped to 9 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=9(1-e^-0.5)=3.541224 V; τ=2.209e-05 s and t=1.1045e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 4.700000000000001e-09, "multiple": 0.5, "vin": 9, "vc": 3.5412240625862994}, "prompt_sha1": "39014c0450101ecca42e41e03496c2b984bb42eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/1 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 1, "tau": 0.01}, "prompt_sha1": "f6c24877f4933d2705bc87a35c850adf164a66fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=47 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×47/(47+47) = 4.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 47, "r2": 47, "vout": 4.5}, "prompt_sha1": "c6f07df09fbeb19f70aec3ba369212d3231ebe4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=2 ms,T=5 ms, C=2 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 2/5 + 2/50 = 0.640000 = 64.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [2, 5], [2, 50]], "utilization": 0.64}, "prompt_sha1": "ff26c7446d04aa45c47bf7afaaee91d6aaa99e92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_48` generating a one-clock-cycle `tick` every 48 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_48 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 47) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_48", "divide": 48}, "prompt_sha1": "a7ff70b055c9b2d923e651705ac775f4cc294c61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [26, 12, 8, 24, 5]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [75, 48, 36, 73, 25].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [26, 12, 8, 24, 5], "finish": [75, 48, 36, 73, 25]}, "prompt_sha1": "791149ad793f7066b5d1eec27f9ffc2ce1a4afb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×24²=2.88e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 24, "energy": 2.88e-05}, "prompt_sha1": "624ca2ee80c08dd4885d5b8e6babd7ec56b6b862", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 64-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/64 = 1024.\nOffset bits = log2(64) = 6.\nIndex bits = log2(1024) = 10.\nTag bits = 52-10-6 = 36.\nCheck: 36+10+6 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 64, "addr_bits": 52, "lines": 1024, "offset_bits": 6, "index_bits": 10, "tag_bits": 36}, "prompt_sha1": "8a9079b74baee8ed3b7945a8ac6cc823542ab365", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^21 = 2^13 = 8192 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 21, "entries": 8192}, "prompt_sha1": "a884cd7f3d5503100522c1060bc54ae738eb8877", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.5 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.5-2 = 14.5 V.\nI = V/R = 14.5/5600 A = 2.5893 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.5, "vf": 2.0, "r": 5600, "current_a": 0.002589285714285714}, "prompt_sha1": "6e83cc46311775141320275e05acc0e05596aaf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3258 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3258/(3258+40+8) = 0.985481 = 98.55%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3258, "iphdr": 40, "eff": 0.985480943738657}, "prompt_sha1": "1bc668609a63918238ef59fd42e61d75b8b038ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 115. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 115/255 × 2.5 V = 1.127451 V.\nThus the estimated input is about 1.1275 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 115, "volts": 1.1274509803921569}, "prompt_sha1": "7f13567de5d65c73bd79458ea29680d2bb59ff2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 182 and tail index 144, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (182-144) mod 256 = 38. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 182, "tail": 144, "occupancy": 38}, "prompt_sha1": "ee981e917db7abfccddeb98ff9eed31470c588e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=2.2 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/10 = -0.220000.\nVout = A_v×Vin = -0.220000×0.5 = -0.110000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 2.2, "vin": 0.5, "gain": -0.22000000000000003, "vout": -0.11000000000000001}, "prompt_sha1": "707da4697824a4c833f5f28789dd3bf0beeb670c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=1000 nF and is stepped to 12 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=12(1-e^-5)=11.919145 V; τ=0.01 s and t=0.05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 1.0000000000000002e-06, "multiple": 5, "vin": 12, "vc": 11.919144636010975}, "prompt_sha1": "97a370f42135577cb34426e35a5a21e206c59602", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×56000)/(2200+56000) = 2116.838488 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 56000, "req": 2116.8384879725086}, "prompt_sha1": "fb03207e25654caa61eafd159c94d8ab662b8a42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2000 counts per period. What compare/high-time count produces exactly 45% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.45 × 2000 = 900. Verification: 900/2000 = 0.45, which is 45%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2000, "duty": 45, "high": 900}, "prompt_sha1": "7e3b888a332f10ff20039caeb294669e4fd4d4f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 97%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.050×(15+0.030×40) = 2.010000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.95, "l2": 15, "l2_hit": 0.97, "mem": 40, "amat": 2.0100000000000007}, "prompt_sha1": "0a8ee395a1f09b5574a212844b44b92b4c07acd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_7568` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_7568 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_7568", "width": 32}, "prompt_sha1": "3673c98f4e15f821825d01b3ffbbdead88d59911", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2523341132, carries 1260 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 1260+0+0 = 1260. ACK = (2523341132+1260) mod 2^32 = 2523342392.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2523341132, "payload": 1260, "syn": 0, "fin": 0, "ack": 2523342392}, "prompt_sha1": "9f88930da6d1f3fad0d173b7a3118ae2776aacf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3900 ohm and C=15000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3900×15000×10^-12 s = 5.85e-05 s.\nf_c=1/(2πRC)=1/(2π×3900×15000×10^-12) = 2720.5973 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3900, "c_f": 1.5e-08, "tau": 5.849999999999999e-05, "fc": 2720.5973178101767}, "prompt_sha1": "383aa020b0b56d7c210e58bee2df95c12949075d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=50 ms, C=4 ms,T=40 ms, C=3 ms,T=50 ms, C=5 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/50 + 4/40 + 3/50 + 5/20 = 0.510000 = 51.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 50], [4, 40], [3, 50], [5, 20]], "utilization": 0.51}, "prompt_sha1": "1154bddaed771d9b380d1a8b5cf1a3925c8fda6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_429284` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_429284 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_429284"}, "prompt_sha1": "bd2f556f2696cbd0d6fd81bbe6e74bd6da8e2aa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_44` for a 44-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_44 (\n input logic [43:0] data,\n input logic [5:0] shamt,\n output logic [43:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_44", "width": 44, "direction": "right", "arithmetic": false}, "prompt_sha1": "c290a8dadba17830b05c912350c587483373ef68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/470 = 4.68085106e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 470, "tau": 4.680851063829787e-05}, "prompt_sha1": "19f2e793673021ac9fc04b32dd2208cfb97dd28e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_64357` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_64357 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_64357"}, "prompt_sha1": "7b8874db1bfb3e810ff740b833074055285fcbd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['V', 'P', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["V", "P", "V", "V", "V", "P", "P", "P", "P", "P", "V", "V", "P", "P", "P", "V", "P", "P", "P", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "a5ad6767d96673fc50454c82de5eee89e0e40245", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 12-bit right-shift register module `shiftreg_right_12`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `12-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_12 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [11:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[11:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_12", "width": 12, "direction": "right"}, "prompt_sha1": "836b62f011ebaeb0078103d1af6f85422bb334a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x35C6. Extract the 5-bit field starting at bit 0 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x35C6 >> 0) & 0x1F = 0x6 (6).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 5, "lsb": 0, "value": 13766, "mask": 31, "field": 6}, "prompt_sha1": "400f784f814de8326e375b42beeb0aae2c70341e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.245.40.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.245.40.0\nBroadcast address: 10.245.40.3\nUsable host range: 10.245.40.1 to 10.245.40.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.245.40.0/30", "usable": 2, "first": "10.245.40.1", "last": "10.245.40.2", "broadcast": "10.245.40.3"}, "prompt_sha1": "f111e27ae83d360957aa6f3fc097aa84b4089a3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^19 V = 5.72204589844e-06 V = 5.722046 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 3.0, "step": 5.7220458984375e-06}, "prompt_sha1": "5fe8473c2e60950c61c73194fdf761984671267f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 101010011111000111010100 using generator polynomial bits 111011. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 11000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 59, "msg_bits": 24, "msg": 11137492, "remainder": 24}, "prompt_sha1": "79422f66420b4afaeb74064c48e87352af069740", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 948950761, carries 48493 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 48493+0+1 = 48494. ACK = (948950761+48494) mod 2^32 = 948999255.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 948950761, "payload": 48493, "syn": 0, "fin": 1, "ack": 948999255}, "prompt_sha1": "ba62524ad2ebe1eeda205ad301e35d56a6724f29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 2093 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×2093/(64×10^6) = 0.00163515625 = 0.163516%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 50, "cycles": 2093, "load": 0.00163515625}, "prompt_sha1": "1078324bcbae2aa007dc7be36b6ec93967037152", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xF63A5692, toggle bit 3 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 3)`. Result = 0xF63A569A.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 4131018386, "bit": 3, "op": "toggle", "result": 4131018394}, "prompt_sha1": "123c48cfc0d43b516a8aa2958b85ee34e2350900", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×512 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 512, "reach": 4194304}, "prompt_sha1": "cea99b10c5416ce0205fa295d586fa83ba7fd7a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 48, and period is 9207 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(48×9207) = 162.919518 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 48, "period": 9207, "hz": 162.91951775822744}, "prompt_sha1": "4314b6151759b995ee88213087a676cbf0dc1014", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1011000001 using generator polynomial bits 11111011. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0101011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 251, "msg_bits": 10, "msg": 705, "remainder": 43}, "prompt_sha1": "4f7b812580be4f4cb045317b910b287f47575ec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_14` for a 14-bit signed input `data`, `4-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_14 (\n input logic signed [13:0] data,\n input logic [3:0] shamt,\n output logic signed [13:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_14", "width": 14, "direction": "right", "arithmetic": true}, "prompt_sha1": "10a292cef7ffc4ef9671461e26fe64030766ca81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0D, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x0D<<1)|1 = 0x1B = 00011011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 13, "rw": 1, "byte": 27}, "prompt_sha1": "ab98004d73f393396136a01ca19fefde7f88340d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8951(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8951(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8951([1, 2]) == 1.5\nassert mean_8951([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8951"}, "prompt_sha1": "97b55722af0dfe77717e958e6a8cf0c2b3644302", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 7` on one shared integer without synchronization. Assume `items` initially equals 154. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 154; T2 reads 154; both compute 161; T1 writes 161; T2 writes 161. The observed final value is 161, but two serial increments would produce 168.\n\n```\nlock(mutex)\nitems = items + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "8041506e6615d7c751c43120b7002cfc7abf1364", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65423; x = x + 221;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65423+221 = 65644. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65644) mod 2^16 = 108. So `x` stores 108. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65423, "add": 221, "result": 108}, "prompt_sha1": "41120263a5a5c3657ebbb0bc487f4c05aa9e08fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8867 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8867/(8867+20+8) = 0.996852 = 99.69%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8867, "iphdr": 20, "eff": 0.9968521641371557}, "prompt_sha1": "55e8017253b0c63ed6163e12f2f62e9e4aefc928", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/47000=0.000106382979 A. P=V²/R=5²/47000=0.000531914894 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 47000, "i": 0.00010638297872340425, "p": 0.0005319148936170213}, "prompt_sha1": "0b1f8338fa3b4f651f5451d1fe474460a2483c97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 25-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^25/2^18 = 2^7 = 128 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 25, "page_exp": 18, "entries": 128}, "prompt_sha1": "b835249da2b4cbf89692741cb2d56144901f05a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-20 = 1380 bytes.\nRound down to an 8-byte multiple: floor((1380)/8)×8 = 1376 bytes.\nFragments required = ceil(6000/1376) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 20, "payload": 6000, "max_payload": 1376, "fragments": 5}, "prompt_sha1": "fd88afdaca00743de2f92f42750ef876a7e4e878", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.141.69.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.141.69.0\nBroadcast address: 10.141.69.63\nUsable host range: 10.141.69.1 to 10.141.69.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.141.69.0/26", "usable": 62, "first": "10.141.69.1", "last": "10.141.69.62", "broadcast": "10.141.69.63"}, "prompt_sha1": "73dfbb4c2507e6be20beda5acca1a5616f2c7ab9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 96 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 96 MHz / 16 = 6.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 96000000.0, "divider": 16, "spi_hz": 6000000.0}, "prompt_sha1": "5d86809667f4b0cc7815b67386e63f3edff15d76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1500 ohm and C=2200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1500×2200×10^-12 s = 3.3e-06 s.\nf_c=1/(2πRC)=1/(2π×1500×2200×10^-12) = 48228.7706 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1500, "c_f": 2.2e-09, "tau": 3.2999999999999997e-06, "fc": 48228.77063390768}, "prompt_sha1": "9f73e68aaa95e965dec6be1f5ca0cbf1e55d9bf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_1511` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_1511 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_1511", "width": 5}, "prompt_sha1": "93d14b99bcd2ff3cec675106cf07d9e643d93e1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967098; x = x + 286;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967098+286 = 4294967384. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967384) mod 2^32 = 88. So `x` stores 88. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967098, "add": 286, "result": 88}, "prompt_sha1": "38a98886267d37b8341024a535d3a3c0c998b0ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 5000 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 5000 = 750. Verification: 750/5000 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 5000, "duty": 15, "high": 750}, "prompt_sha1": "62737e3260675fbb21386f55c4fc5cc84b00c92e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 9-bit ADC spanning 0 to 1.2 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.2/2^9 V = 0.00234375 V = 2343.750000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 9, "vref": 1.2, "step": 0.00234375}, "prompt_sha1": "bddf0603607e06825acbb6f65464396fbefe57ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551494; x = x + 407;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551494+407 = 18446744073709551901. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551901) mod 2^64 = 285. So `x` stores 285. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551494, "add": 407, "result": 285}, "prompt_sha1": "37d6577f0ac5ab679fdecfd3377588c5328aa1d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 71 and initial occupancy is 62. In an abstract batch, producer attempts to enqueue 162 items first, dropping any excess beyond capacity; then consumer removes up to 6 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=71, dropped=153; consumed=6; final occupancy=65.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 71, "start": 62, "prod": 162, "cons": 6, "dropped": 153, "consumed": 6, "final": 65}, "prompt_sha1": "b025d75eed4117cb17824f879da4d6911b052418", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/4.7 = 0.212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 4.7, "tau": 0.2127659574468085}, "prompt_sha1": "c896a597be780843e3f16638d23f14a881f5abc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.162.102.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.162.102.0\nBroadcast address: 10.162.102.127\nUsable host range: 10.162.102.1 to 10.162.102.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.162.102.0/25", "usable": 126, "first": "10.162.102.1", "last": "10.162.102.126", "broadcast": "10.162.102.127"}, "prompt_sha1": "f3a27e4a8c6bb85161e674c7969b50e5751568c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1400 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-20-24 = 1356 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 20, "tcphdr": 24, "mss": 1356}, "prompt_sha1": "f98d21d2faa11cbc49c11d2b061dc8d7e361c7ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_9843` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_9843 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_9843", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "0548ad299d88928ea8e5e8a75e28e460bd332024", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xC0C7C59F in 4 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 9F C5 C7 C0.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 3234317727, "endian": "little", "bytes": [159, 197, 199, 192]}, "prompt_sha1": "c10004abb00eebb2ab511c3df5ac5cd6e186edd5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5857(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5857(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5857([1, 2]) == 1.5\nassert mean_5857([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5857"}, "prompt_sha1": "2fcff841e98b3843cbd1564c15b7bb2bbbb7fcba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_34` for a 34-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_34 (\n input logic [33:0] data,\n input logic [5:0] shamt,\n output logic [33:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_34", "width": 34, "direction": "right", "arithmetic": false}, "prompt_sha1": "d96224ef4fa682c404ea499e282549b6eeac4f3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_9436` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_9436 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_9436"}, "prompt_sha1": "995d005b5cf45edfefba31557f494a8dcf6223fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_74_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 74 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_74_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd74;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_74_ignore", "cycles": 74, "retrigger": false}, "prompt_sha1": "19b5c5ea12931641879156f14d826bf1a59f6543", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x67, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x67<<1)|0 = 0xCE = 11001110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 103, "rw": 0, "byte": 206}, "prompt_sha1": "46bdbc6e6e623e7c6b30deffbba5ffdee4d65e87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 5600 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×5600×10^6×2 = 67.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 5600, "channels": 2, "gbps": 67.2}, "prompt_sha1": "b259e6d4b324e498ad051e5dbf279deba5e97021", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-24 = 1476 bytes.\nRound down to an 8-byte multiple: floor((1476)/8)×8 = 1472 bytes.\nFragments required = ceil(6000/1472) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 24, "payload": 6000, "max_payload": 1472, "fragments": 5}, "prompt_sha1": "e12173795fd21b72290be2cb8ad311f96854530e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967276; x = x + 264;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967276+264 = 4294967540. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967540) mod 2^32 = 244. So `x` stores 244. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967276, "add": 264, "result": 244}, "prompt_sha1": "3811a9ce75c168935e92922e080d35bb413d6554", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_114` generating a one-clock-cycle `tick` every 114 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_114 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 113) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_114", "divide": 114}, "prompt_sha1": "bd449e5c068ce31326a65b3552f68d33fcfdfd8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 4000 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 4000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 4000}, "prompt_sha1": "8f8fcc48d17f6191fd8e6410e1a326f3217e17f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50 Mbit/s and RTT 40 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50×10^6 × 40/1000 = 2e+06 bits = 250000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50, "rtt_ms": 40, "bits": 2000000.0, "bytes": 250000.0}, "prompt_sha1": "b8713998306e52cb8f57a87950fa4988503e0e02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_99_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 99 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_99_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd99;\n end else begin\n if (pulse_in)\n count <= 7'd99;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_99_retrig", "cycles": 99, "retrigger": true}, "prompt_sha1": "9874254f196e4c570a9f14964c2c03a167232dc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/220 = 0.000213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 220, "tau": 0.00021363636363636363}, "prompt_sha1": "ff491a62216ae23a0554b864e3d55e8ac46fb61e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_25_msb` for `25-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_25_msb (\n input logic [24:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 25; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_25_msb", "width": 25, "priority": "high"}, "prompt_sha1": "87bd0e621620de100ac24d42b01015567d9193df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 100000 Mbit/s and RTT 5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 100000×10^6 × 5/1000 = 5e+08 bits = 6.25e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 100000, "rtt_ms": 5, "bits": 500000000.0, "bytes": 62500000.0}, "prompt_sha1": "4c58b9201c0822eca3a6c19d31a7bb28ee503f9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 48 and tail index 6, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (48-6) mod 64 = 42. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 48, "tail": 6, "occupancy": 42}, "prompt_sha1": "86d8aa564a8780d9d79b1ad0b735c63ca26e2bcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6001 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6001/(6001+20+8) = 0.995356 = 99.54%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6001, "iphdr": 20, "eff": 0.9953557803947587}, "prompt_sha1": "4e7d0ab6b470f18e6828d7adba9ac3de0eb14554", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 868152533, carries 30901 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 30901+1+0 = 30902. ACK = (868152533+30902) mod 2^32 = 868183435.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 868152533, "payload": 30901, "syn": 1, "fin": 0, "ack": 868183435}, "prompt_sha1": "cf9f5a3a8050e8884a85be2eb211ac380537460a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w51_signed` comparing two 51-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w51_signed (\n input logic signed [50:0] a,\n input logic signed [50:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w51_signed", "width": 51, "signed": true}, "prompt_sha1": "66c44109f73ad9545940c936780ee02cbf3ef1b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 96 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 1951 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×1951/(96×10^6) = 0.203229167 = 20.322917%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 96, "irq_hz": 10000, "cycles": 1951, "load": 0.20322916666666666}, "prompt_sha1": "60e685784356a6c08dce7ca502ab396069afafae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `entries` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `table[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ebcec186908529f2257179cb6479d26af573c277", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1200 ohm and C=82000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1200×82000×10^-12 s = 9.84e-05 s.\nf_c=1/(2πRC)=1/(2π×1200×82000×10^-12) = 1617.4283 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1200, "c_f": 8.199999999999999e-08, "tau": 9.839999999999999e-05, "fc": 1617.4282834542212}, "prompt_sha1": "f66163073fc92724e00fe791cf8ac8e6a2b5acf5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 33-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^33/2^14 = 2^19 = 524288 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 33, "page_exp": 14, "entries": 524288}, "prompt_sha1": "8e9c2528fd7876ba4082174c7e5281150ebeaa3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(20×10^6) s = 0.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 16, "time_us": 0.7999999999999999}, "prompt_sha1": "2b7d6994259d6a1c3b6eff08bdd2711a142044cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 92%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(3+0.080×80) = 1.188000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 3, "l2_hit": 0.92, "mem": 80, "amat": 1.1880000000000002}, "prompt_sha1": "c2bf1aa2f76e2811b0bb5f9ea4d8b96f27243a51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x3F, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x3F<<1)|1 = 0x7F = 01111111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 63, "rw": 1, "byte": 127}, "prompt_sha1": "eb7199f80771fabecd03c8492405d58a0990059a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock C then QUEUE; worker_2 acquires QUEUE then C. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds C while waiting for QUEUE, while worker_2 holds QUEUE while waiting for C; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "ff8656d55c188be8e9343f27c0aec5d08ebe9629", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×200/1000/8 = 25000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 200, "bytes": 25000000.0}, "prompt_sha1": "40389e8c8cec80537d3142295e7d431b192aba48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=220 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/100 = -2.200000.\nVout = A_v×Vin = -2.200000×0.25 = -0.550000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 220, "vin": 0.25, "gain": -2.2, "vout": -0.55}, "prompt_sha1": "32c5495a6bae1e89ef035dfd93ee1666b7558550", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_51_lsb` for `51-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_51_lsb (\n input logic [50:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 50; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_51_lsb", "width": 51, "priority": "low"}, "prompt_sha1": "1a9c07f2b3de67ec04e31d09f7640058cbcb2f2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 9000 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-40-28 = 8932 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 40, "tcphdr": 28, "mss": 8932}, "prompt_sha1": "46309af27fe6cb05634bfca631f1d360c39f37dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_10_45_11` with RED, GREEN, YELLOW states. Hold RED for 10 clock cycles, GREEN for 45, and YELLOW for 11; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_10_45_11 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 9) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 44) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 10) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_10_45_11", "red": 10, "green": 45, "yellow": 11}, "prompt_sha1": "da13a5bffa32b62b159efa2d31175514f9259a02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 1000 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×1000×10^6×6 = 36.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 1000, "channels": 6, "gbps": 36.0}, "prompt_sha1": "d4bcee055de52f5aa78643a8b85effc53b0a1ffc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 155. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 155/1023 × 5 V = 0.757576 V.\nThus the estimated input is about 0.7576 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 155, "volts": 0.7575757575757576}, "prompt_sha1": "896e712c47499916d566fd9cb355af22524d5437", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 8 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 63 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+1 = 10. Total bits = 63×10 = 630. Time = 630/19200 = 0.0328125 s = 32.812500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 8, "parity": 0, "stop": 1, "frames": 63, "seconds": 0.0328125}, "prompt_sha1": "7045ca785c3b201ec7d357c477507560ef7b0577", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 512 counts per period. What compare/high-time count produces exactly 87.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.875 × 512 = 448. Verification: 448/512 = 0.875, which is 87.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 512, "duty": 87.5, "high": 448}, "prompt_sha1": "fad27fead35e73c19d06ad396fb3691c73b6ffbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 3e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×1000000 = 2000000 Hz. Proposed rate 3e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000000, "min_fs": 2000000, "proposed": 3000000}, "prompt_sha1": "6daf0d3f7122532a80aef19bdf4cff018bf90e4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 301 elements. Review loop `for i in range(301+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(301+1)` includes index 301, which is out of range for a length-301 sequence. Correct loop: `for i in range(301):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 301, "variant": "one_past"}, "prompt_sha1": "f680e6e68ca729fedc1e264e441206a5cd63bf3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 1600 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×1600×10^6×1 = 51.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 1600, "channels": 1, "gbps": 51.2}, "prompt_sha1": "c08a0995d888a06418613f65d031851524ea86a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3.3 V reference and returns code 510. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 510/1023 × 3.3 V = 1.645161 V.\nThus the estimated input is about 1.6452 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.3, "code": 510, "volts": 1.6451612903225805}, "prompt_sha1": "f975460c83840c0eeb4ef13b1170e0b496affc63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1492 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-20-40 = 1432 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 20, "tcphdr": 40, "mss": 1432}, "prompt_sha1": "fa853bb3ae042d3c46d21182cbd31780376a1ee7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_6467` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_6467 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_6467"}, "prompt_sha1": "eb551423f329e93366819f0c37ec1449681e7c95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=470 nF and is stepped to 5 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=5(1-e^-4)=4.908422 V; τ=0.0001034 s and t=0.0004136 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 4.7000000000000005e-07, "multiple": 4, "vin": 5, "vc": 4.908421805556329}, "prompt_sha1": "5bae669bc871d9a21004809ca75d895cc4ad8385", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 22-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^22 V = 7.86781311035e-07 V = 0.786781 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 22, "vref": 3.3, "step": 7.867813110351562e-07}, "prompt_sha1": "df052613969cb9137008a5e744d5d7c94a73920d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x65, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x65<<1)|1 = 0xCB = 11001011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 101, "rw": 1, "byte": 203}, "prompt_sha1": "6c5806719948912cd87e98a2fc69f93eed395973", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x19, toggle bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 4)`. Result = 0x9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 25, "bit": 4, "op": "toggle", "result": 9}, "prompt_sha1": "c1450072aab28d21071c30012e8ec90e9c41488a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 001010110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001010110", "ones": 4, "parity": 0}, "prompt_sha1": "73b5740089e2fdb93b772328bab9b5f70b715678", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_199` generating a one-clock-cycle `tick` every 199 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_199 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 198) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_199", "divide": 199}, "prompt_sha1": "fca0ba1fa916a47c97a355b02a3461a00f94c2af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_54_18` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 54, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_54_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 53) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_54_18", "red": 20, "green": 54, "yellow": 18}, "prompt_sha1": "73b90887b9733a1c2d27894090632a07c3204a93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 0.5 on a 4.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×0.5/(4.5×10^9) = 0.00555555556 s = 5.555556 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 0.5, "ghz": 4.5, "sec": 0.005555555555555556}, "prompt_sha1": "47e32186fbd996ceb682255bd4b661edf56ce9f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65358; x = x + 280;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65358+280 = 65638. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65638) mod 2^16 = 102. So `x` stores 102. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65358, "add": 280, "result": 102}, "prompt_sha1": "73ba2554958c5a291938c590b2223ba4a147321d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=220 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/10 = -22.000000.\nVout = A_v×Vin = -22.000000×0.1 = -2.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 220, "vin": 0.1, "gain": -22.0, "vout": -2.2}, "prompt_sha1": "95beadfe8e7c6fb0d2482229f24c6881572a9d7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(10×10^6) s = 204.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 2048, "time_us": 204.79999999999998}, "prompt_sha1": "37f5a23ce4718e0b62758d0c8e89144ab5c97f3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_32_4_17` with RED, GREEN, YELLOW states. Hold RED for 32 clock cycles, GREEN for 4, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_32_4_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 31) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 3) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_32_4_17", "red": 32, "green": 4, "yellow": 17}, "prompt_sha1": "56191c7ebf9fb27b57e62c3b82968d58eefa4014", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(5×10^6) s = 25.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 128, "time_us": 25.599999999999998}, "prompt_sha1": "5e31d1acdf7a30f8c561e6bb3f73e8195dfa676f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×128 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 128, "reach": 8388608}, "prompt_sha1": "f0100c9911399ac997caf9d4ba37a0f2b24cae17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_73` for a synchronous sampled input `noisy`. Update output `clean` only after observing 73 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_73 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 72) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_73", "stable_samples": 73}, "prompt_sha1": "f12afea772a13d2291e93becdf2559fb7475ecea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 59 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 59 = 61.\nClock pulses = 61×9 = 549.\nTime = 549/400000 s = 1372.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 59, "clocks": 549, "time_s": 0.0013725}, "prompt_sha1": "d4ce428da0271775da4cb0b3fc9adfceeb4ba17c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=2.2 nF and is stepped to 12 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=12(1-e^-4)=11.780212 V; τ=4.84e-06 s and t=1.936e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 2.2000000000000003e-09, "multiple": 4, "vin": 12, "vc": 11.78021233333519}, "prompt_sha1": "eb2e0a847df84e4b4e5de660d877282a803b6b56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 209; x = x + 218;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 209+218 = 427. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (427) mod 2^8 = 171. So `x` stores 171. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 209, "add": 218, "result": 171}, "prompt_sha1": "90190967a826a8939978dfd9812da1c3dd6b2da0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 85% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.85 × 10000 = 8500. Verification: 8500/10000 = 0.85, which is 85%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 85, "high": 8500}, "prompt_sha1": "67b79c57d6e7d388b9d1d23091822e8db6cdca54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 153; x = x + 407;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 153+407 = 560. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (560) mod 2^8 = 48. So `x` stores 48. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 153, "add": 407, "result": 48}, "prompt_sha1": "922acc1a420572f71ed127a6e279ba4ddac98355", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 22.5 V source drives a 1800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 22.5-2.3 = 20.2 V.\nI = V/R = 20.2/1800 A = 11.2222 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 22.5, "vf": 2.3, "r": 1800, "current_a": 0.011222222222222222}, "prompt_sha1": "9fcb9304b693318cb44431ae58339c184f2a3790", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_11_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 11 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_11_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 4'd11;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_11_ignore", "cycles": 11, "retrigger": false}, "prompt_sha1": "eeeed384374b19ffff22aeddb185b7c31c58107b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x5F7B in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 7B 5F.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 24443, "endian": "little", "bytes": [123, 95]}, "prompt_sha1": "4648ba15f2429dec24568b44b4cdebe5646bb74d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w5_nocin` implementing a 5-bit unsigned adder with inputs `a`, `b` and outputs `5-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w5_nocin (\n input logic [4:0] a,\n input logic [4:0] b,\n output logic [4:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w5_nocin", "width": 5, "cin": false}, "prompt_sha1": "084b00b8923d268b86f8a3c4fcf3ef0360c18fdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_62_msb` for `62-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_62_msb (\n input logic [61:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 62; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_62_msb", "width": 62, "priority": "high"}, "prompt_sha1": "b952308704305fd8e74e7d4f28509170ee04661f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 24-bit up/down counter `updown_24_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_24_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [23:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 24'd16777215) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_24_sat", "width": 24, "wrap": false}, "prompt_sha1": "dd9d65a2a8c508ec04798d4a8cdc3bab7c78bac6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_776859` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_776859 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_776859"}, "prompt_sha1": "8adbb468406d606636f2c61ac43f25f7c9895b12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 75%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.050×(15+0.250×50) = 3.375000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.95, "l2": 15, "l2_hit": 0.75, "mem": 50, "amat": 3.3750000000000013}, "prompt_sha1": "e30b18e5336f4bc5e12ae74183659b230eec2ec2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 21-bit up/down counter `updown_21_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_21_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [20:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_21_wrap", "width": 21, "wrap": true}, "prompt_sha1": "61215dafd1970e02eb9d1d700651b0db325a4921", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×5²=0.005875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 5, "energy": 0.005875}, "prompt_sha1": "072e56f9c7bde8ec68c3b6e56c75906b7c1839c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 63 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 63 = 66.\nClock pulses = 66×9 = 594.\nTime = 594/400000 s = 1485.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 63, "clocks": 594, "time_s": 0.001485}, "prompt_sha1": "1184633eb082a4aec0ea1352e878cdd6673007a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/10 = 2.2e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 10, "tau": 2.2e-05}, "prompt_sha1": "efde79cf646a5d12867dc90ee9d6f9fccbafce62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['V', 'V', 'V', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 14 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["V", "V", "V", "V", "V", "P", "V", "V", "V", "V", "P"], "value": 14, "blocked": 0}, "prompt_sha1": "af0b068e732436a38bc501c8f0cbec74801dbde9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4167955935, carries 63114 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 63114+0+0 = 63114. ACK = (4167955935+63114) mod 2^32 = 4168019049.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4167955935, "payload": 63114, "syn": 0, "fin": 0, "ack": 4168019049}, "prompt_sha1": "162cf8e762a182c780658df53359fbd08a8b738a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_1272` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_1272 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_1272", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "ab173d06a2e594bef378c59881aa158fe8cf36b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 2 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×2/(3×10^9) = 0.0333333333 s = 33.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 2.0, "ghz": 3.0, "sec": 0.03333333333333333}, "prompt_sha1": "853ccfd0f91007031898553eb5e12d1172be675a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 20 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 20×11 = 220. Time = 220/19200 = 0.0114583333 s = 11.458333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 8, "parity": 0, "stop": 2, "frames": 20, "seconds": 0.011458333333333333}, "prompt_sha1": "7fa314cd45ad458e0de3314e212b173845209459", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 194 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 194/(194+20+8) = 0.873874 = 87.39%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 194, "iphdr": 20, "eff": 0.8738738738738738}, "prompt_sha1": "908e8f768a64fd4d9d8a52ecafa5cf698b66adc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_249` generating a one-clock-cycle `tick` every 249 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_249 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 248) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_249", "divide": 249}, "prompt_sha1": "0a08b818169998bd48bbc69c2c9683810a10930c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9939(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9939(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9939([1, 2]) == 1.5\nassert mean_9939([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9939"}, "prompt_sha1": "89d29bba9c67fc8aa93acac0b82e0a4a7d8a654c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_49_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 49 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_49_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd49;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_49_ignore", "cycles": 49, "retrigger": false}, "prompt_sha1": "29717ee8614b09d36034346ef7d13e7b55646635", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×180)/(4700+180) = 173.360656 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 180, "req": 173.36065573770492}, "prompt_sha1": "77826e3c473ffc4a1f34554b27816076f28295aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 80%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.030×(10+0.200×50) = 2.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.97, "l2": 10, "l2_hit": 0.8, "mem": 50, "amat": 2.6000000000000005}, "prompt_sha1": "4b185017896bbf9747981cbcbaf1c82eebce9a5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 16 = 1.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 16, "spi_hz": 1500000.0}, "prompt_sha1": "deafc86eeaae6d7dd8afa9c7f3297edac85a419c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock CACHE then B; worker_2 acquires B then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds CACHE while waiting for B, while worker_2 holds B while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "55067e803d11db831e69d72a8ba5ecfcc662e0d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_54` for a 54-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_54 (\n input logic [53:0] data,\n input logic [5:0] shamt,\n output logic [53:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_54", "width": 54, "direction": "right", "arithmetic": false}, "prompt_sha1": "db9c6d4277bcc2abc1367564d951d164c66bf599", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_428908` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_428908 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_428908"}, "prompt_sha1": "82b4b4a5c036a3a8642a90419fd77a358e6d0c8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 15 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 15/1000 = 3.75e+06 bits = 468750 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 15, "bits": 3750000.0, "bytes": 468750.0}, "prompt_sha1": "ce67b3ba31c696a63ab9efe8fcac7fcb02bbae41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 25 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 25-21 = 4.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 25, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 4}, "prompt_sha1": "ffa64540f8e914e2fb11c5ccda8abc2080dc5eca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x36, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x36<<1)|0 = 0x6C = 01101100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 54, "rw": 0, "byte": 108}, "prompt_sha1": "0e311163e7095c8ab2a0d19683352c2392f3e2d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8981` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8981 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8981"}, "prompt_sha1": "75c190df065ee8fb8cf64f1ae56909b63b9c0623", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 101011100111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101011100111", "ones": 8, "parity": 0}, "prompt_sha1": "3021ea6a98bcd760932b2014cf3d50c528b75431", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 7 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 4 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+1 = 9. Total bits = 4×9 = 36. Time = 36/460800 = 7.8125e-05 s = 0.078125 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 7, "parity": 0, "stop": 1, "frames": 4, "seconds": 7.8125e-05}, "prompt_sha1": "2af7e78ed57723d639cf0f89183753bcbe21ef7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock D then L2; T2 acquires L2 then D. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds D while waiting for L2, while T2 holds L2 while waiting for D; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire D before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "4591aa753d76e8de41614a52aa3450e8145f5201", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-28 = 548 bytes.\nRound down to an 8-byte multiple: floor((548)/8)×8 = 544 bytes.\nFragments required = ceil(6000/544) = 12.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 28, "payload": 6000, "max_payload": 544, "fragments": 12}, "prompt_sha1": "1dfda85e4912b18141af27dbb18a0800c485ea7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 20% of instructions, the branch misprediction rate is 8%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.080 × 4 = 0.064000.\nEffective CPI = 1 + 0.064000 = 1.064000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.2, "mispred": 0.08, "penalty": 4, "result": 1.064}, "prompt_sha1": "6517c8ebdd7461a99fea50cb529272ae87b5c6f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_208` generating a one-clock-cycle `tick` every 208 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_208 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 207) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_208", "divide": 208}, "prompt_sha1": "b2c67137c3f056c09cc836be4e48e5052f47f81a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_88` generating a one-clock-cycle `tick` every 88 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_88 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 87) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_88", "divide": 88}, "prompt_sha1": "fc5167d9ce3db4f1eaf50ef0c8f62cb843f5e8a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-40 = 536 bytes.\nRound down to an 8-byte multiple: floor((536)/8)×8 = 536 bytes.\nFragments required = ceil(8000/536) = 15.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 40, "payload": 8000, "max_payload": 536, "fragments": 15}, "prompt_sha1": "2c731a1e1da258f920da2727b37e376d5f1e8e84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=220 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/2.2 = -100.000000.\nVout = A_v×Vin = -100.000000×1 = -100.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 220, "vin": 1.0, "gain": -99.99999999999999, "vout": -99.99999999999999}, "prompt_sha1": "db5d479037bd52bebc412524746331307f17b01e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 120 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×120)/(47+120) = 33.772455 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 120, "req": 33.772455089820355}, "prompt_sha1": "58fb89d580ec6bc3587dc9f05e7aa4c3479f6f46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 97.9% hit rate, and a 155 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.979 = 0.021.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.021×155 ns = 7.7550 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.979, "penalty": 155, "result": 7.755000000000003}, "prompt_sha1": "a79cb88cac397119c544c50679e9206c70e9ebb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-20 = 556 bytes.\nRound down to an 8-byte multiple: floor((556)/8)×8 = 552 bytes.\nFragments required = ceil(10000/552) = 19.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 20, "payload": 10000, "max_payload": 552, "fragments": 19}, "prompt_sha1": "1b1d3e9903e550baf14ce08fd3e31bfedeeb6b02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w16_5564` implementing a dual-clock asynchronous FIFO with depth 128 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w16_5564 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 16,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w16_5564", "depth": 128, "width": 16, "ptr_w": 7}, "prompt_sha1": "13a47b7a6f33a25b95c00a42ac2e8dcde9ee3fcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_4236` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_4236 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_4236"}, "prompt_sha1": "c57982cd027b0336aee02a922a095598b1cf969d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4789-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4789×8 = 38312 bits.\nSerialization delay = bits/rate = 38312/(1000×10^6) s = 3.8312e-05 s = 38.312000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4789, "rate_mbps": 1000, "delay_s": 3.8312e-05}, "prompt_sha1": "fbcd823b495ec0db498f3a5b911dba97654916c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.48.189.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.48.189.0\nBroadcast address: 10.48.189.31\nUsable host range: 10.48.189.1 to 10.48.189.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.48.189.0/27", "usable": 30, "first": "10.48.189.1", "last": "10.48.189.30", "broadcast": "10.48.189.31"}, "prompt_sha1": "99b85053235a6154e214e42bf1d9e5885addf7bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 3.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+10 = 13.5. Period = 13.5/1000000 = 1.35e-05 s. Maximum rate = 1/period = 74074.074074 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 3.5, "conv_cycles": 10, "period": 1.35e-05, "rate": 74074.07407407407}, "prompt_sha1": "74e73ab5e77f74d6f245f5b8cdb05e225796ab89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=22 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/2.2 = -10.000000.\nVout = A_v×Vin = -10.000000×1 = -10.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 22, "vin": 1.0, "gain": -10.0, "vout": -10.0}, "prompt_sha1": "988591f2bd2c041e8796cae78ed2046403e9d1ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8030-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8030×8 = 64240 bits.\nSerialization delay = bits/rate = 64240/(25000×10^6) s = 2.5696e-06 s = 2.569600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8030, "rate_mbps": 25000, "delay_s": 2.5696e-06}, "prompt_sha1": "ebf011e90757f4866c6faa88d55c2697ed2fa882", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_75_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 75 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_75_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd75;\n end else begin\n if (pulse_in)\n count <= 7'd75;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_75_retrig", "cycles": 75, "retrigger": true}, "prompt_sha1": "227f00b6623b649a45ed2240839f9bead7074234", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 35-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^35/2^14 = 2^21 = 2097152 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 35, "page_exp": 14, "entries": 2097152}, "prompt_sha1": "cbb6b5107b88336547a9214b77081f5f2c24908b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/220=0.218181818 A. P=V²/R=48²/220=10.4727273 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 220, "i": 0.21818181818181817, "p": 10.472727272727273}, "prompt_sha1": "c7a7d7dd8b5f7a3a21685292af2b2cfa1017b326", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 3 = 0.007500.\nEffective CPI = 1 + 0.007500 = 1.007500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.05, "mispred": 0.05, "penalty": 3, "result": 1.0075}, "prompt_sha1": "1a641d5f32a5da66143279055e79164760876018", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×512 KiB = 12288 KiB = 12582912 bytes = 12.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 512, "reach": 12582912}, "prompt_sha1": "05b7c6b33c1f40ceed8aa9d629c16ebcb38408c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 21 and tail index 26, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (21-26) mod 32 = 27. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 21, "tail": 26, "occupancy": 27}, "prompt_sha1": "4aa46aa29c48610116ea519bc7c2a769df840905", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/330=0.00757575758 A. P=V²/R=2.5²/330=0.0189393939 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 330, "i": 0.007575757575757576, "p": 0.01893939393939394}, "prompt_sha1": "92b0fcd7972189c9eb0953a33d2368f2108c88d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 80%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.080×(5+0.200×50) = 2.000000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.92, "l2": 5, "l2_hit": 0.8, "mem": 50, "amat": 1.9999999999999993}, "prompt_sha1": "76551616603768245d4c3504071fff5a4ec74dee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x474CDD in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: DD 4C 47.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 4672733, "endian": "little", "bytes": [221, 76, 71]}, "prompt_sha1": "b4737317aa564655df42bed4d12e7ea0aa305a27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-52 = 1196 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 52, "mss": 1196}, "prompt_sha1": "cfa74aaab6c3b92f78f0f9aefe774c9d3b663638", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "c127f32541110cbba2875490002a57acb16245e7", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "0df6ada875e0244992b7c1c03200c0f30e81389569243fa101edad80b64c2445", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 2132, "original_row_sha256": "2c3a43de123daee6248e4bf05d7c44daeb0e97f17df8e5615bf10dcc9d4620c8", "version": "v1.0.0-rc1"}}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "03a675de76f7645668c935bf7e11d64fb9d7f8d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 421 elements. Review loop `for i in range(421-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(421-1)` produces indices 0 through 419, so index 420 is skipped. Correct loop: `for i in range(421):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 421, "variant": "miss_last"}, "prompt_sha1": "eb5d3329f6d48becd2191d5b1cf99cd069592a29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'V', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "V", "V", "V", "P", "P", "P", "V", "P", "V", "V", "V", "V", "V", "V", "V"], "value": 12, "blocked": 0}, "prompt_sha1": "51c329fd3888296976c6b38c8212ea0b1e3fe45f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_63_lsb` for `63-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_63_lsb (\n input logic [62:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 62; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_63_lsb", "width": 63, "priority": "low"}, "prompt_sha1": "c9737dcea5c64abd13d5fccd2da2962543022217", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 4` on one shared integer without synchronization. Assume `requests` initially equals 237. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 237; T2 reads 237; both compute 241; T1 writes 241; T2 writes 241. The observed final value is 241, but two serial increments would produce 245.\n\n```\nlock(mutex)\nrequests = requests + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "671f2fb872fe20cf012159f7ea66346e14100ab1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 400 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×400×10^6×1 = 12.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 400, "channels": 1, "gbps": 12.8}, "prompt_sha1": "897dac407ca12fa0854d96f6c01a02357a740ac5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m18` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 18 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m18 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd18;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m18", "width": 5, "max": 18}, "prompt_sha1": "402dcb25da773b804c69ae0a56fbd1d6a74d8766", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_16` for a 16-bit unsigned input `data`, `4-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_16 (\n input logic [15:0] data,\n input logic [3:0] shamt,\n output logic [15:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_16", "width": 16, "direction": "left", "arithmetic": false}, "prompt_sha1": "0455f9aa3c9ca2da394279ac3db74159a4b232a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3025580153, carries 34288 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 34288+0+1 = 34289. ACK = (3025580153+34289) mod 2^32 = 3025614442.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3025580153, "payload": 34288, "syn": 0, "fin": 1, "ack": 3025614442}, "prompt_sha1": "885c9658e5f910529a54fc21d389f390f64f4486", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_56_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 56 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_56_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd56;\n end else begin\n if (pulse_in)\n count <= 6'd56;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_56_retrig", "cycles": 56, "retrigger": true}, "prompt_sha1": "319813aa8b7d2c49cddd3c7ecd9cb66742848c7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 1024. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/500 = 50000.\nWith prescaler divisor limited to at most 1024, the largest divisor of 50000 that also keeps the period count within 16 bits is 1000.\nPeriod count = 50000/1000 = 50.\nPSC register = 1000-1 = 999.\nARR register = 50-1 = 49.\nVerification: 25000000/(1000×50) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 500, "total_division": 50000, "max_prescaler": 1024, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1000, "period": 50, "psc_reg": 999, "arr_reg": 49}, "prompt_sha1": "d94c442a6ec573924d3db0583fed70eac35be0d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 43-bit left-shift register module `shiftreg_left_43`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `43-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_43 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [42:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[41:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_43", "width": 43, "direction": "left"}, "prompt_sha1": "bacddcc6b3bd255ae3b5609ed234f6a5db6f4656", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×24²=0.000288 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 24, "energy": 0.000288}, "prompt_sha1": "f1953fef181129a0c6e1bcf0f7dbffc0ba76a2fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 2 MHz, prescaler divisor is 176, and period is 9281 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 2000000/(176×9281) = 1.224398 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 2000000, "prescaler": 176, "period": 9281, "hz": 1.2243978411417265}, "prompt_sha1": "d2008386047a6da79cc783ab0e1561e9531a1cc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m2607` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 2607 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m2607 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd2607;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m2607", "width": 12, "max": 2607}, "prompt_sha1": "70f7912187ed0cb934c12eda855e2a82ccec583f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNNTNNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 0, 1, 0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "04ebec0a1d4e91f989f7c22c1efc2c1467377a29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m32` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 32 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m32 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd32;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m32", "width": 7, "max": 32}, "prompt_sha1": "9d454892db4ed7b4004c25f12d64869ac045bdcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_12_48_16` with RED, GREEN, YELLOW states. Hold RED for 12 clock cycles, GREEN for 48, and YELLOW for 16; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_12_48_16 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 11) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 47) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 15) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_12_48_16", "red": 12, "green": 48, "yellow": 16}, "prompt_sha1": "430ab6d8f072cb9f7b80db27f6cb8497fd5e862a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_306016` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_306016 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_306016"}, "prompt_sha1": "48cc9ef644174d7baaffd037e54aed3655a0b7a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3721` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3721 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3721"}, "prompt_sha1": "4b3bfd23df805b0014af396b746bed36b1811743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock BUF then A; worker_2 acquires A then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds BUF while waiting for A, while worker_2 holds A while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before BUF. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "6b2602ececaa9c94dde3b3dbaf367337d712ece8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=50 ms, C=1 ms,T=5 ms, C=5 ms,T=10 ms, C=4 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/50 + 1/5 + 5/10 + 4/200 = 0.740000 = 74.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 50], [1, 5], [5, 10], [4, 200]], "utilization": 0.74}, "prompt_sha1": "34a4ae9de4983a2326fa1b38ae0ab299f1041d28", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 8` on one shared integer without synchronization. Assume `jobs` initially equals 195. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 195; T2 reads 195; both compute 203; T1 writes 203; T2 writes 203. The observed final value is 203, but two serial increments would produce 211.\n\n```\nlock(mutex)\njobs = jobs + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "796aa5415cc8fa0bd41184d8c3ff7c8446a9ffbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x12_write_bypass` with 16 entries of 12 bits. Inputs: `clk`, `we`, `4-bit waddr`, `12-bit wdata`, `4-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [11:0] wdata,\n input logic [3:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x12_write_bypass", "entries": 16, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "1711c7c986f58c41f85285ec0451153edff84dac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=4700 ohm and C=100000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=4700×100000×10^-12 s = 0.00047 s.\nf_c=1/(2πRC)=1/(2π×4700×100000×10^-12) = 338.6275 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 4700, "c_f": 1e-07, "tau": 0.00047, "fc": 338.62753849339435}, "prompt_sha1": "661f5901bf7d729c0a5bdee36a521d618e0bcf76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 100 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×100/1000/8 = 12500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 100, "bytes": 12500.0}, "prompt_sha1": "6467eb60b96d2df21b53901416ade3108d487bfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 3663 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 3663/10000000 s; frequency = 10000000/3663 = 2730.002730 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 3663, "hz": 2730.00273000273}, "prompt_sha1": "edc1896600e9ea26bbb8bea5672efb2b559c0bdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_84` generating a one-clock-cycle `tick` every 84 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_84 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 83) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_84", "divide": 84}, "prompt_sha1": "e02026219242efc32bc906bfc65e787b1e9af548", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×820)/(22000+820) = 790.534619 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 820, "req": 790.5346187554777}, "prompt_sha1": "c2c26c5ce288d6e7c415c1689f0f43553c28ded1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 75%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.010×(8+0.250×120) = 1.880000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.99, "l2": 8, "l2_hit": 0.75, "mem": 120, "amat": 1.8800000000000003}, "prompt_sha1": "1530009b08bf22233354383457875fcc95f65428", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['P', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["P", "P", "P", "V", "V", "P", "V", "V", "P", "V", "V", "V", "V", "V", "V", "P", "P", "V", "V", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "8ea73a92eec405a3eae81acc848dd1db929b1077", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_719505` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_719505 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_719505"}, "prompt_sha1": "21d45ea90900c9d1801b5375d43ae73c9dc75fba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 3.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+20 = 23.5. Period = 23.5/2000000 = 1.175e-05 s. Maximum rate = 1/period = 85106.382979 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 3.5, "conv_cycles": 20, "period": 1.175e-05, "rate": 85106.38297872341}, "prompt_sha1": "73ae8c549a5452fbccd14972b6a095b4f8751a7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x12_no_bypass` with 8 entries of 12 bits. Inputs: `clk`, `we`, `3-bit waddr`, `12-bit wdata`, `3-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x12_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [11:0] wdata,\n input logic [2:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x12_no_bypass", "entries": 8, "width": 12, "mode": "no_bypass"}, "prompt_sha1": "1fef51a3faf6ed344cd9cfc7c5c6398b5b130ba6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 3263 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 3263/100000 s; frequency = 100000/3263 = 30.646644 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 3263, "hz": 30.646644192460926}, "prompt_sha1": "1800a7c8951ee79784b5256c4550e4f3ef145e3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xF1, clear bit 7 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 7)`. Result = 0x71.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 241, "bit": 7, "op": "clear", "result": 113}, "prompt_sha1": "b6bbb6be61646ad2404af06e9ac74d47a2f1a2db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1060 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "240a87a7bebb0c86f199cf8e7c9d52f63701928f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNTNNTNTTTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], "final_state": 1}, "prompt_sha1": "c748640884adcdeb0a7ad8173d6c1788aa8b0e87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_3_18_17` with RED, GREEN, YELLOW states. Hold RED for 3 clock cycles, GREEN for 18, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_3_18_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 2) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 17) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_3_18_17", "red": 3, "green": 18, "yellow": 17}, "prompt_sha1": "00d2ba8a55e19a1ae655978ab8da6dbcef9b7bcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 9 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 15 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+1 = 12. Total bits = 15×12 = 180. Time = 180/4800 = 0.0375 s = 37.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 9, "parity": 1, "stop": 1, "frames": 15, "seconds": 0.0375}, "prompt_sha1": "30bfb04e2890fa85d426aafa66c75c09ec3431f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_2540` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_2540 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_2540"}, "prompt_sha1": "29862af9ab50669b83cfd0a649ba0e0d209f3f56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×12000)/(10+12000) = 9.991674 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 12000, "req": 9.991673605328891}, "prompt_sha1": "4f232dc5bfe44e5437ab200ead47c0588b46fe59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_24_27_14` with RED, GREEN, YELLOW states. Hold RED for 24 clock cycles, GREEN for 27, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_24_27_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 23) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 26) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_24_27_14", "red": 24, "green": 27, "yellow": 14}, "prompt_sha1": "97c8d0efa9511aedf55b0634548e898ecc9d70ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m87` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 87 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m87 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd87;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m87", "width": 7, "max": 87}, "prompt_sha1": "21b25518413f1f750afeb9232a1d1cbe998a5e4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551371; x = x + 539;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551371+539 = 18446744073709551910. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551910) mod 2^64 = 294. So `x` stores 294. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551371, "add": 539, "result": 294}, "prompt_sha1": "bb27bb393738be733272aa15a620696c44c01ec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w60_signed` comparing two 60-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w60_signed (\n input logic signed [59:0] a,\n input logic signed [59:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w60_signed", "width": 60, "signed": true}, "prompt_sha1": "b2f17924d803a85bbd9b6826fbee93d1721e61a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 125000 Hz satisfies it.", "output": "Nyquist minimum is 2×100000 = 200000 Hz. Proposed rate 125000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100000, "min_fs": 200000, "proposed": 125000.0}, "prompt_sha1": "cf8458e6c8cd368435f61553da04817974077ccb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_36_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 36 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_36_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd36;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_36_ignore", "cycles": 36, "retrigger": false}, "prompt_sha1": "97ff36598041a0de8f77503c0d570a0cbecafbcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 4 MHz, prescaler divisor is 975, and period is 6252 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 4000000/(975×6252) = 0.656200 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 4000000, "prescaler": 975, "period": 6252, "hz": 0.6562002723231131}, "prompt_sha1": "015c25955fb372e490bfbea44a5b46666e25d8ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['V', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["V", "P", "V", "P", "V", "V", "V", "V", "P", "V", "V", "V", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "3ace674ed85a434d8054fb2719f04439b1c4fa9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_26` for a synchronous sampled input `noisy`. Update output `clean` only after observing 26 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_26 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 25) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_26", "stable_samples": 26}, "prompt_sha1": "4e816ed0b86df45122e388f015ba1e129c3f5ade", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2247 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2247/(2247+40+8) = 0.979085 = 97.91%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2247, "iphdr": 40, "eff": 0.9790849673202614}, "prompt_sha1": "ef19fa5f7243c3d54e067c04b7679bceb5943b62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 45-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^45/2^12 = 2^33 = 8589934592 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 45, "page_exp": 12, "entries": 8589934592}, "prompt_sha1": "dc04f5dd919e87184d6310bb58e1573b4fa75d4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_67` generating a one-clock-cycle `tick` every 67 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_67 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 66) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_67", "divide": 67}, "prompt_sha1": "3c9bdeef529d22f87fd1a37b170e0720287d86bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 1000 = 375. Verification: 375/1000 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 37.5, "high": 375}, "prompt_sha1": "0c841aae6c93260616ef466fad7bd1136401474e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 32 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 32000000/(8×4800) = 833.333333.\nNearest integer divisor D = 833.\nActual baud = 32000000/(8×833) = 4801.921 baud.\nError = (4801.921-4800)/4800×100% = 0.0400%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 32000000, "oversample": 8, "baud": 4800, "divisor": 833, "actual": 4801.920768307323, "error_pct": 0.0400160064025575}, "prompt_sha1": "40c3a67d897d4f161545ee68864aa8806ec1f002", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_195` generating a one-clock-cycle `tick` every 195 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_195 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 194) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_195", "divide": 195}, "prompt_sha1": "2c12d375c5bd458834bc17aa24b3ffc50d82d394", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x541618A9. Extract the 5-bit field starting at bit 10 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x541618A9 >> 10) & 0x1F = 0x6 (6).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 10, "value": 1410734249, "mask": 31, "field": 6}, "prompt_sha1": "f9af1b77e0281d1b9508dae6d27662687d875ddf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11110010001000100 using generator polynomial bits 11011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 27, "msg_bits": 17, "msg": 123972, "remainder": 4}, "prompt_sha1": "4e540eceac65a9febd8e37ae59ec15775412051b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact DMA transfer completion time from the byte count alone; bus clock, bus width, arbitration, and transfer mode are unspecified.", "output": "Byte count alone is insufficient for an exact completion time. At minimum the effective transfer rate is required, which depends on clock, bus width, arbitration, burst/handshake behavior, and memory/peripheral timing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "d84a00d422432d8b23388a12e8641d36256c7dc2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 48 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 48000000/(8×4800) = 1250.000000.\nNearest integer divisor D = 1250.\nActual baud = 48000000/(8×1250) = 4800.000 baud.\nError = (4800.000-4800)/4800×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 48000000, "oversample": 8, "baud": 4800, "divisor": 1250, "actual": 4800.0, "error_pct": 0.0}, "prompt_sha1": "bb4e3f753b8822e58519222e1fa3be83fedacce5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'P', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["V", "V", "V", "P", "V", "V", "P", "V", "V", "P", "P", "P", "P", "V", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "b6e146e6b1f038adc507a246c628ed30e91a747a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 39-bit up/down counter `updown_39_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_39_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [38:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_39_wrap", "width": 39, "wrap": true}, "prompt_sha1": "4354bc145b96a4c81aaf29ee0bb1c691b7ea1b07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 10 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×10/1000/8 = 31250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 10, "bytes": 31250000.0}, "prompt_sha1": "ff6631ccf639f8ccccbfb727323c4d94db76f46c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_13` for a 13-bit unsigned input `data`, `4-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_13 (\n input logic [12:0] data,\n input logic [3:0] shamt,\n output logic [12:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_13", "width": 13, "direction": "left", "arithmetic": false}, "prompt_sha1": "e6770021452bbffdee75c990d9f6d3ca17b6b5ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 1 MHz, prescaler divisor is 562, and period is 29809 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 1000000/(562×29809) = 0.059692 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 1000000, "prescaler": 562, "period": 29809, "hz": 0.059692020215538336}, "prompt_sha1": "82c4c3a4d3f96eba1f2460cff91041a6441c174f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.166.153.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.166.153.0\nBroadcast address: 10.166.153.127\nUsable host range: 10.166.153.1 to 10.166.153.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.166.153.0/25", "usable": 126, "first": "10.166.153.1", "last": "10.166.153.126", "broadcast": "10.166.153.127"}, "prompt_sha1": "bcd522e4ca91d36e578d31a3fdceba8968992871", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×4 KiB = 2048 KiB = 2097152 bytes = 2.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 4, "reach": 2097152}, "prompt_sha1": "21f0d4aa68558a8d9fd5f80763bb666ee14c7481", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551496; x = x + 131;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551496+131 = 18446744073709551627. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551627) mod 2^64 = 11. So `x` stores 11. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551496, "add": 131, "result": 11}, "prompt_sha1": "28db6d186be94beb41e54bbee73ca28456525084", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(50×10^6) s = 0.320000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 16, "time_us": 0.32}, "prompt_sha1": "863bd13eb2247b9055cef35874090a22c5bcbef3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 8-way set-associative cache uses 128-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/128 = 512.\nSets = 512/8 = 64.\nOffset bits = log2(128) = 7; index bits = log2(64) = 6; tag bits = 48-7-6 = 35.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 128, "ways": 8, "addr_bits": 48, "lines": 512, "sets": 64, "offset": 7, "index": 6, "tag": 35}, "prompt_sha1": "be68a518d28e6201ed9f8318dd0acc34a7c71ec1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 293 elements. Review loop `for i in range(293+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(293+1)` includes index 293, which is out of range for a length-293 sequence. Correct loop: `for i in range(293):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 293, "variant": "one_past"}, "prompt_sha1": "02531d23a64d27b5b3a613a74f11b2c97b30a2b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact cutoff frequency of an RC low-pass when R=47000 ohm but capacitance is unspecified.", "output": "A numeric cutoff is underdetermined because C is missing. For a first-order RC low-pass, f_c=1/(2πRC). With R=47000 ohm, the capacitance is still required; I would request C rather than assume it.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0ecfc949e4a7996b039e63294e420f5234b38dad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 7 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 7×9 = 63. Time = 63/9600 = 0.0065625 s = 6.562500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 6, "parity": 1, "stop": 1, "frames": 7, "seconds": 0.0065625}, "prompt_sha1": "bb6be4d10b9dd770f2870a159de0b65bf74fc826", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=50 ms, C=1 ms,T=100 ms, C=3 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/50 + 1/100 + 3/50 = 0.130000 = 13.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 50], [1, 100], [3, 50]], "utilization": 0.13}, "prompt_sha1": "51ebb3b3208100ac403154d2052724d0f2302666", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x7A3A5626206F in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 7A 3A 56 26 20 6F.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 134390972031087, "endian": "big", "bytes": [122, 58, 86, 38, 32, 111]}, "prompt_sha1": "60a18a27b878f15761aa9e4bf7173a334318319b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 3259 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×3259/(200×10^6) = 0.16295 = 16.295000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 10000, "cycles": 3259, "load": 0.16295}, "prompt_sha1": "57ef1dbbcfdd10f30da1bd97cbaaa8c8ac5c98aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 1000 = 900. Verification: 900/1000 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 90, "high": 900}, "prompt_sha1": "e97793ac8687e43972028228e16b98b40a7e6102", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 127960265, carries 14996 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 14996+0+1 = 14997. ACK = (127960265+14997) mod 2^32 = 127975262.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 127960265, "payload": 14996, "syn": 0, "fin": 1, "ack": 127975262}, "prompt_sha1": "ebde9b844e11f1fd466d67a2c68395e50eb66c88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 96.9% hit rate, and a 110 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.969 = 0.031.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.031×110 ns = 4.1600 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.969, "penalty": 110, "result": 4.160000000000003}, "prompt_sha1": "9df328c733854a643e774a8e5d77a6bdd34c4fa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 128 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 128 = 32. Verification: 32/128 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 128, "duty": 25, "high": 32}, "prompt_sha1": "ce38c1846d4de086596e4d6852c18886c884ef94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5729 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5729/(5729+40+8) = 0.991691 = 99.17%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5729, "iphdr": 40, "eff": 0.9916911891985459}, "prompt_sha1": "03ddc8c72e19a78a301c9bc02bd895f38fd43767", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_35_25_17` with RED, GREEN, YELLOW states. Hold RED for 35 clock cycles, GREEN for 25, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_35_25_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 34) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 24) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_35_25_17", "red": 35, "green": 25, "yellow": 17}, "prompt_sha1": "4e7b289b4e8d1b1945758162b895643fe96b1407", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "0886bf36a6af30724df1b602b5ca2882a0133dcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 9-bit right-shift register module `shiftreg_right_9`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `9-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_9 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [8:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[8:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_9", "width": 9, "direction": "right"}, "prompt_sha1": "e531cce68e46ade5cb8687a243f67f45c5bb0cf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_1956` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_1956 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_1956"}, "prompt_sha1": "38b9fd0dbad8bfb9eabeeacb2259f6e69491f145", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^24 V = 2.98023223877e-07 V = 0.298023 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 5.0, "step": 2.980232238769531e-07}, "prompt_sha1": "f4d2607fcdf7f285a3bedc40701a67fd9f62020a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 40 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 40-13 = 27.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 40, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 27}, "prompt_sha1": "9eaf49b77de4b9be413b308109adb48a02b51561", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x21, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x21<<1)|0 = 0x42 = 01000010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 33, "rw": 0, "byte": 66}, "prompt_sha1": "92191588db7a9696fd71e65f1456e54a433bd95d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 20% of instructions, the branch misprediction rate is 10%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.100 × 4 = 0.080000.\nEffective CPI = 1.1 + 0.080000 = 1.180000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.2, "mispred": 0.1, "penalty": 4, "result": 1.1800000000000002}, "prompt_sha1": "89607ca411c1e9a264b326a7db02d90afb900f34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 17745 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 17745/1000 s; frequency = 1000/17745 = 0.056354 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 17745, "hz": 0.05635390250774866}, "prompt_sha1": "311ce4c049c37cd8da6df26fd3a79d3808754ae4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_34_19` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 34, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_34_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 33) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_34_19", "red": 23, "green": 34, "yellow": 19}, "prompt_sha1": "620f15482353dc110636e1d76c6fffe06c75ffdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/100 = 0.00022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 100, "tau": 0.00021999999999999998}, "prompt_sha1": "2ef049ea7dee2196c7fd9e24ab120a9f991c0f11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/2200=0.00545454545 A. P=V²/R=12²/2200=0.0654545455 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 2200, "i": 0.005454545454545455, "p": 0.06545454545454546}, "prompt_sha1": "343acb98e5ffcfb04f4ec4fd0526cce052c288fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 19-bit up/down counter `updown_19_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_19_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [18:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 19'd524287) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_19_sat", "width": 19, "wrap": false}, "prompt_sha1": "0d7d39bc605c84792a027b3b6b2414e55333b3e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 6400 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×6400×10^6×8 = 307.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 6400, "channels": 8, "gbps": 307.2}, "prompt_sha1": "92e25e4de800180c98461b98dd2d5cadadbf1941", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100100101100 using generator polynomial bits 1001101. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 101001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 77, "msg_bits": 12, "msg": 2348, "remainder": 41}, "prompt_sha1": "dc769c4411396d6abc6584e4b6aac1b9afcff677", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNTNNTTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 1, 0, 0, 1, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "a9f5316e89b03f6e08ea26851b4d0cf3f8ca89d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [8, 11, 29]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [16, 27, 48].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [8, 11, 29], "finish": [16, 27, 48]}, "prompt_sha1": "05d5168dedd801b3b295a5f489e888cd7a9ba95e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.5 ns hit time, 89.0% hit rate, and a 110 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.890 = 0.110.\nAMAT = hit time + miss rate × miss penalty\n= 3.5 ns + 0.110×110 ns = 15.6000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.5, "hit_rate": 0.89, "penalty": 110, "result": 15.599999999999998}, "prompt_sha1": "b20aa7bb02ab87b2c29d6465e5df52c6a79a3cf0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w4_cin` implementing a 4-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `4-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w4_cin (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic cin,\n output logic [3:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w4_cin", "width": 4, "cin": true}, "prompt_sha1": "ad26960b0f98e0b46c5e98a5654f91d39f47aa0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 50 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 50×10^6 / (512×8) = 12207.031250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "frame_bytes": 512, "pps": 12207.03125}, "prompt_sha1": "d4bba3db2c4a1573946248322ec6d2679a064f91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_947566` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_947566 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_947566"}, "prompt_sha1": "52f1fdd5a4f0f6d0604167ff05a9e9330f137038", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×40/1000/8 = 500000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 40, "bytes": 500000000.0}, "prompt_sha1": "d868eb4bb458a548bde86d6ed24a9aeab8507248", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [9, 1, 1, 21, 18]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [21, 6, 7, 50, 49].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [9, 1, 1, 21, 18], "finish": [21, 6, 7, 50, 49]}, "prompt_sha1": "1d57f0d0ff158d1faf7445f255aa871d7c74bb1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 3.6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.6/2^13 V = 0.000439453125 V = 439.453125 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 3.6, "step": 0.000439453125}, "prompt_sha1": "6be64ce1a917beb510e786497d6c8f21f3b6d4cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x17, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x17<<1)|1 = 0x2F = 00101111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 23, "rw": 1, "byte": 47}, "prompt_sha1": "16a5bc3844f4b9a520099720ae5dd642c83700eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_2629` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_2629 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_2629", "width": 24}, "prompt_sha1": "dedb9f6cd217b428445f687c15055fe5dbcb7b0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×256 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 256, "reach": 134217728}, "prompt_sha1": "69c26b04aa0295facb6144b3400bdde9da99c137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [8, 25, 11]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [18, 44, 34].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [8, 25, 11], "finish": [18, 44, 34]}, "prompt_sha1": "7c441281aa3bb219c3039ebc594a4a040f81636e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 001011110001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001011110001", "ones": 6, "parity": 0}, "prompt_sha1": "26adade92ff072cc771c3b7004211ea16a8c4b9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 247.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+10 = 257.5. Period = 257.5/2000000 = 0.00012875 s. Maximum rate = 1/period = 7766.990291 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 247.5, "conv_cycles": 10, "period": 0.00012875, "rate": 7766.9902912621355}, "prompt_sha1": "55be6dd3c5207ee76017dd327d4f8666502dc4a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.226.185.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.226.185.0\nBroadcast address: 10.226.185.255\nUsable host range: 10.226.185.1 to 10.226.185.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.226.185.0/24", "usable": 254, "first": "10.226.185.1", "last": "10.226.185.254", "broadcast": "10.226.185.255"}, "prompt_sha1": "5014f72874a1ad5fa211453efcdc2ad2da74b7f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 8 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 8 = 11.\nClock pulses = 11×9 = 99.\nTime = 99/100000 s = 990.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 8, "clocks": 99, "time_s": 0.00099}, "prompt_sha1": "d8807c737708e8c30497063d1f0205c76a6efb5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1422805860, carries 18742 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 18742+1+0 = 18743. ACK = (1422805860+18743) mod 2^32 = 1422824603.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1422805860, "payload": 18742, "syn": 1, "fin": 0, "ack": 1422824603}, "prompt_sha1": "b575c7c139ffc433fd622a3905ad17705451f538", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×300/1000/8 = 937500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 300, "bytes": 937500000.0}, "prompt_sha1": "1a73fa7c1134b8a93ab6f40fe7594a577c5fcd7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_26` for a 26-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_26 (\n input logic [25:0] data,\n input logic [4:0] shamt,\n output logic [25:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_26", "width": 26, "direction": "left", "arithmetic": false}, "prompt_sha1": "640759b1881a95e1fb8ab4a8c6b580d9fe379157", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 73 and initial occupancy is 63. In an abstract batch, producer attempts to enqueue 158 items first, dropping any excess beyond capacity; then consumer removes up to 176 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=73, dropped=148; consumed=73; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 73, "start": 63, "prod": 158, "cons": 176, "dropped": 148, "consumed": 73, "final": 0}, "prompt_sha1": "f6616b5a1abd8c6c054118946777d1e25799aab7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 2 MHz, prescaler divisor is 615, and period is 8159 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 2000000/(615×8159) = 0.398582 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 2000000, "prescaler": 615, "period": 8159, "hz": 0.3985822429617849}, "prompt_sha1": "207027bd452a7c923653431baac1211101d5e201", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_120` for a synchronous sampled input `noisy`. Update output `clean` only after observing 120 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_120 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 119) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_120", "stable_samples": 120}, "prompt_sha1": "3e3d51b2392eaffb473567070922b3c857ff6b41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `count` elements of type `int`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n total += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `a[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n total += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "d4c3ed2b90d8579b71d31b9baca0f015198cb5d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock TX then B; consumer acquires B then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds TX while waiting for B, while consumer holds B while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "ab9f9ee340182c6e3980d1ac44de5486a5ca3460", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w59_cin` implementing a 59-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `59-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w59_cin (\n input logic [58:0] a,\n input logic [58:0] b,\n input logic cin,\n output logic [58:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w59_cin", "width": 59, "cin": true}, "prompt_sha1": "167126551fbf8e1495a09c191a183da1f74ee28d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 409 elements. Review loop `for i in range(409+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(409+1)` includes index 409, which is out of range for a length-409 sequence. Correct loop: `for i in range(409):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 409, "variant": "one_past"}, "prompt_sha1": "01d09921808e7fc92b913a26ca39535d83f40e1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 44000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 44000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 44000.0}, "prompt_sha1": "b687442586dc25bbfc8953a5e6b5c3429d259ed3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_481976` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_481976 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_481976"}, "prompt_sha1": "54b3201647b9cb4672f70f2f2a6685c339a57f23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 60 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 60 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 60}, "prompt_sha1": "bc38f63ee2f998d7c555d7f1e7ac0e6c49274cfb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 95% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.95 × 80 = 76. Verification: 76/80 = 0.95, which is 95%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 95, "high": 76}, "prompt_sha1": "35def5fc6b509e6f053b4af1645dee04fddd1d71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 3 and tail index 47, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (3-47) mod 64 = 20. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 3, "tail": 47, "occupancy": 20}, "prompt_sha1": "1beb689bbe40463c6405bc1c626271d4004ccdd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 110 elements. Review loop `for i in range(110+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(110+1)` includes index 110, which is out of range for a length-110 sequence. Correct loop: `for i in range(110):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 110, "variant": "one_past"}, "prompt_sha1": "e198ff790da7adc75cf14e62b9b8b6f88c9b57ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_14_44_3` with RED, GREEN, YELLOW states. Hold RED for 14 clock cycles, GREEN for 44, and YELLOW for 3; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_14_44_3 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 13) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 43) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 2) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_14_44_3", "red": 14, "green": 44, "yellow": 3}, "prompt_sha1": "7d2c7e1f7dff35ab2841c1f43dbd6322e3ce81d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w14_unsigned` comparing two 14-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w14_unsigned (\n input logic [13:0] a,\n input logic [13:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w14_unsigned", "width": 14, "signed": false}, "prompt_sha1": "77ac20d3c97da92131743c7cee68a98400b314a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2358` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2358 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2358"}, "prompt_sha1": "a2fba9c194148358634c7f11a220de39ba84c264", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m112` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 112 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m112 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd112;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m112", "width": 7, "max": 112}, "prompt_sha1": "fed1d6eeb5258465902ebc378bb2382f2219f7c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_59` generating a one-clock-cycle `tick` every 59 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_59 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 58) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_59", "divide": 59}, "prompt_sha1": "45e193b374a2aaaeed5ef7291e842e30131d921d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 2000 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 2000/(2000+20) = 0.990099 = 99.01%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 2000, "overhead": 20, "efficiency": 0.9900990099009901}, "prompt_sha1": "e47b7f3a61c90015c2f0286f0d13b0c9d4cbf91d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w14_m15632` with clk, asynchronous active-low rst_n, active-high enable, and output logic [13:0] count. On reset count=0. When enabled it increments until 15632 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w14_m15632 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [13:0] count\n);\n localparam logic [13:0] LIMIT = 14'd15632;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w14_m15632", "width": 14, "max": 15632}, "prompt_sha1": "91593a3be738f0b1d0bbe47cbf54c37b5e34fee3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 100100000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "100100000", "ones": 2, "parity": 0}, "prompt_sha1": "34ee6ff74cff081983091690e1f316920930d3fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/10=0.5 A. P=V²/R=5²/10=2.5 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 10, "i": 0.5, "p": 2.5}, "prompt_sha1": "af82bce96705038d8409c81a2035798682ec1b57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 48 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 48 = 51.\nClock pulses = 51×9 = 459.\nTime = 459/100000 s = 4590.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 48, "clocks": 459, "time_s": 0.00459}, "prompt_sha1": "f42a836fe7444267612f4dac84f77a5f11313b26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xFBCCB9A1, clear bit 0 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 0)`. Result = 0xFBCCB9A0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 4224498081, "bit": 0, "op": "clear", "result": 4224498080}, "prompt_sha1": "ca7bbec172050b1096ab68f309fa772ba00d1b3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=22 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/100 = -0.220000.\nVout = A_v×Vin = -0.220000×0.25 = -0.055000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 22, "vin": 0.25, "gain": -0.22, "vout": -0.055}, "prompt_sha1": "935997f5b40e66d8fa8cc5a145aac66683b8b43d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_969571` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_969571 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_969571"}, "prompt_sha1": "d1c0b8e1ebd4c07958f0a80e50e2dc4fbac503b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_19_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 19 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_19_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd19;\n end else begin\n if (pulse_in)\n count <= 5'd19;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_19_retrig", "cycles": 19, "retrigger": true}, "prompt_sha1": "475dbd9cd72c8cbe30ff626472976941768fd2c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×2.5²=0.003125 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 2.5, "energy": 0.003125}, "prompt_sha1": "c4503ee2243dd0331fe43ee8c045760da796acb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_5775` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_5775 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_5775", "width": 8}, "prompt_sha1": "c08ae6dc0f4e39cd98726733a9dd6f7b3f964bd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 52 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 52 = 54.\nClock pulses = 54×9 = 486.\nTime = 486/100000 s = 4860.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 52, "clocks": 486, "time_s": 0.00486}, "prompt_sha1": "53e1adec449aee6c4392903c8083630e19567591", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 4` on one shared integer without synchronization. Assume `credits` initially equals 8. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 8; T2 reads 8; both compute 12; T1 writes 12; T2 writes 12. The observed final value is 12, but two serial increments would produce 16.\n\n```\nlock(mutex)\ncredits = credits + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "02062dd33fb99d6557165945cf6ca87c9170f1f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w32_3531` implementing a dual-clock asynchronous FIFO with depth 64 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w32_3531 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 32,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w32_3531", "depth": 64, "width": 32, "ptr_w": 6}, "prompt_sha1": "335ecab8202c9ddac0c706206cf2799446bbec45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 38 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 38 = 40.\nClock pulses = 40×9 = 360.\nTime = 360/400000 s = 900.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 38, "clocks": 360, "time_s": 0.0009}, "prompt_sha1": "5d5f1fb504517cb7eaa20bfe5baca2dd53648775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [1, 11, 15, 5]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 25, 32, 22].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [1, 11, 15, 5], "finish": [1, 25, 32, 22]}, "prompt_sha1": "99ddd93d20a715fc23492d9e89bc7e2f18bad88a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/220 = 0.00213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 220, "tau": 0.0021363636363636363}, "prompt_sha1": "b97b0f99f52130c0b4c5fcae95e0ed8da3d0ad1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `entries` elements of type `float`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `buf[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b96ac3c71e9b9ee637ea830f467b88a8d91bf4dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 27-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^27/2^18 = 2^9 = 512 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 27, "page_exp": 18, "entries": 512}, "prompt_sha1": "fd7a7ec902f2ef824bf6a5b713c6d39bff6e5178", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xE0, toggle bit 2 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 2)`. Result = 0xE4.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 224, "bit": 2, "op": "toggle", "result": 228}, "prompt_sha1": "7d1027e46c4a528be51ecd84dcc12629e8b7bb8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 19 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 19 = 22.\nClock pulses = 22×9 = 198.\nTime = 198/1000000 s = 198.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 19, "clocks": 198, "time_s": 0.000198}, "prompt_sha1": "63a24bba4e9957134e0b78380d8652b304b079d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^23 V = 2.14576721191e-07 V = 0.214577 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 1.8, "step": 2.1457672119140626e-07}, "prompt_sha1": "6e860360e14d82d06cb098e5281ce061632aa9e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 19.6 V source drives a 270 ohm resistor in series with an LED whose forward voltage is assumed to be 1.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 19.6-1.9 = 17.7 V.\nI = V/R = 17.7/270 A = 65.5556 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 19.6, "vf": 1.9, "r": 270, "current_a": 0.06555555555555556}, "prompt_sha1": "65d9e009802e8ad2d5dae9f327cbb7d4c77c306c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 125 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/125 = 672000.\nWith prescaler divisor limited to at most 64, the largest divisor of 672000 that also keeps the period count within 16 bits is 64.\nPeriod count = 672000/64 = 10500.\nPSC register = 64-1 = 63.\nARR register = 10500-1 = 10499.\nVerification: 84000000/(64×10500) = 125 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 125, "total_division": 672000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 10500, "psc_reg": 63, "arr_reg": 10499}, "prompt_sha1": "d944f2328d2d5f0386e3c87e3305dea6db5a4715", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 20 and initial occupancy is 7. In an abstract batch, producer attempts to enqueue 15 items first, dropping any excess beyond capacity; then consumer removes up to 51 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=20, dropped=2; consumed=20; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 20, "start": 7, "prod": 15, "cons": 51, "dropped": 2, "consumed": 20, "final": 0}, "prompt_sha1": "6b0f6717a59888258beb9404377fa986f1a75b5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['V', 'P', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["V", "P", "V", "V", "P", "P", "P", "P", "P", "P", "V", "V", "P", "V", "P"], "value": 1, "blocked": 0}, "prompt_sha1": "c271c1b8b6e3dbd016d6fa8691ca26f3eed088d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×150/1000/8 = 18750.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 150, "bytes": 18750.0}, "prompt_sha1": "b7fc12ca0f1bda1cea0e5fe50ea712a59e0f6907", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3046(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3046(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3046([1, 2]) == 1.5\nassert mean_3046([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3046"}, "prompt_sha1": "c58f711ff2e18dc9ebd14e7d7c5d459e7b8daad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0110100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0110100", "ones": 3, "parity": 1}, "prompt_sha1": "d904587586abcd4efc4e69f0d64ab4bdf542ce58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [25, 18, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [63, 53, 58].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [25, 18, 20], "finish": [63, 53, 58]}, "prompt_sha1": "8ac93804203d3bb830e705322aa7a0042c617775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w52_signed` comparing two 52-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w52_signed (\n input logic signed [51:0] a,\n input logic signed [51:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w52_signed", "width": 52, "signed": true}, "prompt_sha1": "dde092c31ed38f2ae69ad36dc9ae80e484fe9e9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 000110100111100100000000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "000110100111100100000000", "ones": 8, "parity": 0}, "prompt_sha1": "12125e308e6301d3e4d9ade2477073f74fff9b23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50000 Mbit/s and RTT 50 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50000×10^6 × 50/1000 = 2.5e+09 bits = 3.125e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50000, "rtt_ms": 50, "bits": 2500000000.0, "bytes": 312500000.0}, "prompt_sha1": "d64bf2241c21956e2eb102bdd87975ff2b3b02e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=200 ms, C=1 ms,T=5 ms, C=1 ms,T=5 ms, C=3 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/200 + 1/5 + 1/5 + 3/100 = 0.440000 = 44.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 200], [1, 5], [1, 5], [3, 100]], "utilization": 0.44}, "prompt_sha1": "c6ea981ee330107f39fd16f28000e4bc9645df35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1000 Mbit/s and RTT 40 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1000×10^6 × 40/1000 = 4e+07 bits = 5e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1000, "rtt_ms": 40, "bits": 40000000.0, "bytes": 5000000.0}, "prompt_sha1": "05e817cbb03fdca186b0300280f6ac93ad0437cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 1.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.5/2^19 V = 2.86102294922e-06 V = 2.861023 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 1.5, "step": 2.86102294921875e-06}, "prompt_sha1": "9c97af919a045cba92b391a20bcb40044156e4a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 8` on one shared integer without synchronization. Assume `jobs` initially equals 84. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 84; T2 reads 84; both compute 92; T1 writes 92; T2 writes 92. The observed final value is 92, but two serial increments would produce 100.\n\n```\nlock(mutex)\njobs = jobs + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "c70b50b6d5cea470e63ea04f1470d8edff081bc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551604; x = x + 25;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551604+25 = 18446744073709551629. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551629) mod 2^64 = 13. So `x` stores 13. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551604, "add": 25, "result": 13}, "prompt_sha1": "fda324f431ec761fd6ed2131f74e9f3f5aabefff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_70` for a synchronous sampled input `noisy`. Update output `clean` only after observing 70 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_70 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 69) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_70", "stable_samples": 70}, "prompt_sha1": "34eab5097036dda69edea01f29a83f10a7173c18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 91.8% hit rate, and a 70 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.918 = 0.082.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.082×70 ns = 10.2400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.918, "penalty": 70, "result": 10.239999999999998}, "prompt_sha1": "756bd91ec11a4bf689e16c6052d2d316789e21a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 50 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 50×10^6×20/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "rtt_ms": 20, "bytes": 125000.0}, "prompt_sha1": "afea141fe606daea0e7a581c35a140e99df90bb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 115200 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "70704964028d9a0a69cc003aef2adc734b902398", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 46863. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 46863/65535 × 5 V = 3.575418 V.\nThus the estimated input is about 3.5754 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 46863, "volts": 3.5754177157244222}, "prompt_sha1": "596b586228f349169e16ec434bb03ea4c52b579c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×4 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 4, "reach": 4194304}, "prompt_sha1": "52a8054d284bd99c1b4908d4bcad5580e4ea2088", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 12 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 12000000/1000 = 12000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 12000 that also keeps the period count within 16 bits is 12000.\nPeriod count = 12000/12000 = 1.\nPSC register = 12000-1 = 11999.\nARR register = 1-1 = 0.\nVerification: 12000000/(12000×1) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 12000000, "target_hz": 1000, "total_division": 12000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 12000, "period": 1, "psc_reg": 11999, "arr_reg": 0}, "prompt_sha1": "8330d0e3c9d7b1966b66676a90c3c4b14248a8fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_11_msb` for `11-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_11_msb (\n input logic [10:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 11; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_11_msb", "width": 11, "priority": "high"}, "prompt_sha1": "45c00c147bfb82fe24f2d93436f3ef95c225053a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1114 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1114/(1114+40+8) = 0.958692 = 95.87%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1114, "iphdr": 40, "eff": 0.9586919104991394}, "prompt_sha1": "d84c12a1ac63c4ae9cf74fc03d01d27ed13837c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 8-way set-associative cache uses 64-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/64 = 16384.\nSets = 16384/8 = 2048.\nOffset bits = log2(64) = 6; index bits = log2(2048) = 11; tag bits = 36-6-11 = 19.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 64, "ways": 8, "addr_bits": 36, "lines": 16384, "sets": 2048, "offset": 6, "index": 11, "tag": 19}, "prompt_sha1": "ef50fa974d3c5c4610822565d83374266a7e94dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11100010100001 using generator polynomial bits 1101011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 101010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 107, "msg_bits": 14, "msg": 14497, "remainder": 42}, "prompt_sha1": "f730824a8a40b4a4f7cacea15a73df1a6d32e7c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/2.2 = 4.54545455e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 2.2, "tau": 4.545454545454545e-05}, "prompt_sha1": "1b783422b50d31589048755ac4e64ef4dd308e32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 40 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 40/1000 = 8e+07 bits = 1e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 40, "bits": 80000000.0, "bytes": 10000000.0}, "prompt_sha1": "02d8fa0e1f42d8c5573e951d30537882da34d05f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/2200=0.000454545455 A. P=V²/R=1²/2200=0.000454545455 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 2200, "i": 0.00045454545454545455, "p": 0.00045454545454545455}, "prompt_sha1": "df6f39e719aeebbe1a361591c81d45ebd825c3a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^10 V = 0.005859375 V = 5859.375000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 6.0, "step": 0.005859375}, "prompt_sha1": "5a1b8842db936d10d5ca7c3d2681d8a9588db6fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 8-way set-associative cache uses 64-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/64 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(64) = 6; index bits = log2(1024) = 10; tag bits = 36-6-10 = 20.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 64, "ways": 8, "addr_bits": 36, "lines": 8192, "sets": 1024, "offset": 6, "index": 10, "tag": 20}, "prompt_sha1": "2ca5c2c0b2e4ed6539bbdd355b03ea80c8a94d0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (768×8) = 406901.041667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 768, "pps": 406901.0416666667}, "prompt_sha1": "4c5e7ef635777d45bfa332159f55604e4e9edbeb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1×10^6 / (512×8) = 244.140625 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "frame_bytes": 512, "pps": 244.140625}, "prompt_sha1": "7c3f9f54e9d160a7e2304c41e5ac42634b0ec2ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_7_38_9` with RED, GREEN, YELLOW states. Hold RED for 7 clock cycles, GREEN for 38, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_7_38_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 6) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_7_38_9", "red": 7, "green": 38, "yellow": 9}, "prompt_sha1": "302e1842a9ff309ee6a0d19548571c5eb9cf3e67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_42` generating a one-clock-cycle `tick` every 42 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_42 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 41) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_42", "divide": 42}, "prompt_sha1": "9cc3bea74cab52682ef85db57d8fdd3b594819dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 128 payload bytes plus 52 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 128/(128+52) = 0.711111 = 71.11%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 128, "overhead": 52, "efficiency": 0.7111111111111111}, "prompt_sha1": "8a5248aed6bd687bc1a240b772c99db047ec9e13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 100 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 76800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 100000000/(8×76800) = 162.760417.\nNearest integer divisor D = 163.\nActual baud = 100000000/(8×163) = 76687.117 baud.\nError = (76687.117-76800)/76800×100% = -0.1470%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 100000000, "oversample": 8, "baud": 76800, "divisor": 163, "actual": 76687.11656441719, "error_pct": -0.14698364008179018}, "prompt_sha1": "8db537a067eec6613eccd8e38129baa8bf466e4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 38, and period is 10149 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(38×10149) = 62.230658 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 38, "period": 10149, "hz": 62.230657933631}, "prompt_sha1": "66a478930762a025837a6c087ed4cf66a28506c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w15_signed` comparing two 15-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w15_signed (\n input logic signed [14:0] a,\n input logic signed [14:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w15_signed", "width": 15, "signed": true}, "prompt_sha1": "14438cdef2c367a956c9f0d1f648d5d0e7e27215", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 2812 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×2812/(16×10^6) = 0.3515 = 35.150000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 2000, "cycles": 2812, "load": 0.3515}, "prompt_sha1": "ddb1c9921db127b7bfc066921a3d40831e427a3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10×10^6 × 150/1000 = 1.5e+06 bits = 187500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10, "rtt_ms": 150, "bits": 1500000.0, "bytes": 187500.0}, "prompt_sha1": "a931263887fcb9ff20ca15e70899de1c57f8ee96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-28 = 1472 bytes.\nRound down to an 8-byte multiple: floor((1472)/8)×8 = 1472 bytes.\nFragments required = ceil(4000/1472) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 28, "payload": 4000, "max_payload": 1472, "fragments": 3}, "prompt_sha1": "44c84ce80fa8946d1319f4736331f82328670439", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 600 counts per period. What compare/high-time count produces exactly 87.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.875 × 600 = 525. Verification: 525/600 = 0.875, which is 87.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 600, "duty": 87.5, "high": 525}, "prompt_sha1": "753b24888d9a47b54eb28be4981b872fee3f69e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1400 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-40-28 = 1332 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 40, "tcphdr": 28, "mss": 1332}, "prompt_sha1": "e0e2fd4d3fdbb7fcbf4de60fdc4df0a0b28d7316", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3000` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3000 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3000"}, "prompt_sha1": "12c3301c157b196ac7480162b689f630fd2cec3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 52-bit right-shift register module `shiftreg_right_52`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `52-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_52 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [51:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[51:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_52", "width": 52, "direction": "right"}, "prompt_sha1": "a981cb2df7e37af9bbba143487c08e3ce09ac9bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock L2 then CACHE; worker_2 acquires CACHE then L2. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds L2 while waiting for CACHE, while worker_2 holds CACHE while waiting for L2; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "76b91c2ff97053cda2f5b90a414b0b7785a42d7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m46` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 46 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m46 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd46;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m46", "width": 7, "max": 46}, "prompt_sha1": "6d942328e21311d09addfbfca753dce49915cbc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-24 = 3936 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 24, "mss": 3936}, "prompt_sha1": "da25268e5c5ff214ce1634402422526ef559253f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_29_lsb` for `29-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_29_lsb (\n input logic [28:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 28; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_29_lsb", "width": 29, "priority": "low"}, "prompt_sha1": "7124151c103a2c54c25aec54d70f9256977a4292", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 2.5 V reference and returns code 13688. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 13688/65535 × 2.5 V = 0.522164 V.\nThus the estimated input is about 0.5222 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 2.5, "code": 13688, "volts": 0.5221637293049516}, "prompt_sha1": "87fd8ad68062984512afdfe69c9e7e1ace05043e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_14_lsb` for `14-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_14_lsb (\n input logic [13:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 13; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_14_lsb", "width": 14, "priority": "low"}, "prompt_sha1": "c06649f5aa60ca41f404ec49f7d8ff8614f4b8a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 471. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 471; T2 reads 471; both compute 472; T1 writes 472; T2 writes 472. The observed final value is 472, but two serial increments would produce 473.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "6e443c56d203ac3107586c7fb1b6b1a6697b0c04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.202.52.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.202.52.0\nBroadcast address: 10.202.52.3\nUsable host range: 10.202.52.1 to 10.202.52.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.202.52.0/30", "usable": 2, "first": "10.202.52.1", "last": "10.202.52.2", "broadcast": "10.202.52.3"}, "prompt_sha1": "44e4646e217e07e1c439d22b0a66445edbd4243f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(50×10^6) s = 0.480000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 24, "time_us": 0.48}, "prompt_sha1": "b0303003499a97ddb69c44580e68b13069aef07b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=120000 ohm and C=2700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=120000×2700×10^-12 s = 0.000324 s.\nf_c=1/(2πRC)=1/(2π×120000×2700×10^-12) = 491.2190 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 120000, "c_f": 2.6999999999999998e-09, "tau": 0.00032399999999999996, "fc": 491.21896016017087}, "prompt_sha1": "527509cc9e3f7b841c83296dc8062cfe32addaab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7908-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7908×8 = 63264 bits.\nSerialization delay = bits/rate = 63264/(10×10^6) s = 0.0063264 s = 6326.400000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7908, "rate_mbps": 10, "delay_s": 0.0063264}, "prompt_sha1": "d732d9e65c3158d99116d02ed944b4cc22a8c536", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `count` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `samples[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "70a481a59a7093a481ff1e443639938ce78e1fe6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 64 bytes over a datapath transferring 8 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×80×10^6 = 640000000 B/s. Time = 64/640000000 = 1e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 64, "width": 8, "rate_mhz": 80, "sec": 1e-07}, "prompt_sha1": "39672a7d6cbb624602b752f479a7f68dae864c45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=4.7 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×100/(4.7+100) = 4.775549 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 4.7, "r2": 100, "vout": 4.775549188156638}, "prompt_sha1": "d4b64a303c2bef169c56951ff5d6fe77debeb5cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×100²=0.0235 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 100, "energy": 0.0235}, "prompt_sha1": "a2673eaa829ed2a6be25e3a6684be465cb9354b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.5 V source drives a 1200 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.5-3 = 0.5 V.\nI = V/R = 0.5/1200 A = 0.4167 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.5, "vf": 3.0, "r": 1200, "current_a": 0.0004166666666666667}, "prompt_sha1": "5c9c5715554fe1a8bcb34e81df0722c9dcfb25a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 37-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^37/2^16 = 2^21 = 2097152 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 37, "page_exp": 16, "entries": 2097152}, "prompt_sha1": "0a46c3771f6009a0d78da92cf528eb7c65926472", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7173(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7173(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7173([1, 2]) == 1.5\nassert mean_7173([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7173"}, "prompt_sha1": "f4e83294ec38e8b4f0fa25315ffa0e3c774ed588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x4773 in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 73 47.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 18291, "endian": "little", "bytes": [115, 71]}, "prompt_sha1": "61eee04e4f4ca3efc04a77cfaf13c634e2da321c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5179(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5179(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5179([1, 2]) == 1.5\nassert mean_5179([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5179"}, "prompt_sha1": "7c04d26bce07a386a53218e35156e90508208759", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 563 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "203216a7f35590b212863790943bc3805c60d65d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×32 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 32, "reach": 67108864}, "prompt_sha1": "054ccee5185fba35fff330af2f5eaf842b4b82e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10001100000101 using generator polynomial bits 1111011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 010110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 123, "msg_bits": 14, "msg": 8965, "remainder": 22}, "prompt_sha1": "f8e7d26b9902eeab23f692579ebaba8eef528b7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 207 elements. Review loop `for i in range(207+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(207+1)` includes index 207, which is out of range for a length-207 sequence. Correct loop: `for i in range(207):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 207, "variant": "one_past"}, "prompt_sha1": "5d4a709de0c489458a604d09eed737b36c2bee8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 16-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/32 = 256.\nSets = 256/16 = 16.\nOffset bits = log2(32) = 5; index bits = log2(16) = 4; tag bits = 57-5-4 = 48.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 32, "ways": 16, "addr_bits": 57, "lines": 256, "sets": 16, "offset": 5, "index": 4, "tag": 48}, "prompt_sha1": "8a370fad4adddb780525ca7d954ffb87bac31224", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100000011010100000001001 using generator polynomial bits 10011001. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0010000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 153, "msg_bits": 24, "msg": 8497161, "remainder": 16}, "prompt_sha1": "e6fe690450f2598bf5e2f6d739c3b017276cc5c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 4 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×4×10^6 = 16000000 B/s. Time = 8192/16000000 = 0.000512 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 4, "rate_mhz": 4, "sec": 0.000512}, "prompt_sha1": "f4c64fa7ee54452fad379a0e386cf7b8c9f7cf46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=4.7 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×1/(4.7+1) = 4.210526 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 4.7, "r2": 1, "vout": 4.2105263157894735}, "prompt_sha1": "f07e775b1651c0302989ac194c9cb04bbdef9125", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 16-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/16 = 65536.\nSets = 65536/4 = 16384.\nOffset bits = log2(16) = 4; index bits = log2(16384) = 14; tag bits = 52-4-14 = 34.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 16, "ways": 4, "addr_bits": 52, "lines": 65536, "sets": 16384, "offset": 4, "index": 14, "tag": 34}, "prompt_sha1": "dbf678a3cd576ce28b226c0ff3503c9eecd571b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3937123783, carries 665 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 665+1+0 = 666. ACK = (3937123783+666) mod 2^32 = 3937124449.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3937123783, "payload": 665, "syn": 1, "fin": 0, "ack": 3937124449}, "prompt_sha1": "ff329acaa7276db374dc6ae9ad64c0ec75fb4df5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/47 = 4.68085106e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 47, "tau": 4.680851063829788e-05}, "prompt_sha1": "3db098c32eb8d2faa8d82b2c5e523183fb8aabdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967208; x = x + 473;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967208+473 = 4294967681. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967681) mod 2^32 = 385. So `x` stores 385. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967208, "add": 473, "result": 385}, "prompt_sha1": "83ba42dc641208e6bb7e3b3cf7cb20b2bb31e4d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_50_19` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 50, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_50_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 49) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_50_19", "red": 28, "green": 50, "yellow": 19}, "prompt_sha1": "22eacaaa508496bad855818da2e95dd5e735cc2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 2` on one shared integer without synchronization. Assume `credits` initially equals 89. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 89; T2 reads 89; both compute 91; T1 writes 91; T2 writes 91. The observed final value is 91, but two serial increments would produce 93.\n\n```\nlock(mutex)\ncredits = credits + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "38ad2a6141b84c276f19762bf717996142ab4191", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 20 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 20000000/1000 = 20000.\nWith prescaler divisor limited to at most 256, the largest divisor of 20000 that also keeps the period count within 16 bits is 250.\nPeriod count = 20000/250 = 80.\nPSC register = 250-1 = 249.\nARR register = 80-1 = 79.\nVerification: 20000000/(250×80) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 20000000, "target_hz": 1000, "total_division": 20000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 80, "psc_reg": 249, "arr_reg": 79}, "prompt_sha1": "2182fe176c73c49407a969a872852acbaac3da7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 2700 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×2700)/(2200+2700) = 1212.244898 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 2700, "req": 1212.2448979591836}, "prompt_sha1": "4fc82536e7a65bafdd864efc61894a16cf8cd645", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 4 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×4/(2.4×10^9) = 0.00166666667 s = 1.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 4.0, "ghz": 2.4, "sec": 0.0016666666666666668}, "prompt_sha1": "81c5145d6efd35c8a41677dc303a4df5431fbdbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w43_unsigned` comparing two 43-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w43_unsigned (\n input logic [42:0] a,\n input logic [42:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w43_unsigned", "width": 43, "signed": false}, "prompt_sha1": "253219817aba5431e36d38d519b0f9beab13c067", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_5584` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_5584 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_5584"}, "prompt_sha1": "c64f05e7554b6b22fb4a6646ee9455d97af184f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_65` for a synchronous sampled input `noisy`. Update output `clean` only after observing 65 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_65 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 64) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_65", "stable_samples": 65}, "prompt_sha1": "beba8429c677b8c5c79cf46168453f94687a73e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.79. Using Amdahl's law, compute the theoretical speedup on 4 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.79) + 0.79/4) = 2.453988.\nThe theoretical speedup is about 2.454×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.79, "n": 4, "result": 2.4539877300613497}, "prompt_sha1": "7c21609776539a7a739da5c15c6b3656ff20f62d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [20, 9, 28, 21, 30, 10]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [84, 39, 113, 105, 118, 59].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [20, 9, 28, 21, 30, 10], "finish": [84, 39, 113, 105, 118, 59]}, "prompt_sha1": "4a2e261dea06ad083b7b0e0ff266dcff1b01070f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_8991` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_8991 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_8991"}, "prompt_sha1": "c71b9078d409f8dfd1f2f5eebb8fe264dde814e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x40_write_bypass` with 32 entries of 40 bits. Inputs: `clk`, `we`, `5-bit waddr`, `40-bit wdata`, `5-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [39:0] wdata,\n input logic [4:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x40_write_bypass", "entries": 32, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "e797193621376e8b2e8f2b2a0aea4e9f9f1cf866", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_56` for a 56-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_56 (\n input logic signed [55:0] data,\n input logic [5:0] shamt,\n output logic signed [55:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_56", "width": 56, "direction": "right", "arithmetic": true}, "prompt_sha1": "6be16101f5a0e6c2c474bebd6db6d875f53abb3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 32 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 32000000/(16×4800) = 416.666667.\nNearest integer divisor D = 417.\nActual baud = 32000000/(16×417) = 4796.163 baud.\nError = (4796.163-4800)/4800×100% = -0.0799%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 32000000, "oversample": 16, "baud": 4800, "divisor": 417, "actual": 4796.163069544365, "error_pct": -0.07993605115907106}, "prompt_sha1": "aa7912ba16914a6aff34fec88b36db7d3f04f53e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['V', 'V', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["V", "V", "V", "P", "P", "P", "V", "V", "P", "V", "V", "P", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "fad44f75e90027110530f69d5021526513aec3a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 32-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^32/2^18 = 2^14 = 16384 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 32, "page_exp": 18, "entries": 16384}, "prompt_sha1": "8d7ca89430463d593c60d4f2f2bec65f1cb88634", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25 Mbit/s and RTT 5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25×10^6 × 5/1000 = 125000 bits = 15625 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25, "rtt_ms": 5, "bits": 125000.0, "bytes": 15625.0}, "prompt_sha1": "05f97d248b18d1fe66343f3483e85f138571c795", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(5×10^6) s = 6.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 32, "time_us": 6.3999999999999995}, "prompt_sha1": "72eac33ad79f5a094ff12fe7005a3d8e86504fd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 24 data bits per transfer at 200 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 24/8 = 3. Bandwidth = 3×200×10^6×4 = 2.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 24, "rate_mt": 200, "channels": 4, "gbps": 2.4}, "prompt_sha1": "7d1f11f658a6f4a473f7d7fa2f5b39c69730d2a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 2-bit up/down counter `updown_2_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_2_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [1:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 2'd3) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_2_sat", "width": 2, "wrap": false}, "prompt_sha1": "0e107cae6cf82649b3223649d07f138696f7692f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 11 and tail index 31, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (11-31) mod 32 = 12. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 11, "tail": 31, "occupancy": 12}, "prompt_sha1": "b8ae876fdb09dff4593359e910b1034eb023c243", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×200/1000/8 = 125000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 200, "bytes": 125000000.0}, "prompt_sha1": "e8dd5903239d768b5df4cca8b15fbeb49ff01c20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-28 = 1372 bytes.\nRound down to an 8-byte multiple: floor((1372)/8)×8 = 1368 bytes.\nFragments required = ceil(10000/1368) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 28, "payload": 10000, "max_payload": 1368, "fragments": 8}, "prompt_sha1": "71e21e56b66b9f825c47af6ea104abdb51a2483e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 8 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 4819 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×4819/(8×10^6) = 0.03011875 = 3.011875%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 8, "irq_hz": 50, "cycles": 4819, "load": 0.03011875}, "prompt_sha1": "192078e2c2b0eccb8f820097d8ecb7fe5b42feea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 12000 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 12000 = 2400. Verification: 2400/12000 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 12000, "duty": 20, "high": 2400}, "prompt_sha1": "ab1c7e33d6e983d3e635601eb28b8c4d3cd3afa6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x2D. Extract the 2-bit field starting at bit 6 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0x2D >> 6) & 0x3 = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 2, "lsb": 6, "value": 45, "mask": 3, "field": 0}, "prompt_sha1": "7d820de6ce01b7ebd57777d68f4f495f6909bfe3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w8_5799` implementing a dual-clock asynchronous FIFO with depth 4 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w8_5799 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 8,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w8_5799", "depth": 4, "width": 8, "ptr_w": 2}, "prompt_sha1": "7bbe3cb9c7c2b4339d421ac0c4049eb4aba11a10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1398 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1398/(1398+20+8) = 0.980365 = 98.04%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1398, "iphdr": 20, "eff": 0.9803646563814866}, "prompt_sha1": "b27b662e8240705562798e58d35ae4d4193b6f5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m106` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 106 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m106 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd106;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m106", "width": 8, "max": 106}, "prompt_sha1": "0e6becdd78d838bd455b237e74a88f939d8f469f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_520298` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_520298 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_520298"}, "prompt_sha1": "ef3169574db3fedd47cb55ecd4eb59d3afecb832", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact cutoff frequency of an RC low-pass when R=10000 ohm but capacitance is unspecified.", "output": "A numeric cutoff is underdetermined because C is missing. For a first-order RC low-pass, f_c=1/(2πRC). With R=10000 ohm, the capacitance is still required; I would request C rather than assume it.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "868e9e435a6c2b1a00defbc388298b642653a968", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×24²=2.88e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 24, "energy": 2.8800000000000004e-06}, "prompt_sha1": "3b5f4fff1e896a96bbc409894685aca56e77a576", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 50-bit up/down counter `updown_50_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_50_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [49:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_50_wrap", "width": 50, "wrap": true}, "prompt_sha1": "7f5882bc81bdd5c2a32833d59a5a6c99912c5ba9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2115 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "3d2257681772a5c1b2cae2a90fa8ed63d09f87e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3451 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "e5947481a957132639dfb42e040de187c9f33e46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_3281` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_3281 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_3281", "width": 4}, "prompt_sha1": "abe08a58591ef703973e38396fe5fb9047249587", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 48 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 1164 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×1164/(48×10^6) = 0.0002425 = 0.024250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 48, "irq_hz": 10, "cycles": 1164, "load": 0.0002425}, "prompt_sha1": "d74fb675b31725f1094e42d43bd53b79d768b7a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×180)/(10+180) = 9.473684 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 180, "req": 9.473684210526315}, "prompt_sha1": "64aeb7153169dd5a643e2d3d561eb9a73efad5b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1010101010111 using generator polynomial bits 1001. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 9, "msg_bits": 13, "msg": 5463, "remainder": 3}, "prompt_sha1": "b84553f84d94843ae0188fa7928e080ee3a42135", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=10 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×2.2/(10+2.2) = 0.595082 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 10, "r2": 2.2, "vout": 0.5950819672131148}, "prompt_sha1": "6ef1563003b51ab4d19da8ab8f37839a66b8bedb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2995` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2995 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2995"}, "prompt_sha1": "266f3e7fa6d859c94d54a7de9f44e358654414c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x32_no_bypass` with 64 entries of 32 bits. Inputs: `clk`, `we`, `6-bit waddr`, `32-bit wdata`, `6-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [31:0] wdata,\n input logic [5:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x32_no_bypass", "entries": 64, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "a0b00892b205f77d6c145871e8184d963db2e0c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 49 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 49-18 = 31.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 49, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 31}, "prompt_sha1": "150bbd920e7f67ed19f1434819a03b0ca14997a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_94_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 94 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_94_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd94;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_94_ignore", "cycles": 94, "retrigger": false}, "prompt_sha1": "8911a2c919425e6497f1bcd8ec23fe813a817a0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5799-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5799×8 = 46392 bits.\nSerialization delay = bits/rate = 46392/(10×10^6) s = 0.0046392 s = 4639.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5799, "rate_mbps": 10, "delay_s": 0.0046392}, "prompt_sha1": "95397336ab91a1eeba2ecee16e6faba5cec2a5c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_449586` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_449586 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_449586"}, "prompt_sha1": "88785a097ed4b320dfd645b990e8bae5669b790d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_5_39_6` with RED, GREEN, YELLOW states. Hold RED for 5 clock cycles, GREEN for 39, and YELLOW for 6; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_5_39_6 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 4) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 38) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 5) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_5_39_6", "red": 5, "green": 39, "yellow": 6}, "prompt_sha1": "fd359a75d511f0285088c0d68045e2550827caaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 22-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^22 V = 1.43051147461e-06 V = 1.430511 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 22, "vref": 6.0, "step": 1.430511474609375e-06}, "prompt_sha1": "1cca6604f304d0183d9f6858174a16906b7bf668", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500 Hz satisfies it.", "output": "Nyquist minimum is 2×50 = 100 Hz. Proposed rate 500 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50, "min_fs": 100, "proposed": 500}, "prompt_sha1": "52085097a8a1c36ca2dcbd890e5c8329fab6b1d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=2.2 nF and is stepped to 5 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=5(1-e^-4)=4.908422 V; τ=4.84e-07 s and t=1.936e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 2.2000000000000003e-09, "multiple": 4, "vin": 5, "vc": 4.908421805556329}, "prompt_sha1": "c006e13ec13cd05485cd9f4db2463a677664911b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'P', 'V', 'V', 'V', 'V', 'P', 'V', 'V', 'V', 'P', 'P', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 14 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "P", "V", "V", "V", "V", "P", "V", "V", "V", "P", "P", "P", "V", "V", "V"], "value": 14, "blocked": 0}, "prompt_sha1": "fde415352f321f9bedaad1b19f08c2b5782544ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 240 counts per period. What compare/high-time count produces exactly 40% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.4 × 240 = 96. Verification: 96/240 = 0.4, which is 40%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 240, "duty": 40, "high": 96}, "prompt_sha1": "56e146f6cf2c8228875b9cdf74ff72f72df89223", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 128-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/128 = 1024.\nOffset bits = log2(128) = 7.\nIndex bits = log2(1024) = 10.\nTag bits = 48-10-7 = 31.\nCheck: 31+10+7 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 128, "addr_bits": 48, "lines": 1024, "offset_bits": 7, "index_bits": 10, "tag_bits": 31}, "prompt_sha1": "2db517f0033fe4c4615e52113f3fc8f191668a93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/32 = 32768.\nSets = 32768/4 = 8192.\nOffset bits = log2(32) = 5; index bits = log2(8192) = 13; tag bits = 57-5-13 = 39.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 32, "ways": 4, "addr_bits": 57, "lines": 32768, "sets": 8192, "offset": 5, "index": 13, "tag": 39}, "prompt_sha1": "9aadd7486f8008338c14a27ee83a5cdc9922422f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m25722` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 25722 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m25722 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd25722;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m25722", "width": 15, "max": 25722}, "prompt_sha1": "0ef8f411e94439eb2c8e79e7ad32c5180bf760e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 50 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 50-12 = 38.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 50, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 38}, "prompt_sha1": "494be6fc09d0171fe73ae0d4aca548a0d1cd3d0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 9 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 53 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+1 = 12. Total bits = 53×12 = 636. Time = 636/921600 = 0.000690104167 s = 0.690104 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 9, "parity": 1, "stop": 1, "frames": 53, "seconds": 0.0006901041666666667}, "prompt_sha1": "6342df83ce8417a635ab79399026ba3b5fb06c38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 78 and initial occupancy is 34. In an abstract batch, producer attempts to enqueue 143 items first, dropping any excess beyond capacity; then consumer removes up to 52 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=78, dropped=99; consumed=52; final occupancy=26.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 78, "start": 34, "prod": 143, "cons": 52, "dropped": 99, "consumed": 52, "final": 26}, "prompt_sha1": "1963cbc822b9424208e9915293d1ddd0422f8221", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x53, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x53<<1)|1 = 0xA7 = 10100111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 83, "rw": 1, "byte": 167}, "prompt_sha1": "138195cfe9c2d8390d9c60146891348c865c5523", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 55-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^55/2^13 = 2^42 = 4398046511104 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 55, "page_exp": 13, "entries": 4398046511104}, "prompt_sha1": "9cc8c7e27c938561e8db6f966af6218c49f28a85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/8000 = 6250.\nWith prescaler divisor limited to at most 8192, the largest divisor of 6250 that also keeps the period count within 16 bits is 6250.\nPeriod count = 6250/6250 = 1.\nPSC register = 6250-1 = 6249.\nARR register = 1-1 = 0.\nVerification: 50000000/(6250×1) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 8000, "total_division": 6250, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 6250, "period": 1, "psc_reg": 6249, "arr_reg": 0}, "prompt_sha1": "6c51659bdb5ddd0a08132c066686845a38287fa9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 220 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00022×2.5²=0.0006875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00021999999999999998, "v": 2.5, "energy": 0.0006875}, "prompt_sha1": "fc769b9a54197bd1f19169ef71b0236521336639", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 4008 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×4008/(120×10^6) = 0.00668 = 0.668000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 200, "cycles": 4008, "load": 0.00668}, "prompt_sha1": "538b1d4e32ba354460b2de607f0a978cb7476c45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 16-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/16 = 512.\nOffset bits = log2(16) = 4.\nIndex bits = log2(512) = 9.\nTag bits = 32-9-4 = 19.\nCheck: 19+9+4 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 16, "addr_bits": 32, "lines": 512, "offset_bits": 4, "index_bits": 9, "tag_bits": 19}, "prompt_sha1": "4160b4c169fa51f20856ba4a16880c50354ef770", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6075(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6075(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6075([1, 2]) == 1.5\nassert mean_6075([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6075"}, "prompt_sha1": "d464ed3659558c4d628531f5791b4a5b4063f0cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 1 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×1×10^6 = 1000000 B/s. Time = 16384/1000000 = 0.016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 1, "rate_mhz": 1, "sec": 0.016384}, "prompt_sha1": "c2b14470087a0ffb5cb81caeb76c24762ac13025", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_28` for a 28-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_28 (\n input logic [27:0] data,\n input logic [4:0] shamt,\n output logic [27:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_28", "width": 28, "direction": "right", "arithmetic": false}, "prompt_sha1": "ea6e03c77a06dd81ef3d66e4ca97f1e4c97d5954", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=100 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/47 = -2.127660.\nVout = A_v×Vin = -2.127660×0.2 = -0.425532 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 100, "vin": 0.2, "gain": -2.127659574468085, "vout": -0.425531914893617}, "prompt_sha1": "c49bc38c493e110450923e95116a58abf21dfd0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×270)/(47000+270) = 268.457796 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 270, "req": 268.4577956420563}, "prompt_sha1": "25049816e8075305d84c54dbea3afa17cfedf5c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 110010001110110111010011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 14 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110010001110110111010011", "ones": 14, "parity": 0}, "prompt_sha1": "3451acbd04ab0d79cfa984d5cfba5bcc3225a698", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x140F38C4C368CD55 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 14 0F 38 C4 C3 68 CD 55.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 1445436423152389461, "endian": "big", "bytes": [20, 15, 56, 196, 195, 104, 205, 85]}, "prompt_sha1": "eced9d2c280278c335668286881954d42ecea0dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 16000 payload bytes plus 40 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 16000/(16000+40) = 0.997506 = 99.75%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 16000, "overhead": 40, "efficiency": 0.9975062344139651}, "prompt_sha1": "d1ba10f53a5b4c8f9647fc85b68cd74701314f99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `n` elements of type `int`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `table[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "a9c8c50084a2ef6d7ebe612a985b2ab81f78e4c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w16_8890` implementing a dual-clock asynchronous FIFO with depth 8 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w16_8890 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 16,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w16_8890", "depth": 8, "width": 16, "ptr_w": 3}, "prompt_sha1": "c7d7953b8d745786046ae64c7e0f813f6aae21c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×56)/(150+56) = 40.776699 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 56, "req": 40.77669902912621}, "prompt_sha1": "a1fb7a18c615399d8332c258f29780d111cd5c68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w16_4416` implementing a dual-clock asynchronous FIFO with depth 8 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w16_4416 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 16,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w16_4416", "depth": 8, "width": 16, "ptr_w": 3}, "prompt_sha1": "a690697f54b0727f43e38976bcf86c724dd0f98e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 91 and initial occupancy is 10. In an abstract batch, producer attempts to enqueue 138 items first, dropping any excess beyond capacity; then consumer removes up to 15 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=91, dropped=57; consumed=15; final occupancy=76.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 91, "start": 10, "prod": 138, "cons": 15, "dropped": 57, "consumed": 15, "final": 76}, "prompt_sha1": "6e263dfcf95315f1f2d83d1f560bb6aba55e220e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 50-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^50/2^18 = 2^32 = 4294967296 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 50, "page_exp": 18, "entries": 4294967296}, "prompt_sha1": "193a912ceb97556ae1c2004092df06e1de30ebef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-20 = 1380 bytes.\nRound down to an 8-byte multiple: floor((1380)/8)×8 = 1376 bytes.\nFragments required = ceil(10000/1376) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 20, "payload": 10000, "max_payload": 1376, "fragments": 8}, "prompt_sha1": "ff3c8003f55191c97f332bd224e34fc3a86a948f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 45-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^45/2^14 = 2^31 = 2147483648 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 45, "page_exp": 14, "entries": 2147483648}, "prompt_sha1": "4219e6d2dfd83abd83766b81f37e61feac3d93f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2743` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2743 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2743"}, "prompt_sha1": "dfc50c49a3f1de1f626f4ac99edb7430bbcf29cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 971-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 971×8 = 7768 bits.\nSerialization delay = bits/rate = 7768/(5000×10^6) s = 1.5536e-06 s = 1.553600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 971, "rate_mbps": 5000, "delay_s": 1.5536e-06}, "prompt_sha1": "ffcfa51b0f3b1a20485845fa2df87f6454ace270", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=4.7 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/2.2 = -2.136364.\nVout = A_v×Vin = -2.136364×0.1 = -0.213636 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 4.7, "vin": 0.1, "gain": -2.1363636363636362, "vout": -0.21363636363636362}, "prompt_sha1": "15a168ce446536d81858148edaed80126ec4e216", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `items` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n total += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `data[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n total += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "e0968cac3c140a72cda3fdad7235b1c52ec554fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.91. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.91) + 0.91/192) = 10.555250.\nThe theoretical speedup is about 10.555×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.91, "n": 192, "result": 10.555250137438156}, "prompt_sha1": "0f1e8689dfbe23d5cdbffe7e021118d135ed922a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 390 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×390)/(22000+390) = 383.206789 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 390, "req": 383.2067887449754}, "prompt_sha1": "7466cf61f2572d9b16b82a8e2ccba3cf17778d42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "P", "V", "P", "V", "P", "V", "V", "V", "V", "V", "P", "P", "V", "P", "P"], "value": 6, "blocked": 0}, "prompt_sha1": "713391fd842e6cc9f1616a192b1ffd332166d9ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 98.4% hit rate, and a 95 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.984 = 0.016.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.016×95 ns = 3.0200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.984, "penalty": 95, "result": 3.0200000000000014}, "prompt_sha1": "cbd19a684571cfa44f68111e0f5870ae0940944f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "P", "V", "V", "P", "P", "V", "P", "P", "P", "V", "V", "P", "P"], "value": 6, "blocked": 0}, "prompt_sha1": "08cc7d71e4bac157d09997139ec8931dc05458bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 38-bit left-shift register module `shiftreg_left_38`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `38-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_38 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [37:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[36:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_38", "width": 38, "direction": "left"}, "prompt_sha1": "2f82b4cc9c9a7aeccaad7e087b71fea39ad2c306", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_96` for a synchronous sampled input `noisy`. Update output `clean` only after observing 96 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_96 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 95) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_96", "stable_samples": 96}, "prompt_sha1": "85083780ddc51bf9e9796b5a4ceb20e59c87bf78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 46-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^46/2^15 = 2^31 = 2147483648 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 46, "page_exp": 15, "entries": 2147483648}, "prompt_sha1": "9ab414c196fa4df0c22e8d6ef03cf1a9c705e179", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 16000 payload bytes plus 56 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 16000/(16000+56) = 0.996512 = 99.65%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 16000, "overhead": 56, "efficiency": 0.9965122072745392}, "prompt_sha1": "da541b0699976a1d0d3b5a6800294e3f8da3b83f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=470 nF and is stepped to 3.3 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=3.3(1-e^-4)=3.239558 V; τ=0.00047 s and t=0.00188 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7000000000000005e-07, "multiple": 4, "vin": 3.3, "vc": 3.239558391667177}, "prompt_sha1": "5490cc402abf240232ce9014b50e1cdd66d61cca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 160 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 160 MHz / 64 = 2.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 160000000.0, "divider": 64, "spi_hz": 2500000.0}, "prompt_sha1": "326a71b99c55821edbc3d6ee3177023d2363c475", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 23088 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23088/10000 s; frequency = 10000/23088 = 0.433125 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 23088, "hz": 0.4331254331254331}, "prompt_sha1": "16635c905c079bcccec785aa4bbe1643f8060456", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=4 ms,T=200 ms, C=2 ms,T=5 ms, C=5 ms,T=40 ms, C=2 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 4/200 + 2/5 + 5/40 + 2/100 = 0.765000 = 76.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [4, 200], [2, 5], [5, 40], [2, 100]], "utilization": 0.765}, "prompt_sha1": "38b9a343db02568f5df526b308d755af0b25f24c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3237572253, carries 9142 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 9142+1+1 = 9144. ACK = (3237572253+9144) mod 2^32 = 3237581397.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3237572253, "payload": 9142, "syn": 1, "fin": 1, "ack": 3237581397}, "prompt_sha1": "88f880f23ac6fa7e4f7dafe779f207bee8b0047e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_13_16_5` with RED, GREEN, YELLOW states. Hold RED for 13 clock cycles, GREEN for 16, and YELLOW for 5; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_13_16_5 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 12) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 15) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 4) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_13_16_5", "red": 13, "green": 16, "yellow": 5}, "prompt_sha1": "5ec1f1642142a44618cd6c4d2541aea2a22bf1a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_29_msb` for `29-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_29_msb (\n input logic [28:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 29; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_29_msb", "width": 29, "priority": "high"}, "prompt_sha1": "1160d4c4acdba71091a2783c8aec381b0b2bb114", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×56000)/(68+56000) = 67.917529 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 56000, "req": 67.91752871513162}, "prompt_sha1": "92ce7f393ac7473585235867388378cfd1c880e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_9428` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_9428 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_9428"}, "prompt_sha1": "86a4cb915ac32983a85203956c53c935d4d384b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock TX then B; consumer acquires B then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds TX while waiting for B, while consumer holds B while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "9bc44a521f5884eee439c263933efca209edfc1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×150/1000/8 = 93750000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 150, "bytes": 93750000.0}, "prompt_sha1": "9c5352733faa43ae59bddd6ae1bee8b063ae4dd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_117_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 117 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_117_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd117;\n end else begin\n if (pulse_in)\n count <= 7'd117;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_117_retrig", "cycles": 117, "retrigger": true}, "prompt_sha1": "550c6d99ccd3b12c76ae0e4b2dc5f6f43f69b38c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 212 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "a67fd7eb48df21f2429957495db9678bc3342520", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_6092` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_6092 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_6092", "width": 24}, "prompt_sha1": "f6803f7ebab1a1b9ae972f6c5b33ac29a808464c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 2.5 on a 4.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×2.5/(4.5×10^9) = 0.00555555556 s = 5.555556 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 2.5, "ghz": 4.5, "sec": 0.005555555555555556}, "prompt_sha1": "a85e4192813468518929aa9d5aa3554eb2ecd08c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^10 V = 0.00322265625 V = 3222.656250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 3.3, "step": 0.00322265625}, "prompt_sha1": "e4fcda5391e9c3655dc20d0498e367c03d96570a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `entries` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n result += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `table[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n result += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "511480c601ffda4a3d839f7ab396d2a9a15c5d71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×180)/(47+180) = 37.268722 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 180, "req": 37.268722466960355}, "prompt_sha1": "95ea89557e73ce27ee7a343876eddf3e8acf50d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w14_signed` comparing two 14-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w14_signed (\n input logic signed [13:0] a,\n input logic signed [13:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w14_signed", "width": 14, "signed": true}, "prompt_sha1": "e1da2d6fb9a8b59470b13f7686873c5f0c7b89fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w58_unsigned` comparing two 58-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w58_unsigned (\n input logic [57:0] a,\n input logic [57:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w58_unsigned", "width": 58, "signed": false}, "prompt_sha1": "1ceb4ad851a882cf08bc13f6216b8b6be7320be0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_238` generating a one-clock-cycle `tick` every 238 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_238 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 237) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_238", "divide": 238}, "prompt_sha1": "7b01721d621a389794b6b7265018744dfc3c2adc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x6DD4. Extract the 6-bit field starting at bit 5 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x6DD4 >> 5) & 0x3F = 0x2E (46).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 5, "value": 28116, "mask": 63, "field": 46}, "prompt_sha1": "8d2e8cd7972627fb5e2fcf07bde4eb1f9c025fc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 120 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×120)/(10+120) = 9.230769 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 120, "req": 9.23076923076923}, "prompt_sha1": "41c0e6548aec6db418fcd80fbad8b3f22f4f3371", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w64_8080` implementing a dual-clock asynchronous FIFO with depth 64 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w64_8080 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 64,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w64_8080", "depth": 64, "width": 64, "ptr_w": 6}, "prompt_sha1": "1019a1a3b7e37254efedabbcea0020c21a569ae9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x16_no_bypass` with 16 entries of 16 bits. Inputs: `clk`, `we`, `4-bit waddr`, `16-bit wdata`, `4-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [15:0] wdata,\n input logic [3:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x16_no_bypass", "entries": 16, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "46380e0e47c042732f090a084a3c0551d9ecd074", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×5²=2.75e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 5, "energy": 2.7499999999999998e-05}, "prompt_sha1": "8ff67ef6fbe9bac1cd2e35503f6a69915b6e4224", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [11, 18, 20, 19, 25, 24]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [51, 93, 97, 100, 117, 116].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [11, 18, 20, 19, 25, 24], "finish": [51, 93, 97, 100, 117, 116]}, "prompt_sha1": "fe777d1b2999ee2d763572db9cbfd097e3d63d55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNTTNNTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 1, 1, 0, 0, 1, 0, 0], "final_state": 0}, "prompt_sha1": "9e90b4118fc1e0fe641950a875646510db7c990d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×32 KiB = 256 KiB = 262144 bytes = 0.250000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 32, "reach": 262144}, "prompt_sha1": "02061c6512a7a0dc684af637af975257839f8d0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['P', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["P", "V", "P", "V", "V", "P", "V", "V", "P", "V", "V", "V", "V", "P", "P", "P", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "e564d19b7c2a335636aa6e39f3ca1f0ae426e133", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_87_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 87 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_87_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd87;\n end else begin\n if (pulse_in)\n count <= 7'd87;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_87_retrig", "cycles": 87, "retrigger": true}, "prompt_sha1": "93439eceb96b1586c33a76c3866fccb5bddbe7b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3032(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3032(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3032([1, 2]) == 1.5\nassert mean_3032([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3032"}, "prompt_sha1": "c6b478db7b90c36b73d24b1f2cd597f72b55c24b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 200 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 200 = 60. Verification: 60/200 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 200, "duty": 30, "high": 60}, "prompt_sha1": "8baf4c4669fd21a8e3ec72a3e1e7bbf189fed665", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 921600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(16×921600) = 6.510417.\nNearest integer divisor D = 7.\nActual baud = 96000000/(16×7) = 857142.857 baud.\nError = (857142.857-921600)/921600×100% = -6.9940%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 16, "baud": 921600, "divisor": 7, "actual": 857142.8571428572, "error_pct": -6.994047619047618}, "prompt_sha1": "538fdbe41b2047fcec6d1844445540fc73f28898", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-20 = 1260 bytes.\nRound down to an 8-byte multiple: floor((1260)/8)×8 = 1256 bytes.\nFragments required = ceil(8000/1256) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 20, "payload": 8000, "max_payload": 1256, "fragments": 7}, "prompt_sha1": "2ddca2d7ccd2457bd3864886f9c99d4c75337018", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 3 = 0.036000.\nEffective CPI = 1.1 + 0.036000 = 1.136000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.08, "penalty": 3, "result": 1.1360000000000001}, "prompt_sha1": "c67780db1520c05908e79fc9d1683b16b96d34d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.6 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.6-3 = 0.6 V.\nI = V/R = 0.6/5600 A = 0.1071 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.6, "vf": 3.0, "r": 5600, "current_a": 0.00010714285714285716}, "prompt_sha1": "6e6fe1b812746167949a4056861e9432bc5387a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.25 ns hit time, 98.1% hit rate, and a 145 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.981 = 0.019.\nAMAT = hit time + miss rate × miss penalty\n= 3.25 ns + 0.019×145 ns = 6.0050 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.25, "hit_rate": 0.981, "penalty": 145, "result": 6.005000000000003}, "prompt_sha1": "8a0be1d0f46bcb07e21fcca66341b321ad804188", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 16 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×100×10^6 = 1600000000 B/s. Time = 256/1600000000 = 1.6e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 16, "rate_mhz": 100, "sec": 1.6e-07}, "prompt_sha1": "b35b6e2843663003e0e78bd97cceed624508909b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w16_6957` implementing a dual-clock asynchronous FIFO with depth 32 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w16_6957 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 16,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w16_6957", "depth": 32, "width": 16, "ptr_w": 5}, "prompt_sha1": "179d85c16ecbb96a80784d0059a31d7a28a49e23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x2D0, toggle bit 9 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 9)`. Result = 0xD0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 720, "bit": 9, "op": "toggle", "result": 208}, "prompt_sha1": "db995950faccdf387a300d973b5262f2c7d1a05b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 62 and tail index 73, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (62-73) mod 128 = 117. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 62, "tail": 73, "occupancy": 117}, "prompt_sha1": "73f6a34c7ceb70c90e5636374eca0fdb411c5023", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 26 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 26 = 29.\nClock pulses = 29×9 = 261.\nTime = 261/400000 s = 652.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 26, "clocks": 261, "time_s": 0.0006525}, "prompt_sha1": "abe5e0bc7e252733ed56466dbd8bea86fd614403", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×9²=0.0405 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 9, "energy": 0.04050000000000001}, "prompt_sha1": "277e134be54735a7a2b7a887318afdb6ecb5df03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.73. Using Amdahl's law, compute the theoretical speedup on 128 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.73) + 0.73/128) = 3.627090.\nThe theoretical speedup is about 3.627×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.73, "n": 128, "result": 3.6270898271465004}, "prompt_sha1": "5dcdacd6f1c96f3f6bc8d1200c7d5c82427404d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.25 ns hit time, 95.4% hit rate, and a 65 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.954 = 0.046.\nAMAT = hit time + miss rate × miss penalty\n= 2.25 ns + 0.046×65 ns = 5.2400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.25, "hit_rate": 0.954, "penalty": 65, "result": 5.240000000000003}, "prompt_sha1": "2769c9b0b9dc59efc8b4229a2adeda1e4d405137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [11, 8, 27, 5, 21]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [40, 16, 72, 29, 69].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [11, 8, 27, 5, 21], "finish": [40, 16, 72, 29, 69]}, "prompt_sha1": "ab105a2ce5303f7ac02ea565c8f42967d11c31e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 64 payload bytes plus 24 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 64/(64+24) = 0.727273 = 72.73%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 64, "overhead": 24, "efficiency": 0.7272727272727273}, "prompt_sha1": "c15c90755d5825d46c1990179aff061a4d54ed10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w32_3251` implementing a dual-clock asynchronous FIFO with depth 4 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w32_3251 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 32,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w32_3251", "depth": 4, "width": 32, "ptr_w": 2}, "prompt_sha1": "3c69b1308b6d105e9a8c64301013d6e98fb30ed0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_117_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 117 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_117_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd117;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_117_ignore", "cycles": 117, "retrigger": false}, "prompt_sha1": "ce79a474ff43c11915b10a1b5c944a8ef205f1c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 92%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.100×(5+0.080×50) = 1.900000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.9, "l2": 5, "l2_hit": 0.92, "mem": 50, "amat": 1.8999999999999995}, "prompt_sha1": "c3e255c79d1b3fe727ba9ada37398c4e8bc57235", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 80 MHz, prescaler divisor is 809, and period is 9164 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 80000000/(809×9164) = 10.790868 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 80000000, "prescaler": 809, "period": 9164, "hz": 10.790868119944815}, "prompt_sha1": "acacfee5ca75ed28cfdae54a7ad44dbbb9eb7c66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_52_msb` for `52-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_52_msb (\n input logic [51:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 52; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_52_msb", "width": 52, "priority": "high"}, "prompt_sha1": "75b01087506d80fc7e96d3a4cf4c1cf36136ae83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2901-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2901×8 = 23208 bits.\nSerialization delay = bits/rate = 23208/(2500×10^6) s = 9.2832e-06 s = 9.283200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2901, "rate_mbps": 2500, "delay_s": 9.2832e-06}, "prompt_sha1": "9236f15cb71abe7201fb02a90d9bc11933aadbd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE7436656 in 4 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 56 66 43 E7.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 3879954006, "endian": "little", "bytes": [86, 102, 67, 231]}, "prompt_sha1": "2bec7174100b9f8f672b1af8a01e705547bd91a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1747455016, carries 1555 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 1555+0+1 = 1556. ACK = (1747455016+1556) mod 2^32 = 1747456572.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1747455016, "payload": 1555, "syn": 0, "fin": 1, "ack": 1747456572}, "prompt_sha1": "062d66612726ab51170665b48bb3028ffa371f79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "1ee8ca6272f864ebaa181332aad5f1fff67319b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2228(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2228(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2228([1, 2]) == 1.5\nassert mean_2228([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2228"}, "prompt_sha1": "c4df1db8939b92d3f81230c8a8fd2ac05409d6d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/50 = 3360000.\nWith prescaler divisor limited to at most 128, the largest divisor of 3360000 that also keeps the period count within 16 bits is 128.\nPeriod count = 3360000/128 = 26250.\nPSC register = 128-1 = 127.\nARR register = 26250-1 = 26249.\nVerification: 168000000/(128×26250) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 50, "total_division": 3360000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 128, "period": 26250, "psc_reg": 127, "arr_reg": 26249}, "prompt_sha1": "b44cb178c67a67f8ce0458824c5c23445c7da2df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×24²=0.288 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 24, "energy": 0.28800000000000003}, "prompt_sha1": "3ed85c1de8bbdb347bd3f32c1b766e3b42b36b2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 001100011001100101111111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 14 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001100011001100101111111", "ones": 14, "parity": 0}, "prompt_sha1": "22d96b120cf04b39a1f00e8ac88d85bbfba0548a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_15_52_3` with RED, GREEN, YELLOW states. Hold RED for 15 clock cycles, GREEN for 52, and YELLOW for 3; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_15_52_3 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 14) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 51) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 2) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_15_52_3", "red": 15, "green": 52, "yellow": 3}, "prompt_sha1": "62513ca8f4a1997d1da6c70b73ac17a9510f4e16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 3.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+16 = 19.5. Period = 19.5/10000000 = 1.95e-06 s. Maximum rate = 1/period = 512820.512821 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 3.5, "conv_cycles": 16, "period": 1.95e-06, "rate": 512820.5128205128}, "prompt_sha1": "29490cb72e2269b968d57c7f45d59ce07645439e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=100 ms, C=2 ms,T=10 ms, C=2 ms,T=50 ms, C=4 ms,T=20 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/100 + 2/10 + 2/50 + 4/20 + 3/25 = 0.600000 = 60.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 100], [2, 10], [2, 50], [4, 20], [3, 25]], "utilization": 0.6}, "prompt_sha1": "91999fca4c1c88d582c940022e8919d0ed31bc1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551449; x = x + 468;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551449+468 = 18446744073709551917. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551917) mod 2^64 = 301. So `x` stores 301. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551449, "add": 468, "result": 301}, "prompt_sha1": "a2bcc4d4dffd4fdf1409ea1b57dd0d625a4d3901", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 64 data bits per transfer at 6400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 64/8 = 8. Bandwidth = 8×6400×10^6×4 = 204.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 64, "rate_mt": 6400, "channels": 4, "gbps": 204.8}, "prompt_sha1": "3036a25b6e9ee5b7a34fb2dd600743de467fa4b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 59 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 59-12 = 47.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 59, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 47}, "prompt_sha1": "e72e77d04056c2e796bf5f8c94ca1010dc2489e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 25 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 230400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 25000000/(4×230400) = 27.126736.\nNearest integer divisor D = 27.\nActual baud = 25000000/(4×27) = 231481.481 baud.\nError = (231481.481-230400)/230400×100% = 0.4694%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 25000000, "oversample": 4, "baud": 230400, "divisor": 27, "actual": 231481.4814814815, "error_pct": 0.46939300411522955}, "prompt_sha1": "24691475020d23efdb4285cc7a9d67b2a5abc125", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m16044` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 16044 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m16044 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd16044;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m16044", "width": 15, "max": 16044}, "prompt_sha1": "d70a130f9a8955aa73efbf38057df1e8f8fa34ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 5` on one shared integer without synchronization. Assume `credits` initially equals 150. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 150; T2 reads 150; both compute 155; T1 writes 155; T2 writes 155. The observed final value is 155, but two serial increments would produce 160.\n\n```\nlock(mutex)\ncredits = credits + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "601b0a52ae933bcbc549cca2e69f7ef6ecfb1502", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_8` for a 8-bit unsigned input `data`, `3-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_8 (\n input logic [7:0] data,\n input logic [2:0] shamt,\n output logic [7:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_8", "width": 8, "direction": "left", "arithmetic": false}, "prompt_sha1": "05b07c7acb3fa68543585f6e0962b19890928002", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=150000 ohm and C=82000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=150000×82000×10^-12 s = 0.0123 s.\nf_c=1/(2πRC)=1/(2π×150000×82000×10^-12) = 12.9394 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 150000, "c_f": 8.199999999999999e-08, "tau": 0.012299999999999998, "fc": 12.93942626763377}, "prompt_sha1": "9938ea80e45c54d171f08a69adc7f052e4ccde5c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 16-bit ADC spanning 0 to 1.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.5/2^16 V = 2.28881835938e-05 V = 22.888184 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 16, "vref": 1.5, "step": 2.288818359375e-05}, "prompt_sha1": "558756fe2ad071d50b5c8758c37ea0b0bf4c5175", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9876(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9876(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9876([1, 2]) == 1.5\nassert mean_9876([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9876"}, "prompt_sha1": "d726efaf4a3bbaf697c7283834ae3a2938908e21", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 2117 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×2117/(400×10^6) = 0.000264625 = 0.026462%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 50, "cycles": 2117, "load": 0.000264625}, "prompt_sha1": "1fa95f44f83e5ee5f31a8879a2746ddb422e8ef9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(16×250000) = 4.000000.\nNearest integer divisor D = 4.\nActual baud = 16000000/(16×4) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 16, "baud": 250000, "divisor": 4, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "2ada8218368198c58c4a6233ec051a47c9db9b0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 92%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.030×(4+0.080×150) = 1.280000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.97, "l2": 4, "l2_hit": 0.92, "mem": 150, "amat": 1.2800000000000002}, "prompt_sha1": "4879bfb95f3ec5457e51122b2c3b8d3e2b33bd79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 2 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×100×10^6 = 200000000 B/s. Time = 256/200000000 = 1.28e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 2, "rate_mhz": 100, "sec": 1.28e-06}, "prompt_sha1": "1415734f900a23992bb2264cb58b93ae7eb4e866", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock TX then L2; worker_2 acquires L2 then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds TX while waiting for L2, while worker_2 holds L2 while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire L2 before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "f9d55de7b5712ff18c6bc68fa4fbf8b78289132f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65454; x = x + 349;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65454+349 = 65803. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65803) mod 2^16 = 267. So `x` stores 267. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65454, "add": 349, "result": 267}, "prompt_sha1": "7c4888edf126c8b1c9ce0309aa6e7d3ac39a231c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3403513033, carries 30927 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 30927+1+0 = 30928. ACK = (3403513033+30928) mod 2^32 = 3403543961.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3403513033, "payload": 30927, "syn": 1, "fin": 0, "ack": 3403543961}, "prompt_sha1": "5244be173893d6c38f435c6eec4ac9b20cd6b961", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/100 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 100, "tau": 0.0001}, "prompt_sha1": "492a945457c698614ce5c5f884f5174a7c2d72b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 47-bit left-shift register module `shiftreg_left_47`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `47-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_47 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [46:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[45:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_47", "width": 47, "direction": "left"}, "prompt_sha1": "8bff6b7e5fb3b3d3874cd6c2d7d4a9e95f88d663", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 2000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2500 Hz satisfies it.", "output": "Nyquist minimum is 2×2000 = 4000 Hz. Proposed rate 2500 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 2000, "min_fs": 4000, "proposed": 2500.0}, "prompt_sha1": "6a93f1933ee9e50a19d27d0a0021baf0df464f13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.47. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.47) + 0.47/8) = 1.698514.\nThe theoretical speedup is about 1.699×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.47, "n": 8, "result": 1.6985138004246285}, "prompt_sha1": "31d531e6d4024613d80f909a86f96ac2f9c0d541", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 347 elements. Review loop `for i in range(347+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(347+1)` includes index 347, which is out of range for a length-347 sequence. Correct loop: `for i in range(347):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 347, "variant": "one_past"}, "prompt_sha1": "8a15357b3cd2b7c56c672a0c43c2c0811b7d1bd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 60% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.6 × 1000 = 600. Verification: 600/1000 = 0.6, which is 60%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 60, "high": 600}, "prompt_sha1": "68e134c501bee53fbef06e7cc46b6398f2b54966", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×0.1/1000/8 = 500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 0.1, "bytes": 500000.0}, "prompt_sha1": "9450e4d715f3684a992c6713abaabe676112ced0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/4.7 = 0.00468085106 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 4.7, "tau": 0.004680851063829787}, "prompt_sha1": "937cc312375387f5d050b7ca8f8b4117a694a777", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (4096×8) = 152587.890625 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 4096, "pps": 152587.890625}, "prompt_sha1": "3b0d24b07cedce17ffe383ed5627ae6c77d0002a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_15_18` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 15, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_15_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 14) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_15_18", "red": 23, "green": 15, "yellow": 18}, "prompt_sha1": "b1e02f886507f99d2b88c97989cfab5f2e363e77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20×10^6 × 10/1000 = 200000 bits = 25000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20, "rtt_ms": 10, "bits": 200000.0, "bytes": 25000.0}, "prompt_sha1": "a7d3d9a15dfb85861263a3c8730de32ec21547a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 16 bytes per beat at 25 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×25×10^6 = 400000000 B/s. Time = 256/400000000 = 6.4e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 16, "rate_mhz": 25, "sec": 6.4e-07}, "prompt_sha1": "dc0496a27aea60bccd1ddce7791a9b81a73941a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.2 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.2/(1.2×10^9) = 0.002 s = 2.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.2, "ghz": 1.2, "sec": 0.002}, "prompt_sha1": "0fcb2055e6b3b5d0aed2905c73869dc40fc3d8bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x24_no_bypass` with 128 entries of 24 bits. Inputs: `clk`, `we`, `7-bit waddr`, `24-bit wdata`, `7-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x24_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [23:0] wdata,\n input logic [6:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x24_no_bypass", "entries": 128, "width": 24, "mode": "no_bypass"}, "prompt_sha1": "af48e98acabb6f22e1e2d607ae7cc973dd416dba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_5257` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_5257 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_5257", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "dc18aa8509b3e07560da96ba764abcd89d49de60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 160.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+20 = 180.5. Period = 180.5/20000000 = 9.025e-06 s. Maximum rate = 1/period = 110803.324100 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 160.5, "conv_cycles": 20, "period": 9.025e-06, "rate": 110803.32409972299}, "prompt_sha1": "311af7e93d4e31a00b9e091b11e15661813330ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5126-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5126×8 = 41008 bits.\nSerialization delay = bits/rate = 41008/(5000×10^6) s = 8.2016e-06 s = 8.201600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5126, "rate_mbps": 5000, "delay_s": 8.2016e-06}, "prompt_sha1": "e0f0c3350e7e894e9181ff3623c2a1ec6394018f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 1600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×1600×10^6×3 = 9.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 1600, "channels": 3, "gbps": 9.6}, "prompt_sha1": "8822310e46257d07f06ff261d5905feb0dad2105", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 5 V reference and returns code 3315. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 3315/4095 × 5 V = 4.047619 V.\nThus the estimated input is about 4.0476 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 5.0, "code": 3315, "volts": 4.0476190476190474}, "prompt_sha1": "c58ad6e86b55289ff88b43e47ccab562c62ba74e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/22 = 0.0454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 22, "tau": 0.045454545454545456}, "prompt_sha1": "6b01838a862d815fb382289b8a9aeb8671ecc8e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 12.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+8 = 20.5. Period = 20.5/20000000 = 1.025e-06 s. Maximum rate = 1/period = 975609.756098 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 12.5, "conv_cycles": 8, "period": 1.025e-06, "rate": 975609.7560975611}, "prompt_sha1": "2c5ef9d833c1dd138354d4b69aa10dcd6d153813", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=100 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/22 = -4.545455.\nVout = A_v×Vin = -4.545455×0.1 = -0.454545 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 100, "vin": 0.1, "gain": -4.545454545454546, "vout": -0.4545454545454546}, "prompt_sha1": "fa9a286643b8ba4835b71ce2e505c7d750dec986", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 100 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×100/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 100, "bytes": 125000.0}, "prompt_sha1": "060aa8875132d6d6b3a522f0d2ef9ba592858b8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_39_13_14` with RED, GREEN, YELLOW states. Hold RED for 39 clock cycles, GREEN for 13, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_39_13_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 38) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 12) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_39_13_14", "red": 39, "green": 13, "yellow": 14}, "prompt_sha1": "e741a3bb4983fdd33badc996612a4fddaf19a72b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 80 MHz. Sampling consumes 640.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+14 = 654.5. Period = 654.5/80000000 = 8.18125e-06 s. Maximum rate = 1/period = 122230.710466 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 80000000.0, "sample_cycles": 640.5, "conv_cycles": 14, "period": 8.18125e-06, "rate": 122230.71046600457}, "prompt_sha1": "28684c05f0bb54e40811b682ffbfc88e7d96cb17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×3.3²=0.005445 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 3.3, "energy": 0.005444999999999999}, "prompt_sha1": "5a882c52965c5b0cdf6474273b7b615516c2a9e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 4 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 128000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 4000000/(4×128000) = 7.812500.\nNearest integer divisor D = 8.\nActual baud = 4000000/(4×8) = 125000.000 baud.\nError = (125000.000-128000)/128000×100% = -2.3438%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 4000000, "oversample": 4, "baud": 128000, "divisor": 8, "actual": 125000.0, "error_pct": -2.34375}, "prompt_sha1": "3a7350404c8aad520bcb6899fb8ad20b59c951c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=1 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×100/(1+100) = 3.267327 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 1, "r2": 100, "vout": 3.267326732673267}, "prompt_sha1": "d2e9db74ee8e81cd0d6cb161591bee6851d2c07b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 3 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×3/(0.5×10^9) = 1.2 s = 1200.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 3.0, "ghz": 0.5, "sec": 1.2}, "prompt_sha1": "81402899ba17aea68c7ca89d77dfeb4764e56852", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `entries` elements of type `double`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n total += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `words[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n total += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "35738b0bc4e65d8078016663703fec2b670bbc66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (2000×8) = 6250.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 2000, "pps": 6250.0}, "prompt_sha1": "245f77e95f1796c61bbdb71064fd62445d2ecdb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1443 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1443/(1443+40+8) = 0.967807 = 96.78%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1443, "iphdr": 40, "eff": 0.9678068410462777}, "prompt_sha1": "0e4b6f93e55b706e3f71b9d431fd27d04e8a6ced", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 4-way set-associative cache uses 64-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/64 = 128.\nSets = 128/4 = 32.\nOffset bits = log2(64) = 6; index bits = log2(32) = 5; tag bits = 64-6-5 = 53.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 64, "ways": 4, "addr_bits": 64, "lines": 128, "sets": 32, "offset": 6, "index": 5, "tag": 53}, "prompt_sha1": "cdc2f1536ff3d610ada6983f90828e1393ecc5aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5797-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5797×8 = 46376 bits.\nSerialization delay = bits/rate = 46376/(100×10^6) s = 0.00046376 s = 463.760000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5797, "rate_mbps": 100, "delay_s": 0.00046376}, "prompt_sha1": "4ecf23150e5930e07f380d7aa654d234ee583f12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3310 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3310/(3310+20+8) = 0.991612 = 99.16%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3310, "iphdr": 20, "eff": 0.9916117435590174}, "prompt_sha1": "5eed9e6631268c4ab948acd09cd107004eaafb8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 18 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 18 = 20.\nClock pulses = 20×9 = 180.\nTime = 180/100000 s = 1800.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 18, "clocks": 180, "time_s": 0.0018}, "prompt_sha1": "824eca102cc20ac8b0773ac1e5535f606d2c7cdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 59-bit up/down counter `updown_59_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_59_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [58:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_59_wrap", "width": 59, "wrap": true}, "prompt_sha1": "2a47313d1beac0002b79530ec48adffe9f83ef2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 16 MHz, prescaler divisor is 916, and period is 40190 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 16000000/(916×40190) = 0.434617 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 16000000, "prescaler": 916, "period": 40190, "hz": 0.43461679294095407}, "prompt_sha1": "5f91cbbb8ea5f70c15ecb6ebfd51a17d4c50ac8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 32-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/32 = 64.\nOffset bits = log2(32) = 5.\nIndex bits = log2(64) = 6.\nTag bits = 36-6-5 = 25.\nCheck: 25+6+5 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 32, "addr_bits": 36, "lines": 64, "offset_bits": 5, "index_bits": 6, "tag_bits": 25}, "prompt_sha1": "17a442b7a3ee97f70783c864822f7c82e17ae49a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 3 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×3/(5×10^9) = 0.06 s = 60.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 3.0, "ghz": 5.0, "sec": 0.06}, "prompt_sha1": "3cf963d2b390f2ff50f39bb537f3eca8417afda8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 72 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 72000000/400 = 180000.\nWith prescaler divisor limited to at most 16, the largest divisor of 180000 that also keeps the period count within 16 bits is 16.\nPeriod count = 180000/16 = 11250.\nPSC register = 16-1 = 15.\nARR register = 11250-1 = 11249.\nVerification: 72000000/(16×11250) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 72000000, "target_hz": 400, "total_division": 180000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 11250, "psc_reg": 15, "arr_reg": 11249}, "prompt_sha1": "6ad6309cc1fe15ff369117cd9caa90295292ad5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=2.2 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×10/(2.2+10) = 19.672131 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 2.2, "r2": 10, "vout": 19.672131147540984}, "prompt_sha1": "8a0e9d7afc608f949c653e49a1e57ccb01e2477d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_8543` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_8543 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_8543"}, "prompt_sha1": "0f1e4f734410fb799134dde14ed3615422b801d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4702(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4702(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4702([1, 2]) == 1.5\nassert mean_4702([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4702"}, "prompt_sha1": "3ceeda6533efcee73f6028d3152bbd1f9060588b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=100 ms, C=1 ms,T=100 ms, C=4 ms,T=200 ms, C=5 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/100 + 1/100 + 4/200 + 5/200 = 0.065000 = 6.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 100], [1, 100], [4, 200], [5, 200]], "utilization": 0.065}, "prompt_sha1": "695be222cb98cc84ba2961346a49e872badd47cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 101011000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101011000", "ones": 4, "parity": 0}, "prompt_sha1": "946a316d8e2360d43499e20aa42f956a4b328330", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1200 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1200-20-28 = 1152 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1200, "iphdr": 20, "tcphdr": 28, "mss": 1152}, "prompt_sha1": "4bf74fdc900fdd2e8a31c698d34516ccb1f86164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+48) = 0.769231 = 76.92%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 48, "efficiency": 0.7692307692307693}, "prompt_sha1": "ecb2fbb7001b681a68c7919bd1254e1a6131c019", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 39.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+8 = 47.5. Period = 47.5/20000000 = 2.375e-06 s. Maximum rate = 1/period = 421052.631579 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 39.5, "conv_cycles": 8, "period": 2.375e-06, "rate": 421052.63157894736}, "prompt_sha1": "b4d50f8984ff54d45a168371aca7cc18dca957bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 90.4% hit rate, and a 10 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.904 = 0.096.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.096×10 ns = 1.7100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.904, "penalty": 10, "result": 1.7099999999999997}, "prompt_sha1": "19e68a6142669c1ebdf642546ce0156dc93f2931", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/1000=0.0033 A. P=V²/R=3.3²/1000=0.01089 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 1000, "i": 0.0033, "p": 0.010889999999999999}, "prompt_sha1": "e6d5dd61e0c20dd7736ba15673557eeed7c7b71a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=2.2 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/22 = -0.100000.\nVout = A_v×Vin = -0.100000×0.05 = -0.005000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 2.2, "vin": 0.05, "gain": -0.1, "vout": -0.005000000000000001}, "prompt_sha1": "f120c438372f574be7be6ac6d38464e74729c5ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 25 and tail index 96, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (25-96) mod 128 = 57. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 25, "tail": 96, "occupancy": 57}, "prompt_sha1": "9595815814ce713c9e652acf987367f72a6e22ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['P', 'P', 'P', 'P', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'P', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 7 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["P", "P", "P", "P", "V", "V", "P", "P", "P", "P", "P", "P", "P", "V", "P", "V"], "value": 0, "blocked": 7}, "prompt_sha1": "1d5335524ad9cff88084ad088a21843dca790abd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 7 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 36 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+2 = 10. Total bits = 36×10 = 360. Time = 360/230400 = 0.0015625 s = 1.562500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 7, "parity": 0, "stop": 2, "frames": 36, "seconds": 0.0015625}, "prompt_sha1": "6ea68c4deb93046aa47518a16db0d69fb9e150b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_57` for a 57-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_57 (\n input logic [56:0] data,\n input logic [5:0] shamt,\n output logic [56:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_57", "width": 57, "direction": "left", "arithmetic": false}, "prompt_sha1": "8bc0e5d0e2e071fc15c31cd60a3dfe45efd67faa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/5000 = 24000.\nWith prescaler divisor limited to at most 64, the largest divisor of 24000 that also keeps the period count within 16 bits is 64.\nPeriod count = 24000/64 = 375.\nPSC register = 64-1 = 63.\nARR register = 375-1 = 374.\nVerification: 120000000/(64×375) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 5000, "total_division": 24000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 375, "psc_reg": 63, "arr_reg": 374}, "prompt_sha1": "95c751bf89f2631682f3449fa67d50d1aaeecb3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_6070` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_6070 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_6070", "width": 3}, "prompt_sha1": "060a0ed8e11bb31791a6a97d53bda423092f52bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.35.168.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.35.168.0\nBroadcast address: 10.35.168.15\nUsable host range: 10.35.168.1 to 10.35.168.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.35.168.0/28", "usable": 14, "first": "10.35.168.1", "last": "10.35.168.14", "broadcast": "10.35.168.15"}, "prompt_sha1": "e3a8ca3a7af24724a8c709c46bd04bedd5408aec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_307934` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_307934 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_307934"}, "prompt_sha1": "bf3e6b14d580fc86370b753bbb4c568bbc249e66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 21436 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 21436/2000000 s; frequency = 2000000/21436 = 93.300989 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 21436, "hz": 93.3009889904833}, "prompt_sha1": "ee37c3c474e6d45a88b329152d4a767745ead1ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 20% of instructions, the branch misprediction rate is 5%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.050 × 4 = 0.040000.\nEffective CPI = 1 + 0.040000 = 1.040000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.2, "mispred": 0.05, "penalty": 4, "result": 1.04}, "prompt_sha1": "d2f1371b59131468c41fdf3d5a24d08a0292e52f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 32-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/32 = 1024.\nOffset bits = log2(32) = 5.\nIndex bits = log2(1024) = 10.\nTag bits = 28-10-5 = 13.\nCheck: 13+10+5 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 32, "addr_bits": 28, "lines": 1024, "offset_bits": 5, "index_bits": 10, "tag_bits": 13}, "prompt_sha1": "6afb7c3062cd9d5b53529454a4e1730bbb840d0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 0.5 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×0.5/(1.2×10^9) = 0.208333333 s = 208.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 0.5, "ghz": 1.2, "sec": 0.20833333333333334}, "prompt_sha1": "7ccf59ac5c29ac908ee515b43c9bd28e815d5888", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=100 ms, C=4 ms,T=50 ms, C=2 ms,T=50 ms, C=1 ms,T=25 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/100 + 4/50 + 2/50 + 1/25 + 3/25 = 0.300000 = 30.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 100], [4, 50], [2, 50], [1, 25], [3, 25]], "utilization": 0.3}, "prompt_sha1": "26f75fe37b82c111822f81aedf3b88a08a5f161d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 10-bit left-shift register module `shiftreg_left_10`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `10-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_10 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [9:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[8:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_10", "width": 10, "direction": "left"}, "prompt_sha1": "249fc512171ac46d9d3c49bb923d3203631bbd41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 2113. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2113/4095 × 3 V = 1.547985 V.\nThus the estimated input is about 1.5480 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 2113, "volts": 1.5479853479853483}, "prompt_sha1": "8c29491e86a750de6b6c2013a1f942a25dd81559", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_17_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 17 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_17_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd17;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_17_ignore", "cycles": 17, "retrigger": false}, "prompt_sha1": "53b79958b621a12f6d871b8e9bd863c999e92c84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 16 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×2×10^6 = 32000000 B/s. Time = 4096/32000000 = 0.000128 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 16, "rate_mhz": 2, "sec": 0.000128}, "prompt_sha1": "ab56ee015b4087672a9b538c86e42bc2f69b992a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 2-way set-associative cache uses 64-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/64 = 256.\nSets = 256/2 = 128.\nOffset bits = log2(64) = 6; index bits = log2(128) = 7; tag bits = 36-6-7 = 23.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 64, "ways": 2, "addr_bits": 36, "lines": 256, "sets": 128, "offset": 6, "index": 7, "tag": 23}, "prompt_sha1": "b7a588907f1cdc7b6ec97a86bf86676eae30f7f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 8 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 56 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+1 = 11. Total bits = 56×11 = 616. Time = 616/2400 = 0.256666667 s = 256.666667 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 8, "parity": 1, "stop": 1, "frames": 56, "seconds": 0.25666666666666665}, "prompt_sha1": "a207798f1bc8088ed5c1586044bbb1ce5b8a70a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xA4F8A68AF3 in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: A4 F8 A6 8A F3.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 708546300659, "endian": "big", "bytes": [164, 248, 166, 138, 243]}, "prompt_sha1": "8bcff355a36571f24a4366ba5df311fe22ce94b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_33_12_9` with RED, GREEN, YELLOW states. Hold RED for 33 clock cycles, GREEN for 12, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_33_12_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 32) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 11) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_33_12_9", "red": 33, "green": 12, "yellow": 9}, "prompt_sha1": "59e3b8aa57e7308c8c746cad2b6982e19b1de8e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NNTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 0, 1, 0, 1], "final_state": 1}, "prompt_sha1": "984512312a3e0eb16affda4a29d31504c7ce82ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_51` for a synchronous sampled input `noisy`. Update output `clean` only after observing 51 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_51 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 50) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_51", "stable_samples": 51}, "prompt_sha1": "a437e9a3eb5dfc0000518af1f05a234585a55970", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111001000000 using generator polynomial bits 111001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 00000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 57, "msg_bits": 12, "msg": 3648, "remainder": 0}, "prompt_sha1": "2e50ad0061323d5a57ff9606637796d6451a1f3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1500 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-40-24 = 1436 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 40, "tcphdr": 24, "mss": 1436}, "prompt_sha1": "2b2bd817a8a2e5f0c840bdef46c02c56fed349bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2500 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2500×10^6×40/1000/8 = 12500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "rtt_ms": 40, "bytes": 12500000.0}, "prompt_sha1": "3d6004fd1f6c08303c8d7d3ae4a5ad19651702cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-20 = 980 bytes.\nRound down to an 8-byte multiple: floor((980)/8)×8 = 976 bytes.\nFragments required = ceil(5000/976) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 20, "payload": 5000, "max_payload": 976, "fragments": 6}, "prompt_sha1": "240e5ea6097206321302aa92ea625e82702b5ea8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.63. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.63) + 0.63/32) = 2.566159.\nThe theoretical speedup is about 2.566×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.63, "n": 32, "result": 2.566158781074579}, "prompt_sha1": "9e97a2f0275c12d50d860438bffe383201d0a5aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7331-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7331×8 = 58648 bits.\nSerialization delay = bits/rate = 58648/(10×10^6) s = 0.0058648 s = 5864.800000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7331, "rate_mbps": 10, "delay_s": 0.0058648}, "prompt_sha1": "6a47678d5f2f6712ca0a9fe478085a1421f70627", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock STATE then C; worker_2 acquires C then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds STATE while waiting for C, while worker_2 holds C while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "6e8b20cced4c317a0ea6152a6944e3194b7ae3a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.25 ns hit time, 93.8% hit rate, and a 75 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.938 = 0.062.\nAMAT = hit time + miss rate × miss penalty\n= 3.25 ns + 0.062×75 ns = 7.9000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.25, "hit_rate": 0.938, "penalty": 75, "result": 7.900000000000004}, "prompt_sha1": "65d8b988ce2f246ca6d02f2ae45bb9202698b697", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 63-bit left-shift register module `shiftreg_left_63`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `63-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_63 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [62:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[61:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_63", "width": 63, "direction": "left"}, "prompt_sha1": "7fbf00de7969cd601aa5518199376667ae2d2cd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 48784 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 48784/10000000 s; frequency = 10000000/48784 = 204.985241 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 48784, "hz": 204.9852410626435}, "prompt_sha1": "a0fdf21dddac8c05c225278714d725440c48f4f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 192 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 192/(192+40+8) = 0.800000 = 80.00%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 192, "iphdr": 40, "eff": 0.8}, "prompt_sha1": "96cf3372be1493ebfe24cd3bade37d9b0169dd1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["V", "V", "V", "P", "V", "V", "P"], "value": 8, "blocked": 0}, "prompt_sha1": "8bb2a9cb09e22379e963c848df4fa9cf5f9e0fee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0F, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x0F<<1)|0 = 0x1E = 00011110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 15, "rw": 0, "byte": 30}, "prompt_sha1": "c80de5a5c61dd9763427509c525fcd1a0f649b3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.228.169.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.228.169.0\nBroadcast address: 10.228.169.15\nUsable host range: 10.228.169.1 to 10.228.169.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.228.169.0/28", "usable": 14, "first": "10.228.169.1", "last": "10.228.169.14", "broadcast": "10.228.169.15"}, "prompt_sha1": "1c511e418afa4e1bab1ebc34bd2a0ba64603cfeb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10000 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/10000=0.0048 A. P=V²/R=48²/10000=0.2304 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 10000, "i": 0.0048, "p": 0.2304}, "prompt_sha1": "16be76a3933ad3a9789c9ac76ad7f5b8b06d3c40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9018` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9018 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9018"}, "prompt_sha1": "86bfd663a274beb2aef59ac5c7b214548264dc4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 16 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×100×10^6 = 1600000000 B/s. Time = 131072/1600000000 = 8.192e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 16, "rate_mhz": 100, "sec": 8.192e-05}, "prompt_sha1": "9fdf170758f81f979c90cceaf1d6403cf6e8e190", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 12 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×12)/(4700+12) = 11.969440 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 12, "req": 11.969439728353143}, "prompt_sha1": "b6b4562ea6044a72eddf468287b0cad853bc9759", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.5 ns hit time, 92.3% hit rate, and a 120 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.923 = 0.077.\nAMAT = hit time + miss rate × miss penalty\n= 3.5 ns + 0.077×120 ns = 12.7400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.5, "hit_rate": 0.923, "penalty": 120, "result": 12.739999999999995}, "prompt_sha1": "e49475adecaa006ef60d06cec5d58760fa32c64f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=100 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(100+10) = 0.454545 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 100, "r2": 10, "vout": 0.45454545454545453}, "prompt_sha1": "b50966e66f0fff15bed472183316e63492ef2419", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-40 = 1460 bytes.\nRound down to an 8-byte multiple: floor((1460)/8)×8 = 1456 bytes.\nFragments required = ceil(6000/1456) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 40, "payload": 6000, "max_payload": 1456, "fragments": 5}, "prompt_sha1": "1a2805042816854b76a9d9e41619114fa657c8bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 56-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^56/2^11 = 2^45 = 35184372088832 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 56, "page_exp": 11, "entries": 35184372088832}, "prompt_sha1": "aa6daa07980a59cba839d2f1af9c326c54b4d3d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 24-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^24/2^18 = 2^6 = 64 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 24, "page_exp": 18, "entries": 64}, "prompt_sha1": "88348430cfe6dadc1e835693d9b81ed252c6cf16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 200 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 200 = 30. Verification: 30/200 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 200, "duty": 15, "high": 30}, "prompt_sha1": "a4a87a1282bcd0a9a01550a2ab99dd6e0dd45cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.100.14.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.100.14.0\nBroadcast address: 10.100.14.15\nUsable host range: 10.100.14.1 to 10.100.14.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.100.14.0/28", "usable": 14, "first": "10.100.14.1", "last": "10.100.14.14", "broadcast": "10.100.14.15"}, "prompt_sha1": "75cf3cac8a34496115bc8b2c968b8c0f3ccb8e0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×5/1000/8 = 6250.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 5, "bytes": 6250.0}, "prompt_sha1": "d23f7fb0b10bf2839f739ee2d91676ca333044e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (256×8) = 48828125.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 256, "pps": 48828125.0}, "prompt_sha1": "bb27216f5df268cb62cae6b77233619298dbc34d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=22 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/4.7 = -4.680851.\nVout = A_v×Vin = -4.680851×0.05 = -0.234043 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 22, "vin": 0.05, "gain": -4.680851063829787, "vout": -0.23404255319148937}, "prompt_sha1": "a050bce966f53f32782439feee5f19753f5be386", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 16 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 16 = 18.\nClock pulses = 18×9 = 162.\nTime = 162/100000 s = 1620.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 16, "clocks": 162, "time_s": 0.00162}, "prompt_sha1": "1eae00cc6459a1886be0d414dcb3b065685a9ebe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 16 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 16×32 KiB = 512 KiB = 524288 bytes = 0.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 16, "page_kib": 32, "reach": 524288}, "prompt_sha1": "a3552d87236f92e955e33d483fb4b8f87ae4be65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w32_3325` implementing a dual-clock asynchronous FIFO with depth 64 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w32_3325 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 32,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w32_3325", "depth": 64, "width": 32, "ptr_w": 6}, "prompt_sha1": "ebf86c363f69e484ce87d6678c5ca81bb75f044c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 50-bit up/down counter `updown_50_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_50_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [49:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 50'd1125899906842623) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_50_sat", "width": 50, "wrap": false}, "prompt_sha1": "c4ee211d0de1e2edc4e086b72f28b4ff8583a095", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_3_17` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 3, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_3_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 2) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_3_17", "red": 28, "green": 3, "yellow": 17}, "prompt_sha1": "e2fb71452a0233e2b00e765ab9d44950e8d68031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 16-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/16 = 64.\nOffset bits = log2(16) = 4.\nIndex bits = log2(64) = 6.\nTag bits = 28-6-4 = 18.\nCheck: 18+6+4 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 16, "addr_bits": 28, "lines": 64, "offset_bits": 4, "index_bits": 6, "tag_bits": 18}, "prompt_sha1": "2f39d5e69ba934177f7955f30e1e0da6e32d9356", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w21_signed` comparing two 21-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w21_signed (\n input logic signed [20:0] a,\n input logic signed [20:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w21_signed", "width": 21, "signed": true}, "prompt_sha1": "da974af5ae407d86333399aef5241dc5b6b27461", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=22 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/4.7 = -4.680851.\nVout = A_v×Vin = -4.680851×0.25 = -1.170213 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 22, "vin": 0.25, "gain": -4.680851063829787, "vout": -1.1702127659574468}, "prompt_sha1": "51b9d3d1c7acff3f92aa5253c1793b49b83d1d3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.235.175.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.235.175.0\nBroadcast address: 10.235.175.7\nUsable host range: 10.235.175.1 to 10.235.175.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.235.175.0/29", "usable": 6, "first": "10.235.175.1", "last": "10.235.175.6", "broadcast": "10.235.175.7"}, "prompt_sha1": "7293dc58ef24afb3b5eac0e927a1c790657a6542", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4227480625, carries 41944 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 41944+0+1 = 41945. ACK = (4227480625+41945) mod 2^32 = 4227522570.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4227480625, "payload": 41944, "syn": 0, "fin": 1, "ack": 4227522570}, "prompt_sha1": "f2113fa8a5c4389031e457c921ae0380c088f5d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 956. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 956/4095 × 3 V = 0.700366 V.\nThus the estimated input is about 0.7004 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 956, "volts": 0.7003663003663003}, "prompt_sha1": "c255cc70abddc8f84b450ad6572c00797f131662", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 85%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.040×(6+0.150×120) = 1.760000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.96, "l2": 6, "l2_hit": 0.85, "mem": 120, "amat": 1.7600000000000011}, "prompt_sha1": "e1d3ad641dd7568dce360cfc0b0a12bcd5fe695e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m58` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 58 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m58 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd58;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m58", "width": 6, "max": 58}, "prompt_sha1": "1031177dface97d926ac80c6b9f2b2b6413f5e11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65489; x = x + 178;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65489+178 = 65667. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65667) mod 2^16 = 131. So `x` stores 131. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65489, "add": 178, "result": 131}, "prompt_sha1": "2a4a06504684fcee670ffa89cc82f50ce7468770", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.67. Using Amdahl's law, compute the theoretical speedup on 48 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.67) + 0.67/48) = 2.907329.\nThe theoretical speedup is about 2.907×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.67, "n": 48, "result": 2.9073288915808604}, "prompt_sha1": "910adc32e88d46f47fc048ea9e83618e488dd6a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=1800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×1800000×10^-12 s = 0.486 s.\nf_c=1/(2πRC)=1/(2π×270000×1800000×10^-12) = 0.3275 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 1.8e-06, "tau": 0.486, "fc": 0.3274793067734472}, "prompt_sha1": "12c48b4107dc526c863cb520ab35d4d0a43894e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_26_13_10` with RED, GREEN, YELLOW states. Hold RED for 26 clock cycles, GREEN for 13, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_26_13_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 25) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 12) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_26_13_10", "red": 26, "green": 13, "yellow": 10}, "prompt_sha1": "b86a0ad69266e7fc9e39e81b71ea9bdb471b827c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-40 = 8940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 40, "mss": 8940}, "prompt_sha1": "aeff96b6b321ea26b8022786b4b18f4bbdf49e3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=2200 nF and is stepped to 1.8 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1.8(1-e^-4)=1.767032 V; τ=0.0022 s and t=0.0088 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 2.2e-06, "multiple": 4, "vin": 1.8, "vc": 1.7670318500002784}, "prompt_sha1": "dfc144eacf99afaacc3fd81ba7b30c3e7d92cee0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_7357` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_7357 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_7357", "width": 10}, "prompt_sha1": "273e39e8aed6d917bbc3c3805655528515ca7e07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 1666 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×1666/(24×10^6) = 0.694166667 = 69.416667%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 10000, "cycles": 1666, "load": 0.6941666666666667}, "prompt_sha1": "7118f7872fa135cb9323c8d26c1e9691329a66cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-32 = 524 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 32, "mss": 524}, "prompt_sha1": "55274506986b8b1bbb5c31d4ea517fdf492cb2b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (256×8) = 2441406.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 256, "pps": 2441406.25}, "prompt_sha1": "5a905d3db1658d9f713ef4177af29a081eaaec5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967178; x = x + 430;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967178+430 = 4294967608. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967608) mod 2^32 = 312. So `x` stores 312. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967178, "add": 430, "result": 312}, "prompt_sha1": "07ffe84424f9cd5f2fcde0e91ec82594941f00c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_305042` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_305042 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_305042"}, "prompt_sha1": "9ae2d43ba119ac39ff78586c06b6221b1ab7b969", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 136, and period is 34667 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(136×34667) = 6.787265 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 136, "period": 34667, "hz": 6.7872650545780955}, "prompt_sha1": "7558a98f2e17521aa556f3f08c2bff05371e4780", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w64_unsigned` comparing two 64-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w64_unsigned (\n input logic [63:0] a,\n input logic [63:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w64_unsigned", "width": 64, "signed": false}, "prompt_sha1": "421235a3b6cf030bb35667e996c670f131a0fbbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 001010101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001010101", "ones": 4, "parity": 0}, "prompt_sha1": "7a832fa05974bd954e5d3f54ae9f21dc57374fb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000011011100010101100 using generator polynomial bits 11101001. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1101110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 233, "msg_bits": 22, "msg": 2209964, "remainder": 110}, "prompt_sha1": "8dc3ac91be92dc8e662c7fc1898d96465ab46c54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 49-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^49/2^10 = 2^39 = 549755813888 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 49, "page_exp": 10, "entries": 549755813888}, "prompt_sha1": "ad8bef166a1609a7295e74c53559cc890837a91b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_761479` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_761479 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_761479"}, "prompt_sha1": "f952d103e740c03c144d5632c4b97346ae7e3e34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_161` generating a one-clock-cycle `tick` every 161 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_161 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 160) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_161", "divide": 161}, "prompt_sha1": "cd4650480f9ea3c324770e3670e140c03936ef75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x71, toggle bit 2 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 2)`. Result = 0x75.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 113, "bit": 2, "op": "toggle", "result": 117}, "prompt_sha1": "2a0a91f96b0d21cb28ffc4acdbbdbe3c5e5ad495", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 812 and tail index 483, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (812-483) mod 1024 = 329. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 812, "tail": 483, "occupancy": 329}, "prompt_sha1": "b018f8c3a79bdc07969b0e72dafcb782cf1956ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x38. Extract the 2-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0x38 >> 1) & 0x3 = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 2, "lsb": 1, "value": 56, "mask": 3, "field": 0}, "prompt_sha1": "69fe8a6c8aee130f74862195fa6397bd4bbd7f5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x64_no_bypass` with 128 entries of 64 bits. Inputs: `clk`, `we`, `7-bit waddr`, `64-bit wdata`, `7-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x64_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [63:0] wdata,\n input logic [6:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x64_no_bypass", "entries": 128, "width": 64, "mode": "no_bypass"}, "prompt_sha1": "26d02f5b3050558964369cdd1a40b5680d64d019", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 32 payload bytes plus 16 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 32/(32+16) = 0.666667 = 66.67%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 32, "overhead": 16, "efficiency": 0.6666666666666666}, "prompt_sha1": "7670efd50e9f3b03a822ec5ee571ea1f7c029a06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 010110111011101001010000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 12 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "010110111011101001010000", "ones": 12, "parity": 0}, "prompt_sha1": "6baa17391bd19a29e794e5ece716abf7c95d4252", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_34_lsb` for `34-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_34_lsb (\n input logic [33:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 33; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_34_lsb", "width": 34, "priority": "low"}, "prompt_sha1": "e1a2db2ee4e8a641768d965397b0e88c7ef71a4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 998 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×998/(240×10^6) = 4.15833333e-05 = 0.004158%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 10, "cycles": 998, "load": 4.158333333333333e-05}, "prompt_sha1": "bc833977b54136e02d5569b08fba608bdd44588c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=2 ms,T=50 ms, C=3 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 2/50 + 3/10 = 0.465000 = 46.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [2, 50], [3, 10]], "utilization": 0.46499999999999997}, "prompt_sha1": "8978c43355507d997e5217b6c210c4d4926b248e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 97 and initial occupancy is 57. In an abstract batch, producer attempts to enqueue 89 items first, dropping any excess beyond capacity; then consumer removes up to 11 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=97, dropped=49; consumed=11; final occupancy=86.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 97, "start": 57, "prod": 89, "cons": 11, "dropped": 49, "consumed": 11, "final": 86}, "prompt_sha1": "82ac7d9154f7d510346d0f9c14641235da6e2b75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.2 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.2-2.6 = 3.6 V.\nI = V/R = 3.6/2700 A = 1.3333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.2, "vf": 2.6, "r": 2700, "current_a": 0.0013333333333333333}, "prompt_sha1": "055b5d1da8d28e4fcff806ff6bbf4472a7a67cb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=200 ms, C=3 ms,T=40 ms, C=5 ms,T=200 ms, C=3 ms,T=50 ms, C=4 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/200 + 3/40 + 5/200 + 3/50 + 4/10 = 0.580000 = 58.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 200], [3, 40], [5, 200], [3, 50], [4, 10]], "utilization": 0.5800000000000001}, "prompt_sha1": "49d8c7c6b691435be6006547b73c12b6f4a24718", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w41_nocin` implementing a 41-bit unsigned adder with inputs `a`, `b` and outputs `41-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w41_nocin (\n input logic [40:0] a,\n input logic [40:0] b,\n output logic [40:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w41_nocin", "width": 41, "cin": false}, "prompt_sha1": "83c753d7efcbb66f0bac51306908988ec128ccb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 344. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 344/1023 × 5 V = 1.681329 V.\nThus the estimated input is about 1.6813 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 344, "volts": 1.681329423264907}, "prompt_sha1": "186abc7f556643d2162eec6106fd323b5e450ef8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m3607` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 3607 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m3607 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd3607;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m3607", "width": 13, "max": 3607}, "prompt_sha1": "bcbba05cda2fba7dfdb8b39d5814883e8dc582c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=6800 ohm and C=220000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=6800×220000×10^-12 s = 0.001496 s.\nf_c=1/(2πRC)=1/(2π×6800×220000×10^-12) = 106.3870 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 6800, "c_f": 2.1999999999999998e-07, "tau": 0.001496, "fc": 106.3869940453846}, "prompt_sha1": "79444c7a4ee3aaa124f8db00e6e634b424ac57f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_8392` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_8392 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_8392", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "7bbe1b6c488c0fa4fe8f601b8883b4ed0f9eb465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_739426` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_739426 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_739426"}, "prompt_sha1": "1d2c831c05b4a69d1774866e3853f151474e35b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_75` for a synchronous sampled input `noisy`. Update output `clean` only after observing 75 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_75 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 74) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_75", "stable_samples": 75}, "prompt_sha1": "5b79adad0f92cca7cd0c1098748974bc00a76512", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.61. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.61) + 0.61/3) = 1.685393.\nThe theoretical speedup is about 1.685×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.61, "n": 3, "result": 1.6853932584269662}, "prompt_sha1": "0f9922e2e0aadfc755e2f44322aca8fb7de13176", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2113 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2113/(2113+40+8) = 0.977788 = 97.78%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2113, "iphdr": 40, "eff": 0.977788061082832}, "prompt_sha1": "5bea5135a335097e07e27bcae7f35847dc7bffef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 17.3 V source drives a 100 ohm resistor in series with an LED whose forward voltage is assumed to be 1.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 17.3-1.7 = 15.6 V.\nI = V/R = 15.6/100 A = 156.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 17.3, "vf": 1.7, "r": 100, "current_a": 0.15600000000000003}, "prompt_sha1": "d5d8a048176ab45dbe07d4cda69b191dadf9704a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1500 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 1500 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 1500}, "prompt_sha1": "6668dd20516254d399084d399f771b5a91d1c470", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 1, 0, 1], "final_state": 2}, "prompt_sha1": "a5020a551f67af30603bd75e0c0d2afd62e15edf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=220 nF and is stepped to 9 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=9(1-e^-5)=8.939358 V; τ=0.000484 s and t=0.00242 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 2.2e-07, "multiple": 5, "vin": 9, "vc": 8.93935847700823}, "prompt_sha1": "b58794aa46f3fb923a87f012d2567f52e37ac8d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 32 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 32 MHz / 8 = 4.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 32000000.0, "divider": 8, "spi_hz": 4000000.0}, "prompt_sha1": "356a65c4d72ab1d8c4e204700ad5d995c6412772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1000 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1000-20-24 = 956 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1000, "iphdr": 20, "tcphdr": 24, "mss": 956}, "prompt_sha1": "7df7f6117e0accf1d5d57dd69bd9078bc95a23a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `words` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `buf[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "c4f406b2eec333c7f46daa5fd87e43789f9bd81f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/680=0.0132352941 A. P=V²/R=9²/680=0.119117647 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 680, "i": 0.013235294117647059, "p": 0.11911764705882352}, "prompt_sha1": "9d728d0fc5f3ced7f18d7bc5253953c651b5636a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `n` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n acc += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `items[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n acc += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b7a3ef031ec28aad7f90b4ec9bd65663cdd046a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 390 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×390)/(470+390) = 213.139535 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 390, "req": 213.13953488372093}, "prompt_sha1": "c1791ab6e0c0f6c1e9bf46d79ad3ae3e61d5e04c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x16, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x16<<1)|1 = 0x2D = 00101101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 22, "rw": 1, "byte": 45}, "prompt_sha1": "e35e9658b6d57f4e8d220582d20695b99ff97c3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 925 and tail index 296, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (925-296) mod 1024 = 629. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 925, "tail": 296, "occupancy": 629}, "prompt_sha1": "e73c598ecf446865566ab35f7a6570e9a9fd79bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=1 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×47/(1+47) = 3.231250 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 1, "r2": 47, "vout": 3.2312499999999997}, "prompt_sha1": "8dd85d7606be4aae858fa49141c81814af2baccd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 1 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×8×10^6 = 8000000 B/s. Time = 1048576/8000000 = 0.131072 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 1, "rate_mhz": 8, "sec": 0.131072}, "prompt_sha1": "c7a63df8c54b7a23a17f4e0e72d383568462a7ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1263978311, carries 23318 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 23318+1+1 = 23320. ACK = (1263978311+23320) mod 2^32 = 1264001631.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1263978311, "payload": 23318, "syn": 1, "fin": 1, "ack": 1264001631}, "prompt_sha1": "2c80889958e83636371ac32991a2d8c76cef3d74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 5 V reference and returns code 36. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 36/255 × 5 V = 0.705882 V.\nThus the estimated input is about 0.7059 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 5.0, "code": 36, "volts": 0.7058823529411764}, "prompt_sha1": "2f6eff31af0575e671e66584b4ba0566bbaff2cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_24_53_16` with RED, GREEN, YELLOW states. Hold RED for 24 clock cycles, GREEN for 53, and YELLOW for 16; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_24_53_16 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 23) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 52) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 15) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_24_53_16", "red": 24, "green": 53, "yellow": 16}, "prompt_sha1": "f80e40d96f9a3f01792427ea759289a1076f9369", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m3829` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 3829 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m3829 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd3829;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m3829", "width": 12, "max": 3829}, "prompt_sha1": "04717ff99425cd00302bd8d7eee09b926b0e6b7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 4623 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×4623/(32×10^6) = 0.2889375 = 28.893750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 2000, "cycles": 4623, "load": 0.2889375}, "prompt_sha1": "d30e6e9572fcc943ce856b7392d3870af989ad69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_42` for a 42-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_42 (\n input logic [41:0] data,\n input logic [5:0] shamt,\n output logic [41:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_42", "width": 42, "direction": "left", "arithmetic": false}, "prompt_sha1": "129b1731bc14058b41bc8952d7fb4a7053bede8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=47000 ohm, C=22 nF and is stepped to 5 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=5(1-e^-1)=3.160603 V; τ=0.001034 s and t=0.001034 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 47000, "c": 2.2000000000000002e-08, "multiple": 1, "vin": 5, "vc": 3.1606027941427883}, "prompt_sha1": "a558069231f0458d0d0eb63576017b3de58f1829", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_2_32_10` with RED, GREEN, YELLOW states. Hold RED for 2 clock cycles, GREEN for 32, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_2_32_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 1) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 31) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_2_32_10", "red": 2, "green": 32, "yellow": 10}, "prompt_sha1": "44de8ff41ffaea466f76f88ee94308de39f894c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (1200×8) = 10416666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 1200, "pps": 10416666.666666666}, "prompt_sha1": "0cbd7564c7fe2f64f7c2960dbddab11b5f27f197", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(24×10^6) s = 21.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 512, "time_us": 21.333333333333336}, "prompt_sha1": "78a3a1771a8510abe15eb0a5fa7c055162c56615", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x3D2AD4 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 3D 2A D4.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 4008660, "endian": "big", "bytes": [61, 42, 212]}, "prompt_sha1": "a508ad7b8742931b566ee13b14b36524bd40290f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^11 V = 0.00048828125 V = 488.281250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 1.0, "step": 0.00048828125}, "prompt_sha1": "862cf8bcc8567610ed329dba8abd218517f9b0f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1929782756, carries 41554 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 41554+0+1 = 41555. ACK = (1929782756+41555) mod 2^32 = 1929824311.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1929782756, "payload": 41554, "syn": 0, "fin": 1, "ack": 1929824311}, "prompt_sha1": "b3e4d2d3039f4cf33cfce690960b265fe3fba046", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 19 and initial occupancy is 18. In an abstract batch, producer attempts to enqueue 86 items first, dropping any excess beyond capacity; then consumer removes up to 162 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=19, dropped=85; consumed=19; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 19, "start": 18, "prod": 86, "cons": 162, "dropped": 85, "consumed": 19, "final": 0}, "prompt_sha1": "98638b03bc62e11d4942a38f1100bd65b58533a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 12 and initial occupancy is 6. In an abstract batch, producer attempts to enqueue 46 items first, dropping any excess beyond capacity; then consumer removes up to 72 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=12, dropped=40; consumed=12; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 12, "start": 6, "prod": 46, "cons": 72, "dropped": 40, "consumed": 12, "final": 0}, "prompt_sha1": "b16caacab03713100c7950c1d94ef91f3cbc618c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [11, 8, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [23, 20, 12].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [11, 8, 4], "finish": [23, 20, 12]}, "prompt_sha1": "0e7de3228162dcb11ff6f6b68a080e307e1ca2a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_37` for a 37-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_37 (\n input logic [36:0] data,\n input logic [5:0] shamt,\n output logic [36:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_37", "width": 37, "direction": "left", "arithmetic": false}, "prompt_sha1": "6e72fd2216f572dc8232f88dc2cb350649940621", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.61. Using Amdahl's law, compute the theoretical speedup on 128 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.61) + 0.61/128) = 2.533149.\nThe theoretical speedup is about 2.533×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.61, "n": 128, "result": 2.5331486245794577}, "prompt_sha1": "f729001e74213ef8f8fc9d5de8e2957a8d75ba5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/200 = 720000.\nWith prescaler divisor limited to at most 32, the largest divisor of 720000 that also keeps the period count within 16 bits is 32.\nPeriod count = 720000/32 = 22500.\nPSC register = 32-1 = 31.\nARR register = 22500-1 = 22499.\nVerification: 144000000/(32×22500) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 200, "total_division": 720000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32, "period": 22500, "psc_reg": 31, "arr_reg": 22499}, "prompt_sha1": "7a375f535dd713a14cca0f4ad7c09be229c8c58c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×80/1000/8 = 10000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 80, "bytes": 10000.0}, "prompt_sha1": "eedfb9aea97d2e8654c8ad0a341b0029c64da6e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_55_lsb` for `55-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_55_lsb (\n input logic [54:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 54; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_55_lsb", "width": 55, "priority": "low"}, "prompt_sha1": "32cf150a2528c03941c1b4e3c420bf7a7bff8d20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=2.2 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×22/(2.2+22) = 8.181818 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 2.2, "r2": 22, "vout": 8.181818181818182}, "prompt_sha1": "8c95fb039b5491a86a57ac23f4f98c20bcdb2842", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xD25C. Extract the 2-bit field starting at bit 14 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xD25C >> 14) & 0x3 = 0x3 (3).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 2, "lsb": 14, "value": 53852, "mask": 3, "field": 3}, "prompt_sha1": "72caffb17ec26ec83b43d986a790e28f7f3581e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 56 and tail index 39, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (56-39) mod 128 = 17. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 56, "tail": 39, "occupancy": 17}, "prompt_sha1": "8ee0814fe29faa32fbf0a2e44fc43d9eee010a20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 35-bit left-shift register module `shiftreg_left_35`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `35-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_35 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [34:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[33:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_35", "width": 35, "direction": "left"}, "prompt_sha1": "c5c6c3673ade33a9cec23db9f5b74b6c2eb6bdef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1B3AF1 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: F1 3A 1B.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 1784561, "endian": "little", "bytes": [241, 58, 27]}, "prompt_sha1": "96732f4e210bd27778f09223a9739f868b92dabd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.79. Using Amdahl's law, compute the theoretical speedup on 5 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.79) + 0.79/5) = 2.717391.\nThe theoretical speedup is about 2.717×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.79, "n": 5, "result": 2.717391304347826}, "prompt_sha1": "78cd517c41a1b6a83fa9619461268890a2f34e23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 87, and period is 11691 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(87×11691) = 31.461474 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 87, "period": 11691, "hz": 31.461473950391156}, "prompt_sha1": "71f9f1435a92365221ea3b36f3d96fcbf8f52fcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6868(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6868(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6868([1, 2]) == 1.5\nassert mean_6868([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6868"}, "prompt_sha1": "2c7652583fb7a195f69e5deb6512b7d009be94e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 867 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×867/(32×10^6) = 0.0002709375 = 0.027094%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 10, "cycles": 867, "load": 0.0002709375}, "prompt_sha1": "624ae7895132fffe5e8e8662d49a9921558dde26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 4 MHz, prescaler divisor is 362, and period is 21708 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 4000000/(362×21708) = 0.509016 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 4000000, "prescaler": 362, "period": 21708, "hz": 0.5090162040218388}, "prompt_sha1": "b48580f568601659a21c40c46903ae9d0c4e50a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.001 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-09×100²=5e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-09, "v": 100, "energy": 5e-06}, "prompt_sha1": "8dfcf09854fa9c484a7653ed9c2efc6753dec435", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4172645811, carries 57682 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 57682+0+1 = 57683. ACK = (4172645811+57683) mod 2^32 = 4172703494.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4172645811, "payload": 57682, "syn": 0, "fin": 1, "ack": 4172703494}, "prompt_sha1": "59055b3de7536aa16360931623a1ed07be22f5eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 29507 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 29507/50000000 s; frequency = 50000000/29507 = 1694.513166 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 29507, "hz": 1694.5131663673026}, "prompt_sha1": "32c843e2fe114369a7e67fbf74432c7b3c6270c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 50-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^50/2^10 = 2^40 = 1099511627776 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 50, "page_exp": 10, "entries": 1099511627776}, "prompt_sha1": "2509d9f4f8f52f00e3a385302137a425bf5eda02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 24 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 24-13 = 11.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 24, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 11}, "prompt_sha1": "77527d4979f979861068dfc910c240414384bc58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 220 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (220×12000)/(220+12000) = 216.039280 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 220, "r2": 12000, "req": 216.0392798690671}, "prompt_sha1": "70df47711cce3e64215ba36bc4580806e15d6e7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/32 = 4096.\nOffset bits = log2(32) = 5.\nIndex bits = log2(4096) = 12.\nTag bits = 52-12-5 = 35.\nCheck: 35+12+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 32, "addr_bits": 52, "lines": 4096, "offset_bits": 5, "index_bits": 12, "tag_bits": 35}, "prompt_sha1": "00b779783c01352aec29e1c153412aeb5960a367", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w62_nocin` implementing a 62-bit unsigned adder with inputs `a`, `b` and outputs `62-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w62_nocin (\n input logic [61:0] a,\n input logic [61:0] b,\n output logic [61:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w62_nocin", "width": 62, "cin": false}, "prompt_sha1": "44d81df484d83f7c87ecccfe49fae024d2042289", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 95%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.040×(6+0.050×100) = 1.940000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.96, "l2": 6, "l2_hit": 0.95, "mem": 100, "amat": 1.9400000000000006}, "prompt_sha1": "3ad8672d445804a0c18fb91b6040bd11cdbb1283", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_43` for a 43-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_43 (\n input logic signed [42:0] data,\n input logic [5:0] shamt,\n output logic signed [42:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_43", "width": 43, "direction": "right", "arithmetic": true}, "prompt_sha1": "80e815020565226285c2eb6bdbfaa254be6d0e39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [18, 30, 9, 13]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [56, 70, 37, 50].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [18, 30, 9, 13], "finish": [56, 70, 37, 50]}, "prompt_sha1": "bff2d5570f0fa58e54efdd7268124adf806bf126", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×1²=2.35e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 1, "energy": 2.35e-06}, "prompt_sha1": "e549d199c48df3529a2543edbd47ee3315db9fec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'P', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "P", "P", "P", "V", "P"], "value": 2, "blocked": 0}, "prompt_sha1": "dcd584f7259a6619d260fd9ed01bd62812dfd28e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 125000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 125000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 125000.0}, "prompt_sha1": "3152bae4933cfb91a3fdab6b2d06bc626129cf64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1460 payload bytes plus 72 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1460/(1460+72) = 0.953003 = 95.30%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1460, "overhead": 72, "efficiency": 0.9530026109660574}, "prompt_sha1": "893e3bbbba8fb1619f4a9a40ad75dcc7c2038709", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 1 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×1/(3.5×10^9) = 0.142857143 s = 142.857143 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 1.0, "ghz": 3.5, "sec": 0.14285714285714285}, "prompt_sha1": "d08a1af0501529116868ca84c96447b682d3c892", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x48_no_bypass` with 128 entries of 48 bits. Inputs: `clk`, `we`, `7-bit waddr`, `48-bit wdata`, `7-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [47:0] wdata,\n input logic [6:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x48_no_bypass", "entries": 128, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "e8cd3a16694653b1348b64691f6dbb4e2ac8f47c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 15-bit up/down counter `updown_15_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_15_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [14:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_15_wrap", "width": 15, "wrap": true}, "prompt_sha1": "ca9ec416657507328a7cbbff8051f96c47f1c7ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=22 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/100 = -0.220000.\nVout = A_v×Vin = -0.220000×0.5 = -0.110000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 22, "vin": 0.5, "gain": -0.22, "vout": -0.11}, "prompt_sha1": "178831a738e4affcfd6a00da11ec7151dd8a8e30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_9344` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_9344 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_9344"}, "prompt_sha1": "c633920a5a4d9b50ee0a5e8b58973e749e62cea6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 65536 bytes over a datapath transferring 2 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×50×10^6 = 100000000 B/s. Time = 65536/100000000 = 0.00065536 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 65536, "width": 2, "rate_mhz": 50, "sec": 0.00065536}, "prompt_sha1": "61bf00417a751bab6be7875fe213fdfc76ce8b6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-28 = 3972 bytes.\nRound down to an 8-byte multiple: floor((3972)/8)×8 = 3968 bytes.\nFragments required = ceil(8000/3968) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 28, "payload": 8000, "max_payload": 3968, "fragments": 3}, "prompt_sha1": "214ba4fb8e65fddc82fdb4532435d8b636087acc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x2905 in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 05 29.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 10501, "endian": "little", "bytes": [5, 41]}, "prompt_sha1": "09a0473f7f5c71b151e03f962de3f36f7bc0e02a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 21722. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 21722/65535 × 5 V = 1.657282 V.\nThus the estimated input is about 1.6573 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 21722, "volts": 1.6572823682001983}, "prompt_sha1": "e0ed0a419c189d74ae8cf5421a28b80c7300b257", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=2.2 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/4.7 = -0.468085.\nVout = A_v×Vin = -0.468085×0.25 = -0.117021 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 2.2, "vin": 0.25, "gain": -0.46808510638297873, "vout": -0.11702127659574468}, "prompt_sha1": "c9008efc7c509497463b516ce14d90f4abe2966b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 80 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 80000000/(8×1000000) = 10.000000.\nNearest integer divisor D = 10.\nActual baud = 80000000/(8×10) = 1000000.000 baud.\nError = (1000000.000-1000000)/1000000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 80000000, "oversample": 8, "baud": 1000000, "divisor": 10, "actual": 1000000.0, "error_pct": 0.0}, "prompt_sha1": "9d86ecd65348619c0ae3702b6ed6abdc0c79e864", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1200 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1200-20-40 = 1140 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1200, "iphdr": 20, "tcphdr": 40, "mss": 1140}, "prompt_sha1": "e973ddca1db5fec55fbfeba6203e1bac8ea0545f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xDAF9, toggle bit 12 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 12)`. Result = 0xCAF9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 56057, "bit": 12, "op": "toggle", "result": 51961}, "prompt_sha1": "60e318d831c8eab5f3d017f805cc6e0acd41175c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 21 and initial occupancy is 21. In an abstract batch, producer attempts to enqueue 87 items first, dropping any excess beyond capacity; then consumer removes up to 77 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=21, dropped=87; consumed=21; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 21, "start": 21, "prod": 87, "cons": 77, "dropped": 87, "consumed": 21, "final": 0}, "prompt_sha1": "3fd822370e218573bab959f06574bcb2d60f3466", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_43041` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_43041 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_43041"}, "prompt_sha1": "b617b1234e0871490d0ba211e1b878233b595cec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11111100111110011011001011 using generator polynomial bits 11110111. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0101000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 247, "msg_bits": 26, "msg": 66315979, "remainder": 40}, "prompt_sha1": "029ce75f8cb88661764e2fc2a770090e1e29a235", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 828 elements. Review loop `for i in range(828+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(828+1)` includes index 828, which is out of range for a length-828 sequence. Correct loop: `for i in range(828):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 828, "variant": "one_past"}, "prompt_sha1": "7c4e864f52d3dbce79c3ceb2cea908fafa646d36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=2200 nF and is stepped to 1 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1(1-e^-0.5)=0.393469 V; τ=0.00022 s and t=0.00011 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 2.2e-06, "multiple": 0.5, "vin": 1, "vc": 0.3934693402873666}, "prompt_sha1": "7cc74e28dd414d5d449f9fc687372018d79b3c8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 40-bit up/down counter `updown_40_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_40_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [39:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 40'd1099511627775) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_40_sat", "width": 40, "wrap": false}, "prompt_sha1": "a8553075e42fc563d792f1ca291a8f5f911b3280", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7821` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7821 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7821"}, "prompt_sha1": "b6455ffc538f71f8fd7223db82da45af427caed0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 100 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×100×10^6×6 = 2.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 100, "channels": 6, "gbps": 2.4}, "prompt_sha1": "2d29b2411dfd5770821d7802a5d562521203b089", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 28783 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 28783/2000000 s; frequency = 2000000/28783 = 69.485460 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 28783, "hz": 69.48546016745996}, "prompt_sha1": "b07377ff874a9965cef7c658623cf24e4a734d1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_35_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 35 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_35_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd35;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_35_ignore", "cycles": 35, "retrigger": false}, "prompt_sha1": "be80ced0c7a4447434af23a03951a61f20101479", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1296 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1296-40-40 = 1216 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1296, "iphdr": 40, "tcphdr": 40, "mss": 1216}, "prompt_sha1": "6bcab7dc9303b76cc4a779e3326970ae881e282e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "3aaa011d60e474b95c8bf8358646aba13241342a", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "15e7b16062595428a36c705e50e36a334db074acfcbd9e50ca1452211f8ef137", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 2782, "original_row_sha256": "ca8de11f136c148f6a6d64b9b1a8c10d8740a9f5fcc7b5338e7c893438281836", "version": "v1.0.0-rc1"}}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 120 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 921600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 120000000/(8×921600) = 16.276042.\nNearest integer divisor D = 16.\nActual baud = 120000000/(8×16) = 937500.000 baud.\nError = (937500.000-921600)/921600×100% = 1.7253%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 120000000, "oversample": 8, "baud": 921600, "divisor": 16, "actual": 937500.0, "error_pct": 1.7252604166666667}, "prompt_sha1": "4263a49d72114cdfddbeadac31f1d59d9ee1b89d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 120 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×120)/(22000+120) = 119.349005 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 120, "req": 119.34900542495481}, "prompt_sha1": "f4926dbb22506e1b23f7b88806ad8111f1794fdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 214 elements. Review loop `for i in range(214+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(214+1)` includes index 214, which is out of range for a length-214 sequence. Correct loop: `for i in range(214):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 214, "variant": "one_past"}, "prompt_sha1": "81e6eec1604f3cb81bf906f9a2eab9924ef3c013", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=4700 nF and is stepped to 1 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1(1-e^-0.5)=0.393469 V; τ=0.0047 s and t=0.00235 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7e-06, "multiple": 0.5, "vin": 1, "vc": 0.3934693402873666}, "prompt_sha1": "90f54a57ef23a04bb83ba040d4805bfc9da19291", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/330=0.0363636364 A. P=V²/R=12²/330=0.436363636 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 330, "i": 0.03636363636363636, "p": 0.43636363636363634}, "prompt_sha1": "d0c2d89d258e6ad7c71369a29a940f413ec841d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_7_msb` for `7-bit in`. The highest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_7_msb (\n input logic [6:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 7; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_7_msb", "width": 7, "priority": "high"}, "prompt_sha1": "58aedc62df722b6de7ef523a39babd8ac348e9b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6B, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x6B<<1)|1 = 0xD7 = 11010111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 107, "rw": 1, "byte": 215}, "prompt_sha1": "d82e4a9c4f026e767843cef391c75fff07226f0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w32_9216` implementing a dual-clock asynchronous FIFO with depth 64 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w32_9216 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 32,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w32_9216", "depth": 64, "width": 32, "ptr_w": 6}, "prompt_sha1": "143c9ff574cd58c3d56f58d64439141dc43c8406", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.69. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.69) + 0.69/20) = 2.902758.\nThe theoretical speedup is about 2.903×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.69, "n": 20, "result": 2.9027576197387517}, "prompt_sha1": "fccd007f558921eebf4a3a1614dd05d233199d59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.19.25.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.19.25.0\nBroadcast address: 10.19.25.255\nUsable host range: 10.19.25.1 to 10.19.25.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.19.25.0/24", "usable": 254, "first": "10.19.25.1", "last": "10.19.25.254", "broadcast": "10.19.25.255"}, "prompt_sha1": "7db8733a60d2999bd4e115ff8652f0127ae4f64f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 300/1000 = 6e+09 bits = 7.5e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 300, "bits": 6000000000.0, "bytes": 750000000.0}, "prompt_sha1": "b2bd2e597feccdfa9c573a63e78f3c8d30b5de93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 9 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 38 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+2 = 12. Total bits = 38×12 = 456. Time = 456/9600 = 0.0475 s = 47.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 9, "parity": 0, "stop": 2, "frames": 38, "seconds": 0.0475}, "prompt_sha1": "c7193afadf0962e18444f1c33098f4e617bae454", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 50 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 50-10 = 40.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 50, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 40}, "prompt_sha1": "a9ac0c1c067bdefbf2d3b668e65db1cd9511caf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 86.7% hit rate, and a 60 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.867 = 0.133.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.133×60 ns = 9.4800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.867, "penalty": 60, "result": 9.48}, "prompt_sha1": "50d2fe0c5b85e426980681a9dc385f0a3701e4db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16 V source drives a 120 ohm resistor in series with an LED whose forward voltage is assumed to be 2.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16-2.1 = 13.9 V.\nI = V/R = 13.9/120 A = 115.8333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.0, "vf": 2.1, "r": 120, "current_a": 0.11583333333333333}, "prompt_sha1": "b794be0e7b26132a3b395d38a8a5402e2eb8243f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 80 MHz. Sampling consumes 19.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+12 = 31.5. Period = 31.5/80000000 = 3.9375e-07 s. Maximum rate = 1/period = 2539682.539683 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 80000000.0, "sample_cycles": 19.5, "conv_cycles": 12, "period": 3.9375e-07, "rate": 2539682.5396825396}, "prompt_sha1": "f366ae3b8896aecb9304f83aeb7cb939ff287956", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xC1D8. Extract the 4-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xC1D8 >> 2) & 0xF = 0x6 (6).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 4, "lsb": 2, "value": 49624, "mask": 15, "field": 6}, "prompt_sha1": "b5f960f16943d9637724feb29f89c1eca13f7531", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2537460281, carries 55681 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 55681+1+0 = 55682. ACK = (2537460281+55682) mod 2^32 = 2537515963.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2537460281, "payload": 55681, "syn": 1, "fin": 0, "ack": 2537515963}, "prompt_sha1": "cd9e416ea97de6c7e89083625672d6a8b6255b8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w14_nocin` implementing a 14-bit unsigned adder with inputs `a`, `b` and outputs `14-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w14_nocin (\n input logic [13:0] a,\n input logic [13:0] b,\n output logic [13:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w14_nocin", "width": 14, "cin": false}, "prompt_sha1": "3309cd7a3137b1c0a6c9e90423c457dfdecabae6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w64_cin` implementing a 64-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `64-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w64_cin (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic cin,\n output logic [63:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w64_cin", "width": 64, "cin": true}, "prompt_sha1": "611abcc29d0a7acaf32312c721985e0bdb19048b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7484 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7484/(7484+40+8) = 0.993627 = 99.36%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7484, "iphdr": 40, "eff": 0.9936271906532129}, "prompt_sha1": "a07d369c27897b9293c52974e1f251b68e88de88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x64_no_bypass` with 16 entries of 64 bits. Inputs: `clk`, `we`, `4-bit waddr`, `64-bit wdata`, `4-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x64_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [63:0] wdata,\n input logic [3:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x64_no_bypass", "entries": 16, "width": 64, "mode": "no_bypass"}, "prompt_sha1": "2f6d21d7e62ca82a46160d7d2b205bb5cea9637c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_58` for a 58-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_58 (\n input logic [57:0] data,\n input logic [5:0] shamt,\n output logic [57:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_58", "width": 58, "direction": "right", "arithmetic": false}, "prompt_sha1": "974a1c80b1be0fd318665f98e4178469e92ca8bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.5 V source drives a 180 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.5-2.9 = 3.6 V.\nI = V/R = 3.6/180 A = 20.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.5, "vf": 2.9, "r": 180, "current_a": 0.02}, "prompt_sha1": "b0b89a6f9d288295b5edc58cec253a9a17c7f27d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (64×8) = 4882812.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 64, "pps": 4882812.5}, "prompt_sha1": "2f783d7214db28b6d5e96ce9052db4aa73b08416", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'V', 'P', 'V', 'P', 'V', 'P', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 11 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "V", "P", "V", "P", "V", "P", "P", "P", "V", "V", "V", "P", "V", "V", "P", "V", "V", "V"], "value": 11, "blocked": 0}, "prompt_sha1": "9851ff0301557c4f8f6b9789a796434f17d2ce44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 97%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.010×(15+0.030×150) = 1.195000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.99, "l2": 15, "l2_hit": 0.97, "mem": 150, "amat": 1.1950000000000003}, "prompt_sha1": "28793075dc1e1e48ac3cc07df02ad62be079ede8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 36 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 512. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 36000000/500 = 72000.\nWith prescaler divisor limited to at most 512, the largest divisor of 72000 that also keeps the period count within 16 bits is 500.\nPeriod count = 72000/500 = 144.\nPSC register = 500-1 = 499.\nARR register = 144-1 = 143.\nVerification: 36000000/(500×144) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 36000000, "target_hz": 500, "total_division": 72000, "max_prescaler": 512, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 500, "period": 144, "psc_reg": 499, "arr_reg": 143}, "prompt_sha1": "3b8511134d3bfdf0c4538e5b8be04b433ea76b1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 36 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 76800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 36000000/(4×76800) = 117.187500.\nNearest integer divisor D = 117.\nActual baud = 36000000/(4×117) = 76923.077 baud.\nError = (76923.077-76800)/76800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 36000000, "oversample": 4, "baud": 76800, "divisor": 117, "actual": 76923.07692307692, "error_pct": 0.1602564102564088}, "prompt_sha1": "b2b580da28c972dfd868dbdf7ec32a65932491fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_30_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 30 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_30_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd30;\n end else begin\n if (pulse_in)\n count <= 5'd30;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_30_retrig", "cycles": 30, "retrigger": true}, "prompt_sha1": "0650cee008b849c1e7d2b87500d57b895408e13c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 128-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/128 = 8192.\nSets = 8192/4 = 2048.\nOffset bits = log2(128) = 7; index bits = log2(2048) = 11; tag bits = 48-7-11 = 30.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 128, "ways": 4, "addr_bits": 48, "lines": 8192, "sets": 2048, "offset": 7, "index": 11, "tag": 30}, "prompt_sha1": "5dfda11465e93f15854c36a68f02bfa49618ea07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 50 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 50000000/(8×250000) = 25.000000.\nNearest integer divisor D = 25.\nActual baud = 50000000/(8×25) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 50000000, "oversample": 8, "baud": 250000, "divisor": 25, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "22212c05a6b6b1e660d9a8f2cca1edb4966bf5ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 25 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 25 = 27.\nClock pulses = 27×9 = 243.\nTime = 243/1000000 s = 243.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 25, "clocks": 243, "time_s": 0.000243}, "prompt_sha1": "2146f35586880e403493c170eab0a37191614783", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 4 and tail index 5, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (4-5) mod 8 = 7. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 4, "tail": 5, "occupancy": 7}, "prompt_sha1": "aa2ccc9d67098bf1594942f8a692448ad02dbef3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8983` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8983 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8983"}, "prompt_sha1": "39b80bf7906a673672a2d359e844580a0c8ae782", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_4568` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_4568 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_4568", "width": 10}, "prompt_sha1": "e5ba1f823bba026632ff2d8d461ec80af713b9d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock DMA then RX; worker_2 acquires RX then DMA. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds DMA while waiting for RX, while worker_2 holds RX while waiting for DMA; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DMA before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "ef7ca41c7fec6c8092caacc426b32b08df34d49e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m41` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 41 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m41 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd41;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m41", "width": 7, "max": 41}, "prompt_sha1": "f188562105e2b5f1fa7bf46804b5c9a462fb1545", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 32 MHz and must generate an exact 2000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 32000000/2000 = 16000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 16000 that also keeps the period count within 16 bits is 16000.\nPeriod count = 16000/16000 = 1.\nPSC register = 16000-1 = 15999.\nARR register = 1-1 = 0.\nVerification: 32000000/(16000×1) = 2000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 32000000, "target_hz": 2000, "total_division": 16000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16000, "period": 1, "psc_reg": 15999, "arr_reg": 0}, "prompt_sha1": "17b8ff95bfc2e53fdfb9ac4f9c672d399c308be2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(24×10^6) s = 1.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 24, "time_us": 1.0}, "prompt_sha1": "defef2b67d25d7341ee1b3ece8d82a83a7ef93cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_60` for a synchronous sampled input `noisy`. Update output `clean` only after observing 60 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_60 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 59) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_60", "stable_samples": 60}, "prompt_sha1": "ffc75cc2cb66fc88e48c097ee763730ea1230e49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_790720` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_790720 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_790720"}, "prompt_sha1": "f4afd7f5f5e6b93fa8aafa111e1f89dae79ff834", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_48_lsb` for `48-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_48_lsb (\n input logic [47:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 47; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_48_lsb", "width": 48, "priority": "low"}, "prompt_sha1": "a21dc49518b2a7e397750cf88648db4bc90b88e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 11 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 11 = 14.\nClock pulses = 14×9 = 126.\nTime = 126/100000 s = 1260.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 11, "clocks": 126, "time_s": 0.00126}, "prompt_sha1": "864010fb595b099b461d55effce41cbe9573f3d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 64-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/64 = 64.\nOffset bits = log2(64) = 6.\nIndex bits = log2(64) = 6.\nTag bits = 64-6-6 = 52.\nCheck: 52+6+6 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 64, "addr_bits": 64, "lines": 64, "offset_bits": 6, "index_bits": 6, "tag_bits": 52}, "prompt_sha1": "e5a583c4c4a565bb343337004504c8d837738567", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10000 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10000×560)/(10000+560) = 530.303030 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10000, "r2": 560, "req": 530.3030303030303}, "prompt_sha1": "7d2b62c0346bbc8084d372e0c264da15cf296423", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 6` on one shared integer without synchronization. Assume `credits` initially equals 114. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 114; T2 reads 114; both compute 120; T1 writes 120; T2 writes 120. The observed final value is 120, but two serial increments would produce 126.\n\n```\nlock(mutex)\ncredits = credits + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "fdb87fe2b93c4c4729346c785e58252eecf9a248", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/1000 = 168000.\nWith prescaler divisor limited to at most 128, the largest divisor of 168000 that also keeps the period count within 16 bits is 125.\nPeriod count = 168000/125 = 1344.\nPSC register = 125-1 = 124.\nARR register = 1344-1 = 1343.\nVerification: 168000000/(125×1344) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 1000, "total_division": 168000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 1344, "psc_reg": 124, "arr_reg": 1343}, "prompt_sha1": "8c80408a149d3c386d3c3583d88275472c47e632", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 41-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^41/2^16 = 2^25 = 33554432 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 41, "page_exp": 16, "entries": 33554432}, "prompt_sha1": "7f1bc8989c32f2b35639093de36f4c7cee51c96c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=220 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/100 = -2.200000.\nVout = A_v×Vin = -2.200000×1 = -2.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 220, "vin": 1.0, "gain": -2.2, "vout": -2.2}, "prompt_sha1": "03f84075a6a360b16412862432c27f0ce5cc2b06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×270)/(150+270) = 96.428571 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 270, "req": 96.42857142857143}, "prompt_sha1": "31ef3d150b5fdcd300fab621d4d4ea15418b4ea3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 21084 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 21084/1000 s; frequency = 1000/21084 = 0.047429 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 21084, "hz": 0.0474293302978562}, "prompt_sha1": "9d69b0feb3e50c0ef63aa56c84d60f3d0b64a020", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-52 = 8928 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 52, "mss": 8928}, "prompt_sha1": "b8a20b5e6073ab594bae7974cc54bdf4cb69c634", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10000 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/10000=0.0005 A. P=V²/R=5²/10000=0.0025 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 10000, "i": 0.0005, "p": 0.0025}, "prompt_sha1": "137a35664727f7922b6473de557ef0dbdebf65c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 256-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/256 = 64.\nOffset bits = log2(256) = 8.\nIndex bits = log2(64) = 6.\nTag bits = 36-6-8 = 22.\nCheck: 22+6+8 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 256, "addr_bits": 36, "lines": 64, "offset_bits": 8, "index_bits": 6, "tag_bits": 22}, "prompt_sha1": "a1ee4ed204bffe6a81800d7f9b9d58aa08c39bc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 92%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(5+0.080×120) = 1.292000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 5, "l2_hit": 0.92, "mem": 120, "amat": 1.2920000000000003}, "prompt_sha1": "03d9259fec54c7ec202c93a4e8d950d4a7081576", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_74` for a synchronous sampled input `noisy`. Update output `clean` only after observing 74 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_74 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 73) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_74", "stable_samples": 74}, "prompt_sha1": "3653dbe6bf453ed3d63a854cf2171fd4a8b02bd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 180 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 180000000/4000 = 45000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 45000 that also keeps the period count within 16 bits is 1875.\nPeriod count = 45000/1875 = 24.\nPSC register = 1875-1 = 1874.\nARR register = 24-1 = 23.\nVerification: 180000000/(1875×24) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 180000000, "target_hz": 4000, "total_division": 45000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1875, "period": 24, "psc_reg": 1874, "arr_reg": 23}, "prompt_sha1": "aad0d859e7c36f9f96f8f63f110ae11ffb28d736", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.39.228.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.39.228.0\nBroadcast address: 10.39.228.3\nUsable host range: 10.39.228.1 to 10.39.228.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.39.228.0/30", "usable": 2, "first": "10.39.228.1", "last": "10.39.228.2", "broadcast": "10.39.228.3"}, "prompt_sha1": "ee36f2c765352fbc21f535c4c9217af0e5f06308", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6553 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6553/(6553+20+8) = 0.995745 = 99.57%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6553, "iphdr": 20, "eff": 0.9957453274578332}, "prompt_sha1": "27cbfad7c6d704e1b831f28dc645d48246736f9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 62-bit up/down counter `updown_62_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_62_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [61:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 62'd4611686018427387903) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_62_sat", "width": 62, "wrap": false}, "prompt_sha1": "ff7f0e0a6ba1c49846ad34894f2f99a26236b238", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m90` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 90 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m90 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd90;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m90", "width": 7, "max": 90}, "prompt_sha1": "205599d5e8e081913f9a0116ed803424d02b20ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 10. Apply operations ['P', 'V', 'V', 'V', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 10, "ops": ["P", "V", "V", "V", "V", "V", "P", "P"], "value": 12, "blocked": 0}, "prompt_sha1": "b54068f099233a69c4874c20927d22e1bf921d9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_42_msb` for `42-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_42_msb (\n input logic [41:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 42; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_42_msb", "width": 42, "priority": "high"}, "prompt_sha1": "8ffcf242541aaf5b7af42d8b7dd5b87b4bae9588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x32B5E521 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 32 B5 E5 21.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 850781473, "endian": "big", "bytes": [50, 181, 229, 33]}, "prompt_sha1": "5484541bf5b84141c3714cf4e6e436896cb4016d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_36` for a 36-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_36 (\n input logic signed [35:0] data,\n input logic [5:0] shamt,\n output logic signed [35:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_36", "width": 36, "direction": "right", "arithmetic": true}, "prompt_sha1": "60234e190f2aff091bff11d78bbc312d8da39dfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x4E, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x4E<<1)|0 = 0x9C = 10011100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 78, "rw": 0, "byte": 156}, "prompt_sha1": "49be4d9c29bfa01261023e8118335f8a2e6a00fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 85 and tail index 128, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (85-128) mod 512 = 469. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 85, "tail": 128, "occupancy": 469}, "prompt_sha1": "9ecd23757bc2a95e425eb0c8e4378c307534fe9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 8 and initial occupancy is 6. In an abstract batch, producer attempts to enqueue 158 items first, dropping any excess beyond capacity; then consumer removes up to 117 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=8, dropped=156; consumed=8; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 8, "start": 6, "prod": 158, "cons": 117, "dropped": 156, "consumed": 8, "final": 0}, "prompt_sha1": "7f6f04684dfb414967e201b7d3daa1a56097f486", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 60 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 60×13 = 780. Time = 780/1000000 = 0.00078 s = 0.780000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 9, "parity": 1, "stop": 2, "frames": 60, "seconds": 0.00078}, "prompt_sha1": "5dfd90ec38c8f3067ecac86864170667b683f798", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_3283` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_3283 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_3283"}, "prompt_sha1": "e97e1715935080d2434c809a77bc493cafb99b9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.87. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.87) + 0.87/2) = 1.769912.\nThe theoretical speedup is about 1.770×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.87, "n": 2, "result": 1.7699115044247788}, "prompt_sha1": "e3e4dcd5100b215ef35455334f925d6a82446f7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×64 KiB = 2048 KiB = 2097152 bytes = 2.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 64, "reach": 2097152}, "prompt_sha1": "3773ddad8f06ff5d0bfa294358865e375602c164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_27_11_8` with RED, GREEN, YELLOW states. Hold RED for 27 clock cycles, GREEN for 11, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_27_11_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 26) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 10) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_27_11_8", "red": 27, "green": 11, "yellow": 8}, "prompt_sha1": "587cc0b6225a2d2dabae2551c6723cce05344693", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 4-way set-associative cache uses 32-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/32 = 512.\nSets = 512/4 = 128.\nOffset bits = log2(32) = 5; index bits = log2(128) = 7; tag bits = 32-5-7 = 20.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 32, "ways": 4, "addr_bits": 32, "lines": 512, "sets": 128, "offset": 5, "index": 7, "tag": 20}, "prompt_sha1": "159023fc482f5996e95052f0f9dcf17629e50395", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m23` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 23 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m23 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd23;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m23", "width": 5, "max": 23}, "prompt_sha1": "aed555a4c174f1facde2ff1492ef659f280deb98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2724434790, carries 29933 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 29933+0+0 = 29933. ACK = (2724434790+29933) mod 2^32 = 2724464723.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2724434790, "payload": 29933, "syn": 0, "fin": 0, "ack": 2724464723}, "prompt_sha1": "8befa07bad42fe0a99c9815399345a37d4cc9466", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=18000 ohm and C=4700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=18000×4700×10^-12 s = 8.46e-05 s.\nf_c=1/(2πRC)=1/(2π×18000×4700×10^-12) = 1881.2641 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 18000, "c_f": 4.7e-09, "tau": 8.46e-05, "fc": 1881.2641027410796}, "prompt_sha1": "edce67f7fd7499a7e2d403f76c5009acaff972f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/47 = 4.68085106e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 47, "tau": 4.680851063829788e-06}, "prompt_sha1": "5ea2953ff836cf1766360f4e15206e7d80cfc900", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.224.14.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.224.14.0\nBroadcast address: 10.224.14.15\nUsable host range: 10.224.14.1 to 10.224.14.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.224.14.0/28", "usable": 14, "first": "10.224.14.1", "last": "10.224.14.14", "broadcast": "10.224.14.15"}, "prompt_sha1": "e46a9e7c904b923472d30b939097595e00747127", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w54_nocin` implementing a 54-bit unsigned adder with inputs `a`, `b` and outputs `54-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w54_nocin (\n input logic [53:0] a,\n input logic [53:0] b,\n output logic [53:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w54_nocin", "width": 54, "cin": false}, "prompt_sha1": "6a2330fb5b9e4d19f6fddfe051d52e2562a0511b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 800 counts per period. What compare/high-time count produces exactly 62.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.625 × 800 = 500. Verification: 500/800 = 0.625, which is 62.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 800, "duty": 62.5, "high": 500}, "prompt_sha1": "1df8fd953f6fd85a98f40c799d5b0fcdfc94809a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 40 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 40000000/400 = 100000.\nWith prescaler divisor limited to at most 32, the largest divisor of 100000 that also keeps the period count within 16 bits is 32.\nPeriod count = 100000/32 = 3125.\nPSC register = 32-1 = 31.\nARR register = 3125-1 = 3124.\nVerification: 40000000/(32×3125) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 40000000, "target_hz": 400, "total_division": 100000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32, "period": 3125, "psc_reg": 31, "arr_reg": 3124}, "prompt_sha1": "38047cd20fcd55be2eb1a56d2d591b15a8a3cad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 5600 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×5600)/(10+5600) = 9.982175 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 5600, "req": 9.98217468805704}, "prompt_sha1": "ad6d22edc6e0f67fc54f6786db0b8fa1c86a1ef8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 2` on one shared integer without synchronization. Assume `jobs` initially equals 428. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 428; T2 reads 428; both compute 430; T1 writes 430; T2 writes 430. The observed final value is 430, but two serial increments would produce 432.\n\n```\nlock(mutex)\njobs = jobs + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "d1d9151ad664e3b33350af002bf0eac4e884c615", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 13-bit right-shift register module `shiftreg_right_13`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `13-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_13 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [12:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[12:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_13", "width": 13, "direction": "right"}, "prompt_sha1": "b2d3d28133937e2f943c079418491b35ce36190f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.174.162.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.174.162.0\nBroadcast address: 10.174.162.127\nUsable host range: 10.174.162.1 to 10.174.162.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.174.162.0/25", "usable": 126, "first": "10.174.162.1", "last": "10.174.162.126", "broadcast": "10.174.162.127"}, "prompt_sha1": "23ec6ff2706a5888b76a74fea0d3cdc0522d5ef4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 940 and tail index 479, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (940-479) mod 1024 = 461. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 940, "tail": 479, "occupancy": 461}, "prompt_sha1": "fc8118428a35b13ad9526ee166f3046e5bdb57db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_79_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 79 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_79_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd79;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_79_ignore", "cycles": 79, "retrigger": false}, "prompt_sha1": "7cb5f9d8a7ff65ff89515d1dbfcb270155c21003", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_8` for a 8-bit unsigned input `data`, `3-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_8 (\n input logic [7:0] data,\n input logic [2:0] shamt,\n output logic [7:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_8", "width": 8, "direction": "right", "arithmetic": false}, "prompt_sha1": "0ba58a4e3d56757042f869cf92c266f021964e39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3 ns hit time, 94.7% hit rate, and a 160 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.947 = 0.053.\nAMAT = hit time + miss rate × miss penalty\n= 3 ns + 0.053×160 ns = 11.4800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.0, "hit_rate": 0.947, "penalty": 160, "result": 11.480000000000008}, "prompt_sha1": "75d9f4670b97678f4001f428324a6ca9b5b32226", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 762 elements. Review loop `for i in range(762+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(762+1)` includes index 762, which is out of range for a length-762 sequence. Correct loop: `for i in range(762):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 762, "variant": "one_past"}, "prompt_sha1": "0eba643a0f57603698f3277483ec02c006e812f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/47 = 0.000468085106 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 47, "tau": 0.0004680851063829787}, "prompt_sha1": "fcbacadc31f90121d6ed603ea8e0f663e5a6f158", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967256; x = x + 518;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967256+518 = 4294967774. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967774) mod 2^32 = 478. So `x` stores 478. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967256, "add": 518, "result": 478}, "prompt_sha1": "78df4474c4e40b2979df046aa71217b08e01156f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_123_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 123 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_123_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd123;\n end else begin\n if (pulse_in)\n count <= 7'd123;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_123_retrig", "cycles": 123, "retrigger": true}, "prompt_sha1": "05c1c99d4637ee301db23ce1251ff4d261f4f5a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 50 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 50×10^6 / (4096×8) = 1525.878906 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "frame_bytes": 4096, "pps": 1525.87890625}, "prompt_sha1": "a8f05db28864c47261244aeebd05080d251e7c96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (128×8) = 9765625.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 128, "pps": 9765625.0}, "prompt_sha1": "f5b567d2f366c80c29ec3d000a5c32d9296626c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 8 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 62 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+1 = 11. Total bits = 62×11 = 682. Time = 682/921600 = 0.000740017361 s = 0.740017 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 8, "parity": 1, "stop": 1, "frames": 62, "seconds": 0.0007400173611111111}, "prompt_sha1": "e68fd75ac94f919fb7356ee56dd284357c33196c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(8×10^6) s = 3.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 24, "time_us": 3.0}, "prompt_sha1": "c3c2405c656d234b57b65d1568b9c94c9a5b6d52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x5B, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x5B<<1)|0 = 0xB6 = 10110110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 91, "rw": 0, "byte": 182}, "prompt_sha1": "8dca0752e06942698c66c676d0bf05c9fd09f17d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_3070` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_3070 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_3070", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "65c1b8d589707ecf29bd937506344dc8ea78d818", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=220 nF and is stepped to 3.3 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=3.3(1-e^-3)=3.135703 V; τ=0.0001034 s and t=0.0003102 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 2.2e-07, "multiple": 3, "vin": 3.3, "vc": 3.135702674386049}, "prompt_sha1": "1559bc2e7a17f7e3806319c59a7fe1bd0d9732ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 12255 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 12255/5000000 s; frequency = 5000000/12255 = 407.996736 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 12255, "hz": 407.9967360261118}, "prompt_sha1": "179932240e6467023ba1b870b89b85a4c4531c4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5535(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5535(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5535([1, 2]) == 1.5\nassert mean_5535([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5535"}, "prompt_sha1": "13a8ccbbabca41cc0bcdd718b56dda2ca59cdebf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_56` generating a one-clock-cycle `tick` every 56 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_56 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 55) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_56", "divide": 56}, "prompt_sha1": "9ea902aa009c87467626aeca5a14879e872e875b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×32 KiB = 3072 KiB = 3145728 bytes = 3.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 32, "reach": 3145728}, "prompt_sha1": "81681fcd3d23afb05b98e5309112c45f0798b29a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=4.7 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(4.7+10) = 3.401361 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 4.7, "r2": 10, "vout": 3.4013605442176873}, "prompt_sha1": "76240de2d7ddec3e7b2c924ef19eac2cdce40a6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 390 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×390)/(47000+390) = 386.790462 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 390, "req": 386.7904621228107}, "prompt_sha1": "8c671fb1881d5addfecd14276a24c8f35e273083", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 8-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/32 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(32) = 5; index bits = log2(1024) = 10; tag bits = 57-5-10 = 42.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 32, "ways": 8, "addr_bits": 57, "lines": 8192, "sets": 1024, "offset": 5, "index": 10, "tag": 42}, "prompt_sha1": "5b4796c74938767234e75888d2194ba3f8442a56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 19-bit up/down counter `updown_19_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_19_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [18:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_19_wrap", "width": 19, "wrap": true}, "prompt_sha1": "230fcae42f4abbac5b4a7ae5a094cc1adebbc943", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `entries` elements of type `int`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n result += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `values[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n result += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "2befeae48fcc1b66c697c192c3ec91eeac13f2a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 1000000 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "65cce84f42a34f1a068ee0ca8c8576874268db9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 750 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 750 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 750.0}, "prompt_sha1": "7828fecce961d114e16164a7c965be307474a5ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5777 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5777/(5777+20+8) = 0.995177 = 99.52%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5777, "iphdr": 20, "eff": 0.9951765719207579}, "prompt_sha1": "6804903caac6013180c62f48af931428939d8017", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 1845 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×1845/(16×10^6) = 0.05765625 = 5.765625%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 500, "cycles": 1845, "load": 0.05765625}, "prompt_sha1": "3abe25b31cd2a7d46e484e882d784f62cc62b159", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3152` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3152 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3152"}, "prompt_sha1": "e09fe3a5d249449a4d499aedf145f471032ddca6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock BUF then CACHE; consumer acquires CACHE then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds BUF while waiting for CACHE, while consumer holds CACHE while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "f83ab19bb402cd5da01a22e1251306d2e3f473b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 878 elements. Review loop `for i in range(878-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(878-1)` produces indices 0 through 876, so index 877 is skipped. Correct loop: `for i in range(878):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 878, "variant": "miss_last"}, "prompt_sha1": "56dc17482e994a89bd721d0c3136be8d474deb0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x48_no_bypass` with 16 entries of 48 bits. Inputs: `clk`, `we`, `4-bit waddr`, `48-bit wdata`, `4-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [47:0] wdata,\n input logic [3:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x48_no_bypass", "entries": 16, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "c96884ee3f3760943dd2694f855ecc24e9329ad9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m1955` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 1955 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m1955 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd1955;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m1955", "width": 12, "max": 1955}, "prompt_sha1": "0c9cf2fbc6eb5dfb994037972a6c7712bdc603b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=56000 ohm and C=100000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=56000×100000×10^-12 s = 0.0056 s.\nf_c=1/(2πRC)=1/(2π×56000×100000×10^-12) = 28.4205 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 56000, "c_f": 1e-07, "tau": 0.0056, "fc": 28.42052555212417}, "prompt_sha1": "715299a3fae51d7d5db34c22e332171a71a52c53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 59-bit up/down counter `updown_59_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_59_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [58:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 59'd576460752303423487) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_59_sat", "width": 59, "wrap": false}, "prompt_sha1": "9e30021d0b8305fe0488121651f71ea90da35120", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 46-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^46/2^18 = 2^28 = 268435456 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 46, "page_exp": 18, "entries": 268435456}, "prompt_sha1": "7d46d9980c90e440454b997a1eb427b8340701da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 49 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 49×11 = 539. Time = 539/460800 = 0.00116970486 s = 1.169705 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 8, "parity": 0, "stop": 2, "frames": 49, "seconds": 0.0011697048611111112}, "prompt_sha1": "fd57c42f6868a39af3f603e9a60a5395de90e86f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 16-way set-associative cache uses 128-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/128 = 1024.\nSets = 1024/16 = 64.\nOffset bits = log2(128) = 7; index bits = log2(64) = 6; tag bits = 64-7-6 = 51.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 128, "ways": 16, "addr_bits": 64, "lines": 1024, "sets": 64, "offset": 7, "index": 6, "tag": 51}, "prompt_sha1": "838fee4d81aa3da69ab54659562037764604ba39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 48 MHz. Sampling consumes 79.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+12 = 91.5. Period = 91.5/48000000 = 1.90625e-06 s. Maximum rate = 1/period = 524590.163934 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 48000000.0, "sample_cycles": 79.5, "conv_cycles": 12, "period": 1.90625e-06, "rate": 524590.1639344263}, "prompt_sha1": "0e82ee7655e889471e1dcaf811c4d4486dbf6d9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 8 and initial occupancy is 0. In an abstract batch, producer attempts to enqueue 68 items first, dropping any excess beyond capacity; then consumer removes up to 199 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=8, dropped=60; consumed=8; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 8, "start": 0, "prod": 68, "cons": 199, "dropped": 60, "consumed": 8, "final": 0}, "prompt_sha1": "9754236335ea065eacde7af200d889ec9bd1da9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 200 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×200×10^6×3 = 3.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 200, "channels": 3, "gbps": 3.6}, "prompt_sha1": "626013a9add2e8712819bacd6b0ec9c242dd3c6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w38_cin` implementing a 38-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `38-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w38_cin (\n input logic [37:0] a,\n input logic [37:0] b,\n input logic cin,\n output logic [37:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w38_cin", "width": 38, "cin": true}, "prompt_sha1": "f6f47a31914875123a177d36fb3c33f18977e94e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 31133 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 31133/100000 s; frequency = 100000/31133 = 3.212026 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 31133, "hz": 3.2120258246876303}, "prompt_sha1": "e37cbd0d5a8c19b31eccf7d75b5651fb7c526d8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 8-way set-associative cache uses 128-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/128 = 512.\nSets = 512/8 = 64.\nOffset bits = log2(128) = 7; index bits = log2(64) = 6; tag bits = 64-7-6 = 51.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 128, "ways": 8, "addr_bits": 64, "lines": 512, "sets": 64, "offset": 7, "index": 6, "tag": 51}, "prompt_sha1": "3b392b016bcf603d5fed8dcc3d1c29ccd594c760", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_112_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 112 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_112_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd112;\n end else begin\n if (pulse_in)\n count <= 7'd112;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_112_retrig", "cycles": 112, "retrigger": true}, "prompt_sha1": "54c1390fbe9907fde0446f42278211bd80efdfae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 1280 = 384. Verification: 384/1280 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 30, "high": 384}, "prompt_sha1": "118a7162034dd2500ee7be226fd0aef7e28b1474", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 62 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 62×11 = 682. Time = 682/230400 = 0.00296006944 s = 2.960069 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 7, "parity": 1, "stop": 2, "frames": 62, "seconds": 0.0029600694444444444}, "prompt_sha1": "0347ec1582b578a6b869f01707128367505d63cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 4000 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×4000×10^6×6 = 144.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 4000, "channels": 6, "gbps": 144.0}, "prompt_sha1": "aa177138543028df422d18863996f78a53305f66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1969051630, carries 43775 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 43775+1+0 = 43776. ACK = (1969051630+43776) mod 2^32 = 1969095406.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1969051630, "payload": 43775, "syn": 1, "fin": 0, "ack": 1969095406}, "prompt_sha1": "a884c64552efb51e7dd8b0d1f4123f684a15fe59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(32×10^6) s = 2.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 64, "time_us": 2.0}, "prompt_sha1": "7cd7a40f6b599f7dd614c41c9e24cb726720bbaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50×10^6 × 0.5/1000 = 25000 bits = 3125 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50, "rtt_ms": 0.5, "bits": 25000.0, "bytes": 3125.0}, "prompt_sha1": "9894785b3af6d5114afdc0789ed348733d67b21e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11000101011100100110111 using generator polynomial bits 11100111. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1101101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 231, "msg_bits": 23, "msg": 6469943, "remainder": 109}, "prompt_sha1": "873264c256f2787d44c444f0f4a69f86ff91a4e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 8 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 8000000/(8×1200) = 833.333333.\nNearest integer divisor D = 833.\nActual baud = 8000000/(8×833) = 1200.480 baud.\nError = (1200.480-1200)/1200×100% = 0.0400%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 8000000, "oversample": 8, "baud": 1200, "divisor": 833, "actual": 1200.4801920768307, "error_pct": 0.0400160064025575}, "prompt_sha1": "0d10b5de09c9522033a158c7d83aac17dac7f4b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock IO then TX; consumer acquires TX then IO. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds IO while waiting for TX, while consumer holds TX while waiting for IO; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "57afa50d8b53744e7262c49906b19330c34ae50f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1 Mbit/s and RTT 30 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1×10^6 × 30/1000 = 30000 bits = 3750 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1, "rtt_ms": 30, "bits": 30000.0, "bytes": 3750.0}, "prompt_sha1": "7a57f91a5e0284ba86be90f24059e3d5c11a0b51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 330 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (330×56)/(330+56) = 47.875648 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 330, "r2": 56, "req": 47.87564766839379}, "prompt_sha1": "5e7c44d9125c26ebbce37928de187b48ccdc0395", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967102; x = x + 389;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967102+389 = 4294967491. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967491) mod 2^32 = 195. So `x` stores 195. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967102, "add": 389, "result": 195}, "prompt_sha1": "8fc8739976cf83ba7e0c3b1e12e5d608e31b2481", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x45F6ED9E, toggle bit 12 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 12)`. Result = 0x45F6FD9E.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 1173810590, "bit": 12, "op": "toggle", "result": 1173814686}, "prompt_sha1": "829c85ed81496cdebbb763e0be88db3644d25cce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_5031` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_5031 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_5031"}, "prompt_sha1": "bdba2ddfa7b6bec0a4a332f26d3c5d7265bb7b8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 24 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 24000000/4000 = 6000.\nWith prescaler divisor limited to at most 128, the largest divisor of 6000 that also keeps the period count within 16 bits is 125.\nPeriod count = 6000/125 = 48.\nPSC register = 125-1 = 124.\nARR register = 48-1 = 47.\nVerification: 24000000/(125×48) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 24000000, "target_hz": 4000, "total_division": 6000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 48, "psc_reg": 124, "arr_reg": 47}, "prompt_sha1": "167390087dc917c3a6efc5746961b968946bc904", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 80 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 80 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 80}, "prompt_sha1": "8abbc58e12bdb4759c8b8bd597ccea16e04a56ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [18, 2, 10]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [30, 12, 22].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [18, 2, 10], "finish": [30, 12, 22]}, "prompt_sha1": "a3dab5fd70ff8cd04d48d1e3b877358d90f45f84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_237` generating a one-clock-cycle `tick` every 237 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_237 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 236) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_237", "divide": 237}, "prompt_sha1": "2832a4e98041583006e46ac08df4c67a9c74ff0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 16-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/32 = 32768.\nSets = 32768/16 = 2048.\nOffset bits = log2(32) = 5; index bits = log2(2048) = 11; tag bits = 57-5-11 = 41.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 32, "ways": 16, "addr_bits": 57, "lines": 32768, "sets": 2048, "offset": 5, "index": 11, "tag": 41}, "prompt_sha1": "9ac1399ff7d84e1363d6cca3becdd773a056cf8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^11 V = 0.0048828125 V = 4882.812500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 10.0, "step": 0.0048828125}, "prompt_sha1": "51de084391316a448001b4f694880c33c5bd2f58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 17125. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 17125/65535 × 3 V = 0.783932 V.\nThus the estimated input is about 0.7839 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 17125, "volts": 0.7839322499427788}, "prompt_sha1": "2b25920ab110f99a9f2f76ef962c6e5337d579f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.220.226.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.220.226.0\nBroadcast address: 10.220.226.31\nUsable host range: 10.220.226.1 to 10.220.226.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.220.226.0/27", "usable": 30, "first": "10.220.226.1", "last": "10.220.226.30", "broadcast": "10.220.226.31"}, "prompt_sha1": "27d54ea151bf10be042cb5f06f2edbede36abfee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xB2320F0C. Extract the 2-bit field starting at bit 19 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xB2320F0C >> 19) & 0x3 = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 2, "lsb": 19, "value": 2989625100, "mask": 3, "field": 2}, "prompt_sha1": "f0e50f7e8dd524d47a30a3355e64d080ce76bebd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(10×10^6) s = 3.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 32, "time_us": 3.1999999999999997}, "prompt_sha1": "36a8bb54457361e65acd91d63e830d075214a3e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 28-bit up/down counter `updown_28_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_28_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [27:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 28'd268435455) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_28_sat", "width": 28, "wrap": false}, "prompt_sha1": "e489d91acce7967d14ce7a27d6e7bbff8f256a53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 40-bit left-shift register module `shiftreg_left_40`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `40-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_40 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [39:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[38:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_40", "width": 40, "direction": "left"}, "prompt_sha1": "34bfd87a7a666fb9afdda5b39b5bd8c701431fce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 4.9 V source drives a 1000 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 4.9-3 = 1.9 V.\nI = V/R = 1.9/1000 A = 1.9000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 4.9, "vf": 3.0, "r": 1000, "current_a": 0.0019000000000000004}, "prompt_sha1": "bdcd1fea951b503135b6f7dff79e532950a605a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(20×10^6) s = 3.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 64, "time_us": 3.1999999999999997}, "prompt_sha1": "fd13c2f41c8659c7ffffef4a69c7eaea45d4e489", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 36 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×36/(200×10^6) = 9e-06 = 0.000900%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 50, "cycles": 36, "load": 9e-06}, "prompt_sha1": "c063aaabc0e6d8351566c6e3a602802e1882dc64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 20 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 20 = 23.\nClock pulses = 23×9 = 207.\nTime = 207/400000 s = 517.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 20, "clocks": 207, "time_s": 0.0005175}, "prompt_sha1": "934a802b06a84b049c36d4ce86fc1fe61179203e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_9608` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_9608 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_9608", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "d19020fae9a09c10587d32e6aab787f6d36d9de6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1010010011 using generator polynomial bits 100001111. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11100110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 271, "msg_bits": 10, "msg": 659, "remainder": 230}, "prompt_sha1": "045b8bbc6fe6e5470f9c1641862d781c28bf7da4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (256×8) = 48828.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 256, "pps": 48828.125}, "prompt_sha1": "dfe106b9443778eed245d85b67d83f221d3fc37b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [6, 26, 7]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [14, 39, 21].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [6, 26, 7], "finish": [14, 39, 21]}, "prompt_sha1": "6adf463a7fc0e5f8a3087b9e009a96e51c7eb3d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_126_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 126 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_126_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd126;\n end else begin\n if (pulse_in)\n count <= 7'd126;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_126_retrig", "cycles": 126, "retrigger": true}, "prompt_sha1": "815370167f3794fe8751e7897bd9397de815b961", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4572` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4572 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4572"}, "prompt_sha1": "3e17edc673c9e4506af8db4b104151b441f0b8cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 2000 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×2000×10^6×4 = 256.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 2000, "channels": 4, "gbps": 256.0}, "prompt_sha1": "9742358c7abc929c35a753379776a714167b553c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 5000 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 5000/(5000+64) = 0.987362 = 98.74%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 5000, "overhead": 64, "efficiency": 0.9873617693522907}, "prompt_sha1": "35c7e1fbb292f45cd66bb63ca597c9cc8493f631", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2500 Mbit/s and RTT 8 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2500×10^6 × 8/1000 = 2e+07 bits = 2.5e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2500, "rtt_ms": 8, "bits": 20000000.0, "bytes": 2500000.0}, "prompt_sha1": "5ea60e69260874e940cd50159dee433b5c9e7a5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 1 bytes per beat at 200 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×200×10^6 = 200000000 B/s. Time = 8192/200000000 = 4.096e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 1, "rate_mhz": 200, "sec": 4.096e-05}, "prompt_sha1": "a5ae4a44675be5fe8c8b30cf6072d3d9131aed62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 21-bit ADC spanning 0 to 4.096 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.096/2^21 V = 1.953125e-06 V = 1.953125 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 21, "vref": 4.096, "step": 1.953125e-06}, "prompt_sha1": "4b6185ff456abe0c7bf8decf916dd506d2473d35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 1000 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×1000×10^6×3 = 12.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 1000, "channels": 3, "gbps": 12.0}, "prompt_sha1": "05e19ffbf6a9fcd3d84b66ebaeac40a5e55bc79e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x3314CD7B15 in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 33 14 CD 7B 15.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 219392342805, "endian": "big", "bytes": [51, 20, 205, 123, 21]}, "prompt_sha1": "8a585b094950d7228e7c157a16df0016c713bc6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 103 elements. Review loop `for i in range(103-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(103-1)` produces indices 0 through 101, so index 102 is skipped. Correct loop: `for i in range(103):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 103, "variant": "miss_last"}, "prompt_sha1": "5078436343f4dbac16bb373e250da2c1bbcd628e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8467(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8467(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8467([1, 2]) == 1.5\nassert mean_8467([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8467"}, "prompt_sha1": "e28f0fdc97818cc96eb550cdb5b6c0142d824951", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 2620 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×2620/(64×10^6) = 0.81875 = 81.875000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 20000, "cycles": 2620, "load": 0.81875}, "prompt_sha1": "7d30db7886db7bd47abe10b0cccc7ea8aedac405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 2-way set-associative cache uses 128-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/128 = 8192.\nSets = 8192/2 = 4096.\nOffset bits = log2(128) = 7; index bits = log2(4096) = 12; tag bits = 57-7-12 = 38.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 128, "ways": 2, "addr_bits": 57, "lines": 8192, "sets": 4096, "offset": 7, "index": 12, "tag": 38}, "prompt_sha1": "7a568733519def52587cb93948e7457634af857e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1400 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-40-32 = 1328 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 40, "tcphdr": 32, "mss": 1328}, "prompt_sha1": "f0ab3daee5d275fe8e4e50dea28b079c71fdbb44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_49` for a 49-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_49 (\n input logic [48:0] data,\n input logic [5:0] shamt,\n output logic [48:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_49", "width": 49, "direction": "left", "arithmetic": false}, "prompt_sha1": "235ff74a2ad4ebb47edfffb84b883b1dd84b7181", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xE9240909, set bit 31 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 31)`. Result = 0xE9240909.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3911452937, "bit": 31, "op": "set", "result": 3911452937}, "prompt_sha1": "1a01d2faba4e55c01e9563b49fdd03aa2004f13c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=12000 ohm and C=22000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=12000×22000×10^-12 s = 0.000264 s.\nf_c=1/(2πRC)=1/(2π×12000×22000×10^-12) = 602.8596 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 12000, "c_f": 2.2e-08, "tau": 0.00026399999999999997, "fc": 602.859632923846}, "prompt_sha1": "5ff3b861c898c8b79d12d0c4e80fb9b9a79b6a09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 3/1000 = 600000 bits = 75000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 3, "bits": 600000.0, "bytes": 75000.0}, "prompt_sha1": "19e4b9c4cba7491ed92d3e1aa65153cfdd85a6fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 1/1000 = 2.5e+07 bits = 3.125e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 1, "bits": 25000000.0, "bytes": 3125000.0}, "prompt_sha1": "c2eb737d160dfb3afbead8a6232d992c30395fc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `size` elements of type `int`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n sum += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `values[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n sum += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8dfa1e7522a2aff4b280532856127b411e7b0401", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'P', 'V', 'V', 'P', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 2 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "P", "V", "V", "P", "P", "P", "V"], "value": 0, "blocked": 2}, "prompt_sha1": "0deba683d9eccb4ab352158621331f2b66518f90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 30-bit up/down counter `updown_30_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_30_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [29:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 30'd1073741823) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_30_sat", "width": 30, "wrap": false}, "prompt_sha1": "d430fa5d47ae66e3dbfe0058cc6f278f62fa41ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 55-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^55/2^14 = 2^41 = 2199023255552 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 55, "page_exp": 14, "entries": 2199023255552}, "prompt_sha1": "fd9347fa9a8dd465c5ada281d9da84f92b22a96a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_6601` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_6601 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_6601"}, "prompt_sha1": "08a537decf7d8b262c95b322d9f564546cc9a77c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_87_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 87 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_87_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd87;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_87_ignore", "cycles": 87, "retrigger": false}, "prompt_sha1": "dff791e23606d6afa3ad93b62105dfc27aab691b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2916 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "724b108277b634a2a9a920218d1bd0b0e4f0ae8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 70%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.010×(6+0.300×100) = 2.360000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.99, "l2": 6, "l2_hit": 0.7, "mem": 100, "amat": 2.3600000000000003}, "prompt_sha1": "bae04e52c0e6d0a8b88a0b9d0a3df72e53b3f8dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 63 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 63×8 = 504. Time = 504/9600 = 0.0525 s = 52.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 5, "parity": 1, "stop": 1, "frames": 63, "seconds": 0.0525}, "prompt_sha1": "0984bde81480bdb6a5a0f7040a8d372a87636f74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 160 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 160 = 60. Verification: 60/160 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 160, "duty": 37.5, "high": 60}, "prompt_sha1": "1654ec6c387a5d751d35be1e8ec2ed4796240119", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 242. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 242; T2 reads 242; both compute 243; T1 writes 243; T2 writes 243. The observed final value is 243, but two serial increments would produce 244.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "0038c9b0ccd019b2b0bc0b88a65d2ae6d238750a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8479` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8479 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8479"}, "prompt_sha1": "dc5b787a13fda4e23f36240ebd5296dbc9244134", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 256 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 256/(256+8) = 0.969697 = 96.97%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 256, "overhead": 8, "efficiency": 0.9696969696969697}, "prompt_sha1": "1c9989f7be7fa66630809738a19503de0df6fb2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 25397 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 25397/50000000 s; frequency = 50000000/25397 = 1968.736465 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 25397, "hz": 1968.7364649368035}, "prompt_sha1": "7c00aaa8670732cf08f028e120ecc474cd9c4575", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_5660` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_5660 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_5660"}, "prompt_sha1": "62488e40ea803bdaa6fc2bf621b96e522626ba46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 17 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 17×8 = 136. Time = 136/115200 = 0.00118055556 s = 1.180556 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 5, "parity": 1, "stop": 1, "frames": 17, "seconds": 0.0011805555555555556}, "prompt_sha1": "5fd6882b33cc0f995d76dd49d6b4469266b35c0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `words` elements of type `float`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `table[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ab8606ecdc5f7d93b8182a85068d57dd61306753", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-24 = 532 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 24, "mss": 532}, "prompt_sha1": "654e7b7de1c6fe1a310d7a449c18316e7256adf7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 16 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×1×10^6 = 16000000 B/s. Time = 2048/16000000 = 0.000128 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 16, "rate_mhz": 1, "sec": 0.000128}, "prompt_sha1": "523bf4f4d0b712c12f489d9d5510d95e8e33d168", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 5.6 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 5.6-2.9 = 2.7 V.\nI = V/R = 2.7/330 A = 8.1818 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 5.6, "vf": 2.9, "r": 330, "current_a": 0.00818181818181818}, "prompt_sha1": "13a7281d10f5bb52d08a431ac524e63d29ceb657", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 25 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 25000000/(4×28800) = 217.013889.\nNearest integer divisor D = 217.\nActual baud = 25000000/(4×217) = 28801.843 baud.\nError = (28801.843-28800)/28800×100% = 0.0064%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 25000000, "oversample": 4, "baud": 28800, "divisor": 217, "actual": 28801.84331797235, "error_pct": 0.006400409626217475}, "prompt_sha1": "af15f20612666a4f604ceed44711aad007c94cfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 48-bit up/down counter `updown_48_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_48_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [47:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_48_wrap", "width": 48, "wrap": true}, "prompt_sha1": "2a355da4b11f77e76cf331e1373f40e736048310", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 90 and initial occupancy is 18. In an abstract batch, producer attempts to enqueue 128 items first, dropping any excess beyond capacity; then consumer removes up to 125 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=90, dropped=56; consumed=90; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 90, "start": 18, "prod": 128, "cons": 125, "dropped": 56, "consumed": 90, "final": 0}, "prompt_sha1": "3346ec4fbcc586c9d6a10173467309d165454692", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 45% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.45 × 1280 = 576. Verification: 576/1280 = 0.45, which is 45%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 45, "high": 576}, "prompt_sha1": "f6418605f916c7c4873fa8cc57f67d58715e7c2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1195-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1195×8 = 9560 bits.\nSerialization delay = bits/rate = 9560/(10000×10^6) s = 9.56e-07 s = 0.956000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1195, "rate_mbps": 10000, "delay_s": 9.56e-07}, "prompt_sha1": "9b8b7ecbedfa16d72fe4e56590e993874927c80c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 19.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+12 = 31.5. Period = 31.5/32000000 = 9.84375e-07 s. Maximum rate = 1/period = 1015873.015873 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 19.5, "conv_cycles": 12, "period": 9.84375e-07, "rate": 1015873.0158730159}, "prompt_sha1": "b99f4da6e9f926a3ab0da1394f5da25087ca7f2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×128 KiB = 3072 KiB = 3145728 bytes = 3.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 128, "reach": 3145728}, "prompt_sha1": "a0e37acb6fb85c12a4427e646dd389f75af1c930", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=200 ms, C=1 ms,T=200 ms, C=5 ms,T=40 ms, C=4 ms,T=40 ms, C=1 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/200 + 1/200 + 5/40 + 4/40 + 1/20 = 0.285000 = 28.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 200], [1, 200], [5, 40], [4, 40], [1, 20]], "utilization": 0.28500000000000003}, "prompt_sha1": "79ad52d1d84cbf011df4bd78463c0c667d21a149", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×20/1000/8 = 2500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 20, "bytes": 2500000.0}, "prompt_sha1": "68d81641f588c265632817103b9b5e6d6d1de4aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 32 KiB cache with 32-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0a5d06af801076a4a3ff48d2282f00547031e12c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_41_2` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 41, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_41_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 40) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_41_2", "red": 23, "green": 41, "yellow": 2}, "prompt_sha1": "7efee31eee0aaf99eaf6b385d2316f81eb66b9c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_228` generating a one-clock-cycle `tick` every 228 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_228 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 227) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_228", "divide": 228}, "prompt_sha1": "7140f860e2b57048a4bf38c3c2f18640ced76bdb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7334 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7334/(7334+40+8) = 0.993498 = 99.35%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7334, "iphdr": 40, "eff": 0.9934976971010566}, "prompt_sha1": "c8fd974a40d07d6314f93095e836b1e677534104", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.25 ns hit time, 94.5% hit rate, and a 155 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.945 = 0.055.\nAMAT = hit time + miss rate × miss penalty\n= 1.25 ns + 0.055×155 ns = 9.7750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.25, "hit_rate": 0.945, "penalty": 155, "result": 9.775000000000007}, "prompt_sha1": "53c256af9b3982aa59c73e250d9734f9234b8504", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2062 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2062/(2062+40+8) = 0.977251 = 97.73%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2062, "iphdr": 40, "eff": 0.9772511848341232}, "prompt_sha1": "a2ae85ea96808a14de8b22a3f23b60895837a58a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `entries` elements of type `float`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n acc += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `data[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n acc += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "cb2883ed06b1383be7c271aa65dba6cbeb0593bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_58_lsb` for `58-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_58_lsb (\n input logic [57:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 57; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_58_lsb", "width": 58, "priority": "low"}, "prompt_sha1": "e8b90969619bffe7c74c3a12682fb47b40482dcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 768 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 768/(768+28) = 0.964824 = 96.48%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 768, "overhead": 28, "efficiency": 0.964824120603015}, "prompt_sha1": "13882a7c606a2a0f87d256f19e6733a3632afb48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 57-bit left-shift register module `shiftreg_left_57`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `57-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_57 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [56:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[55:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_57", "width": 57, "direction": "left"}, "prompt_sha1": "4b573f6e9358c9112deb7f9e0a5f22587b6c5309", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 200 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 200 MHz / 4 = 50.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 200000000.0, "divider": 4, "spi_hz": 50000000.0}, "prompt_sha1": "7ba365b575505223171f3a8d7efd3f7457fda59a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 247.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+24 = 271.5. Period = 271.5/2000000 = 0.00013575 s. Maximum rate = 1/period = 7366.482505 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 247.5, "conv_cycles": 24, "period": 0.00013575, "rate": 7366.482504604052}, "prompt_sha1": "6bab682b9d8a0f29654f4f7528ee9f41b52baa7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_83` for a synchronous sampled input `noisy`. Update output `clean` only after observing 83 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_83 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 82) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_83", "stable_samples": 83}, "prompt_sha1": "07e76dd2b3a873457ca58c9db14d390a805b672a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 6 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 14 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+2 = 10. Total bits = 14×10 = 140. Time = 140/38400 = 0.00364583333 s = 3.645833 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 6, "parity": 1, "stop": 2, "frames": 14, "seconds": 0.0036458333333333334}, "prompt_sha1": "8cb82004974e6005d818c73d9bb9f0f4882687d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w37_unsigned` comparing two 37-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w37_unsigned (\n input logic [36:0] a,\n input logic [36:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w37_unsigned", "width": 37, "signed": false}, "prompt_sha1": "7666e79420565fcdfaef3197b07601cbaa8e32e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 98 and tail index 46, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (98-46) mod 128 = 52. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 98, "tail": 46, "occupancy": 52}, "prompt_sha1": "4e110ea0ec68857853e1334cd07f427330b3c8fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=20 ms, C=5 ms,T=100 ms, C=1 ms,T=20 ms, C=1 ms,T=100 ms, C=4 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/20 + 5/100 + 1/20 + 1/100 + 4/5 = 1.010000 = 101.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 20], [5, 100], [1, 20], [1, 100], [4, 5]], "utilization": 1.01}, "prompt_sha1": "598270b3ed39b11ea3820764373493091577f317", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/2200=0.00113636364 A. P=V²/R=2.5²/2200=0.00284090909 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 2200, "i": 0.0011363636363636363, "p": 0.002840909090909091}, "prompt_sha1": "dd3ddd235f952f4fef345016211f23b2c3c6ee63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 8-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^8 V = 0.0390625 V = 39062.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 8, "vref": 10.0, "step": 0.0390625}, "prompt_sha1": "31d80a571c21cab79c6fc222e9952832ba39b0b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 240 elements. Review loop `for i in range(240-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(240-1)` produces indices 0 through 238, so index 239 is skipped. Correct loop: `for i in range(240):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 240, "variant": "miss_last"}, "prompt_sha1": "9b53339a514b33bd8212afea74fbd58525906746", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(8×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 64, "time_us": 8.0}, "prompt_sha1": "a8ff06895eaa9d0033da07f62d59e31e09c7abd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `samples` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `data[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "a0290e2ddfb91c0f62de9b1e01514bf938425ab8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m29999` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 29999 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m29999 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd29999;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m29999", "width": 15, "max": 29999}, "prompt_sha1": "5301b3cc599deb4234363bb20c9fd4f43c4a96c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 100 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 100 MHz / 32 = 3.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 100000000.0, "divider": 32, "spi_hz": 3125000.0}, "prompt_sha1": "8df8c72792bf9fa1bad3d7f7d7345f15d87e4220", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 634 elements. Review loop `for i in range(634+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(634+1)` includes index 634, which is out of range for a length-634 sequence. Correct loop: `for i in range(634):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 634, "variant": "one_past"}, "prompt_sha1": "18a962fd2b7d912b84a1db5117d2938001304f9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 37-bit left-shift register module `shiftreg_left_37`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `37-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_37 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [36:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[35:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_37", "width": 37, "direction": "left"}, "prompt_sha1": "1bb443911207d6c2510e6d3f8c92869f72d240f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-24 = 1376 bytes.\nRound down to an 8-byte multiple: floor((1376)/8)×8 = 1376 bytes.\nFragments required = ceil(2000/1376) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 24, "payload": 2000, "max_payload": 1376, "fragments": 2}, "prompt_sha1": "849d6900aeff985b1a5a73492fdeafa4dd75a725", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=2.2 nF and is stepped to 5 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=5(1-e^-5)=4.966310 V; τ=2.2e-07 s and t=1.1e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 2.2000000000000003e-09, "multiple": 5, "vin": 5, "vc": 4.966310265004573}, "prompt_sha1": "2b2db32f6529c95c00866e439eac1d31caa830bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.71.210.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.71.210.0\nBroadcast address: 10.71.210.15\nUsable host range: 10.71.210.1 to 10.71.210.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.71.210.0/28", "usable": 14, "first": "10.71.210.1", "last": "10.71.210.14", "broadcast": "10.71.210.15"}, "prompt_sha1": "d85bb76d5dfe0cc073d9bf9db3f6e84ce7ddfa1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 360 elements. Review loop `for i in range(360+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(360+1)` includes index 360, which is out of range for a length-360 sequence. Correct loop: `for i in range(360):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 360, "variant": "one_past"}, "prompt_sha1": "cc6a01a4699c85953031e5c13f642491d1d0e2ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 83; x = x + 519;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 83+519 = 602. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (602) mod 2^8 = 90. So `x` stores 90. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 83, "add": 519, "result": 90}, "prompt_sha1": "b623868f5a1f928b609d3efab1032a18c79af989", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 01011001111010100110100001010001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 15 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01011001111010100110100001010001", "ones": 15, "parity": 1}, "prompt_sha1": "5469cd5bf06c0588458997f88569dcbf62966d51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 64-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/64 = 2048.\nOffset bits = log2(64) = 6.\nIndex bits = log2(2048) = 11.\nTag bits = 40-11-6 = 23.\nCheck: 23+11+6 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 64, "addr_bits": 40, "lines": 2048, "offset_bits": 6, "index_bits": 11, "tag_bits": 23}, "prompt_sha1": "c22e1f98e5c4f2435fb7c6085818b65ac7975276", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 00111000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00111000", "ones": 3, "parity": 1}, "prompt_sha1": "17e11e8dadfab2cc1a0d708d5d9124e6e218312e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w32_3612` implementing a dual-clock asynchronous FIFO with depth 4 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w32_3612 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 32,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w32_3612", "depth": 4, "width": 32, "ptr_w": 2}, "prompt_sha1": "ace689837e13f782f9ff012702b0044cd9a25409", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 256-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/256 = 512.\nOffset bits = log2(256) = 8.\nIndex bits = log2(512) = 9.\nTag bits = 36-9-8 = 19.\nCheck: 19+9+8 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 256, "addr_bits": 36, "lines": 512, "offset_bits": 8, "index_bits": 9, "tag_bits": 19}, "prompt_sha1": "20eb56ec77929d47d3cc92ffb443fdd9c0bade08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-24 = 3976 bytes.\nRound down to an 8-byte multiple: floor((3976)/8)×8 = 3976 bytes.\nFragments required = ceil(5000/3976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 24, "payload": 5000, "max_payload": 3976, "fragments": 2}, "prompt_sha1": "0618792ad5fab83d392ebc98983c3950c72e5f59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=47 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×100/(47+100) = 16.326531 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 47, "r2": 100, "vout": 16.3265306122449}, "prompt_sha1": "5567e35c379dd45559188de4dc9cec8b2fc98d38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3900 ohm and C=4700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3900×4700×10^-12 s = 1.833e-05 s.\nf_c=1/(2πRC)=1/(2π×3900×4700×10^-12) = 8682.7574 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3900, "c_f": 4.7e-09, "tau": 1.833e-05, "fc": 8682.757397266521}, "prompt_sha1": "d403de5fcaefe5cb242834d7186b5934af60f20a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 45-bit right-shift register module `shiftreg_right_45`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `45-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_45 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [44:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[44:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_45", "width": 45, "direction": "right"}, "prompt_sha1": "70c55b63e9aea3827e83ecf3449c4011237ba86d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/47 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 47, "tau": 9.999999999999999e-06}, "prompt_sha1": "3c06754b1c6e6d725095dd2a1892f1bd201ac9c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=4.7 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×2.2/(4.7+2.2) = 3.826087 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 4.7, "r2": 2.2, "vout": 3.8260869565217392}, "prompt_sha1": "ac4d55f82ef00d317240d4cec28c39d85dc850e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 533, and period is 5718 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(533×5718) = 52.498709 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 533, "period": 5718, "hz": 52.498708859878974}, "prompt_sha1": "a02ef7947f48bfc4a8ceac56877299220009b03a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 6 and tail index 6, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (6-6) mod 8 = 0. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 6, "tail": 6, "occupancy": 0}, "prompt_sha1": "c59ab2e190c035aea373500638eb03ee7a62580f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=1 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×1/(1+1) = 1.650000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 1, "r2": 1, "vout": 1.65}, "prompt_sha1": "dfc4bef6bc48e1db9ac55257266d99459c01aa83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 8 and tail index 109, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (8-109) mod 128 = 27. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 8, "tail": 109, "occupancy": 27}, "prompt_sha1": "b8feb784de162f15e791cce141a0e8a439e99351", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 60% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.6 × 1280 = 768. Verification: 768/1280 = 0.6, which is 60%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 60, "high": 768}, "prompt_sha1": "a62cc587e055c79d85fd4ea7aaa25a4a2cc2357f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 6 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 38 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+2 = 9. Total bits = 38×9 = 342. Time = 342/2400 = 0.1425 s = 142.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 6, "parity": 0, "stop": 2, "frames": 38, "seconds": 0.1425}, "prompt_sha1": "7f6d58e85659ba764b21cd671aab374977d0c637", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 309 elements. Review loop `for i in range(309-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(309-1)` produces indices 0 through 307, so index 308 is skipped. Correct loop: `for i in range(309):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 309, "variant": "miss_last"}, "prompt_sha1": "35058715ecfbea4380bd249afab7f50b3dbeea62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1600 counts per period. What compare/high-time count produces exactly 12.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.125 × 1600 = 200. Verification: 200/1600 = 0.125, which is 12.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1600, "duty": 12.5, "high": 200}, "prompt_sha1": "f88fea18f074b7e7064c7bfb18cd3ead918f83cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=10 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/4.7 = -2.127660.\nVout = A_v×Vin = -2.127660×1 = -2.127660 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 10, "vin": 1.0, "gain": -2.127659574468085, "vout": -2.127659574468085}, "prompt_sha1": "a0ef8f2fd1c0758efbeb7863392d021540462ee5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 200 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×200×10^6×6 = 76.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 200, "channels": 6, "gbps": 76.8}, "prompt_sha1": "f8ff78bc0a6e3739ef81437f7bbce7661028c6d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/10 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 10, "tau": 0.0001}, "prompt_sha1": "75ff8d19777c25fc65cabda1d24c3c33536c69cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/22 = 2.13636364e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 22, "tau": 2.1363636363636362e-05}, "prompt_sha1": "60a1688a92b2311066c495fcf70964aab3fd7444", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1011011000110110110 using generator polynomial bits 111001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 10101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 57, "msg_bits": 19, "msg": 373174, "remainder": 21}, "prompt_sha1": "b8d457d653806ddd19a4a594a5a8b130988c1434", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 240 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 240 = 168. Verification: 168/240 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 240, "duty": 70, "high": 168}, "prompt_sha1": "947336ba5fa7ef3ce3892ca2f6ef277266fa434f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xBD. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xBD >> 3) & 0xF = 0x7 (7).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 3, "value": 189, "mask": 15, "field": 7}, "prompt_sha1": "bf0da6d01298c29b221615bcd353691dc9880cd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x2B, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x2B<<1)|0 = 0x56 = 01010110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 43, "rw": 0, "byte": 86}, "prompt_sha1": "c6c72f487a136e38215bf847b3d14ff650061970", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x20_write_bypass` with 64 entries of 20 bits. Inputs: `clk`, `we`, `6-bit waddr`, `20-bit wdata`, `6-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x20_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [19:0] wdata,\n input logic [5:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x20_write_bypass", "entries": 64, "width": 20, "mode": "write_bypass"}, "prompt_sha1": "46f49fbfb79660cb405064ca17f3aea68b523974", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 8 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×100×10^6 = 800000000 B/s. Time = 262144/800000000 = 0.00032768 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 8, "rate_mhz": 100, "sec": 0.00032768}, "prompt_sha1": "a671560be01cb36cdd50b0e2167797ba813ea3e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xAF17CCE7. Extract the 6-bit field starting at bit 8 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xAF17CCE7 >> 8) & 0x3F = 0xC (12).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 8, "value": 2937572583, "mask": 63, "field": 12}, "prompt_sha1": "2a0c150d8baffaeec51493a57414dd11a81315ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 65536 bytes over a datapath transferring 4 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×80×10^6 = 320000000 B/s. Time = 65536/320000000 = 0.0002048 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 65536, "width": 4, "rate_mhz": 80, "sec": 0.0002048}, "prompt_sha1": "33bdddf30477a72651a63a9f7ed87e6a993391ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock BUF then RX; worker_2 acquires RX then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds BUF while waiting for RX, while worker_2 holds RX while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "a3280a1c22da8246a8fe71d355db879b456d44e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.53.102.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.53.102.0\nBroadcast address: 10.53.102.7\nUsable host range: 10.53.102.1 to 10.53.102.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.53.102.0/29", "usable": 6, "first": "10.53.102.1", "last": "10.53.102.6", "broadcast": "10.53.102.7"}, "prompt_sha1": "4db2614293002b63dd48df2af9028f3a2ffa8e79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2500 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2500×10^6×2/1000/8 = 625000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "rtt_ms": 2, "bytes": 625000.0}, "prompt_sha1": "8ed6631e2274a114f941289b7285a5cd2a31788c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_36` for a 36-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_36 (\n input logic [35:0] data,\n input logic [5:0] shamt,\n output logic [35:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_36", "width": 36, "direction": "left", "arithmetic": false}, "prompt_sha1": "98caef28c51be5a7c2ffeb18ed11c28ed7f834b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 635 elements. Review loop `for i in range(635-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(635-1)` produces indices 0 through 633, so index 634 is skipped. Correct loop: `for i in range(635):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 635, "variant": "miss_last"}, "prompt_sha1": "ad0ae80bf6b08c3f96096a7d142a2120bf218c2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "P", "V", "P", "V", "V", "V", "V", "V", "P", "P", "P", "P", "P", "V", "V", "P", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "8ba14547b21b455c626d1c0d1f4af0ef117e4765", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.89. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.89) + 0.89/192) = 8.723308.\nThe theoretical speedup is about 8.723×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.89, "n": 192, "result": 8.723307587460246}, "prompt_sha1": "0c0f777ccc19454b24da2866a8153b08acf859b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x0578 in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 78 05.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 1400, "endian": "little", "bytes": [120, 5]}, "prompt_sha1": "f62f3e6fb838cc81f2840bc4163302463f36b204", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 330 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (330×270)/(330+270) = 148.500000 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 330, "r2": 270, "req": 148.5}, "prompt_sha1": "fb9b0df168cf5a984f2d714e191d034a60a27589", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551486; x = x + 458;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551486+458 = 18446744073709551944. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551944) mod 2^64 = 328. So `x` stores 328. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551486, "add": 458, "result": 328}, "prompt_sha1": "3409e4a44f8927e185b895528b0820524c0ad7a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x69C0, set bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 8)`. Result = 0x69C0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 27072, "bit": 8, "op": "set", "result": 27072}, "prompt_sha1": "01dc9f402ea8796adecfa516907b5ffc9354fd88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9115(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9115(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9115([1, 2]) == 1.5\nassert mean_9115([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9115"}, "prompt_sha1": "bf461282060c36e72f4efaf16a2e1d683955eb66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=2.2 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/22 = -0.100000.\nVout = A_v×Vin = -0.100000×1 = -0.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 2.2, "vin": 1.0, "gain": -0.1, "vout": -0.1}, "prompt_sha1": "a1e855e44e4e5b489c015b49848ca5c8e4e7c738", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4933(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4933(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4933([1, 2]) == 1.5\nassert mean_4933([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4933"}, "prompt_sha1": "068e99c25a1b533bdc2f2b6a7e4703119d925d7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=4.7 nF and is stepped to 12 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=12(1-e^-0.5)=4.721632 V; τ=1.034e-05 s and t=5.17e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 4.700000000000001e-09, "multiple": 0.5, "vin": 12, "vc": 4.721632083448399}, "prompt_sha1": "ecc33468c234f8e0030080fbf540e9dd695f6c93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 10110100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "10110100", "ones": 4, "parity": 0}, "prompt_sha1": "520a96653d506ec1875e00eafc41ac87de056532", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 3551 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×3551/(400×10^6) = 8.8775e-05 = 0.008877%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 10, "cycles": 3551, "load": 8.8775e-05}, "prompt_sha1": "1b164220d1b90f3ab32bea942da0e42fa2c359c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'P', 'V', 'P', 'V', 'V', 'V', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "P", "V", "P", "V", "V", "V", "P", "V", "V", "P"], "value": 12, "blocked": 0}, "prompt_sha1": "2a8cced61a5fdc6807afe6180bd49753063755b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_35` for a synchronous sampled input `noisy`. Update output `clean` only after observing 35 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_35 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 34) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_35", "stable_samples": 35}, "prompt_sha1": "f002dccf8e4e23e3dddf0a5c46c7e756ee8efc3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TTNNNNTNTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1], "final_state": 2}, "prompt_sha1": "53dd10aee612a826471c4a75f798ede65e6a81ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=180000 ohm and C=4700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=180000×4700×10^-12 s = 0.000846 s.\nf_c=1/(2πRC)=1/(2π×180000×4700×10^-12) = 188.1264 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 180000, "c_f": 4.7e-09, "tau": 0.000846, "fc": 188.12641027410797}, "prompt_sha1": "de3fd5c8cadf562ac87ae51b4e7b43bc87fa24c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_27_msb` for `27-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_27_msb (\n input logic [26:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 27; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_27_msb", "width": 27, "priority": "high"}, "prompt_sha1": "fc1201cb223ac943f4cd0994e85323aa5d6de657", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x5FEF. Extract the 6-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x5FEF >> 4) & 0x3F = 0x3E (62).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 4, "value": 24559, "mask": 63, "field": 62}, "prompt_sha1": "410c00aab97e10826aa839e40a1b44ba30cc06a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=4.7 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×22/(4.7+22) = 7.415730 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 4.7, "r2": 22, "vout": 7.415730337078652}, "prompt_sha1": "17d0dce89b937e85b6a81ebe57000404bcca6a56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 4 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 4000000/(8×250000) = 2.000000.\nNearest integer divisor D = 2.\nActual baud = 4000000/(8×2) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 4000000, "oversample": 8, "baud": 250000, "divisor": 2, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "4b963e0158c40f991525b491492b11652b7ede2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 12-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^12 V = 0.00244140625 V = 2441.406250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 12, "vref": 10.0, "step": 0.00244140625}, "prompt_sha1": "012683169d177750c8924647a4cd11c0d3649206", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_190` generating a one-clock-cycle `tick` every 190 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_190 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 189) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_190", "divide": 190}, "prompt_sha1": "0e40588bd0a68d7acf575acf6a2fa1fff40fc427", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1000 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1000×10^6 / (64×8) = 1953125.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "frame_bytes": 64, "pps": 1953125.0}, "prompt_sha1": "5f1bb722b3058979988d44c309d7fed74543fc6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3313 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3313/(3313+40+8) = 0.985719 = 98.57%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3313, "iphdr": 40, "eff": 0.9857185361499554}, "prompt_sha1": "e2bdb71136f2eb7e305b864ec1a4ee6c85465cc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.96.104.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.96.104.0\nBroadcast address: 10.96.104.255\nUsable host range: 10.96.104.1 to 10.96.104.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.96.104.0/24", "usable": 254, "first": "10.96.104.1", "last": "10.96.104.254", "broadcast": "10.96.104.255"}, "prompt_sha1": "0f014f0ea00c6d5ed6a4dfc6ee3e26145a6f80a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 16 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×2×10^6 = 32000000 B/s. Time = 128/32000000 = 4e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 16, "rate_mhz": 2, "sec": 4e-06}, "prompt_sha1": "ba5f26d5016a3e918fa557649fbce919b22f4d3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/10=0.2 A. P=V²/R=2²/10=0.4 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 10, "i": 0.2, "p": 0.4}, "prompt_sha1": "d314182edb1d2e97f1292dcf5b30221aa7178e34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_21` for a synchronous sampled input `noisy`. Update output `clean` only after observing 21 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_21 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 20) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_21", "stable_samples": 21}, "prompt_sha1": "f093226fc53970c9727699a4a52150a31d547e4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 46-bit left-shift register module `shiftreg_left_46`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `46-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_46 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [45:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[44:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_46", "width": 46, "direction": "left"}, "prompt_sha1": "edfe3dbafe384b5cf3f2461a3e60394c3bb0ea7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w35_unsigned` comparing two 35-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w35_unsigned (\n input logic [34:0] a,\n input logic [34:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w35_unsigned", "width": 35, "signed": false}, "prompt_sha1": "500aa0317b08c4afeac602c431c2c15f4f7fe194", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 2000 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×2000×10^6×6 = 384.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 2000, "channels": 6, "gbps": 384.0}, "prompt_sha1": "90b1c512bb2bcdb1afd803dc62edc473d9c0b6c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4615` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4615 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4615"}, "prompt_sha1": "3d9eb8247071545e3135c6be267a312e3f0f0013", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_95` for a synchronous sampled input `noisy`. Update output `clean` only after observing 95 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_95 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 94) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_95", "stable_samples": 95}, "prompt_sha1": "fced29a06b6bf4d6e064bd41a9a11890797eee9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 43 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 43-13 = 30.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 43, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 30}, "prompt_sha1": "660abaa4c663d0b17d1ba115d8b7053f1e5f8366", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w15_unsigned` comparing two 15-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w15_unsigned (\n input logic [14:0] a,\n input logic [14:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w15_unsigned", "width": 15, "signed": false}, "prompt_sha1": "91cbabceda28af593f028aeb01ccb8d1f017ec0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_114_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 114 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_114_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd114;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_114_ignore", "cycles": 114, "retrigger": false}, "prompt_sha1": "a0ba8b3329021d61e17c840cf8cda71124dfd526", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=10 nF and is stepped to 1 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=1(1-e^-5)=0.993262 V; τ=1e-05 s and t=5e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 1e-08, "multiple": 5, "vin": 1, "vc": 0.9932620530009145}, "prompt_sha1": "dbfcbd1fb4475ecd66dc7f670ed7ff9e2dc9c904", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×40/1000/8 = 100000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 40, "bytes": 100000.0}, "prompt_sha1": "667fa91405f12cc2f9410516bb8b99050dcfbfc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 5600 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×5600×10^6×4 = 268.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 5600, "channels": 4, "gbps": 268.8}, "prompt_sha1": "77bea8f0b00ddc7f9f87acd9ec11cf9ccc410934", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 16 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×80×10^6 = 1280000000 B/s. Time = 256/1280000000 = 2e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 16, "rate_mhz": 80, "sec": 2e-07}, "prompt_sha1": "f3fb881f8dcd9d84d84843391808a04a0f7b2cab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 77 and initial occupancy is 51. In an abstract batch, producer attempts to enqueue 136 items first, dropping any excess beyond capacity; then consumer removes up to 145 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=77, dropped=110; consumed=77; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 77, "start": 51, "prod": 136, "cons": 145, "dropped": 110, "consumed": 77, "final": 0}, "prompt_sha1": "321f9849f11f06deb3cfad5cb2948fe3bf64c0d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 192 data bits per transfer at 2400 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 192/8 = 24. Bandwidth = 24×2400×10^6×3 = 172.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 192, "rate_mt": 2400, "channels": 3, "gbps": 172.8}, "prompt_sha1": "15f5e47e4269f7aa7b822f366d1f0ab0f96939fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w48_unsigned` comparing two 48-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w48_unsigned (\n input logic [47:0] a,\n input logic [47:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w48_unsigned", "width": 48, "signed": false}, "prompt_sha1": "c572dc9ded3a5614fb1bf3ccb3c43f04ce28c523", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 52-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^52/2^11 = 2^41 = 2199023255552 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 52, "page_exp": 11, "entries": 2199023255552}, "prompt_sha1": "9c46ba9cb46239c4379cc97c89e0665797b77631", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×0.5/1000/8 = 1562500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 0.5, "bytes": 1562500.0}, "prompt_sha1": "feaed5a545506e53419c1c4e88b1d557fdbe1ad1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-32 = 3968 bytes.\nRound down to an 8-byte multiple: floor((3968)/8)×8 = 3968 bytes.\nFragments required = ceil(5000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 32, "payload": 5000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "aa4696cfed0495eb9541328712f01dfed6239a4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (1024×8) = 24414.062500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 1024, "pps": 24414.0625}, "prompt_sha1": "ce85251ce8719df0524c4607e1f0ae1fdae077d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [5, 24, 2]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [5, 31, 15].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [5, 24, 2], "finish": [5, 31, 15]}, "prompt_sha1": "9997ca6a3379504111c006d9a623e4e173e10d7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 1 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×1/(1.2×10^9) = 0.0833333333 s = 83.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 1.0, "ghz": 1.2, "sec": 0.08333333333333333}, "prompt_sha1": "66f1a07d44e98bfb4f4959207756eddaff4e807a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 256-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/256 = 1024.\nOffset bits = log2(256) = 8.\nIndex bits = log2(1024) = 10.\nTag bits = 24-10-8 = 6.\nCheck: 6+10+8 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 256, "addr_bits": 24, "lines": 1024, "offset_bits": 8, "index_bits": 10, "tag_bits": 6}, "prompt_sha1": "2b22c1ad22e114665983178a9e8e746db506d2c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 16 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×100×10^6 = 1600000000 B/s. Time = 262144/1600000000 = 0.00016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 16, "rate_mhz": 100, "sec": 0.00016384}, "prompt_sha1": "5e62283bd77f504e2ed7f23898d2b720d6929229", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 500 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 500 = 100. Verification: 100/500 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 500, "duty": 20, "high": 100}, "prompt_sha1": "7698300e41857daf5dfce9217524728ba2a7cdb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w43_signed` comparing two 43-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w43_signed (\n input logic signed [42:0] a,\n input logic signed [42:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w43_signed", "width": 43, "signed": true}, "prompt_sha1": "571f41f5c132b50b50be12fea0638b23fb57baa5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [25, 19, 28, 8]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [76, 64, 80, 32].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [25, 19, 28, 8], "finish": [76, 64, 80, 32]}, "prompt_sha1": "0af4e64b3bdf60e310e57a01c81321927c4d3206", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 64-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/64 = 1024.\nOffset bits = log2(64) = 6.\nIndex bits = log2(1024) = 10.\nTag bits = 24-10-6 = 8.\nCheck: 8+10+6 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 64, "addr_bits": 24, "lines": 1024, "offset_bits": 6, "index_bits": 10, "tag_bits": 8}, "prompt_sha1": "cef7f3a6583692b1a326252e82dd53d1f42805e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [15, 16, 25, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [57, 59, 72, 63].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [15, 16, 25, 16], "finish": [57, 59, 72, 63]}, "prompt_sha1": "5fe5b8ac3b39f21a91e315f8c1aa0c06e1b8019d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w41_cin` implementing a 41-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `41-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w41_cin (\n input logic [40:0] a,\n input logic [40:0] b,\n input logic cin,\n output logic [40:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w41_cin", "width": 41, "cin": true}, "prompt_sha1": "b60dfd62a9611bae279bc1544c5b776d654f9716", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 32-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/32 = 256.\nOffset bits = log2(32) = 5.\nIndex bits = log2(256) = 8.\nTag bits = 64-8-5 = 51.\nCheck: 51+8+5 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 32, "addr_bits": 64, "lines": 256, "offset_bits": 5, "index_bits": 8, "tag_bits": 51}, "prompt_sha1": "6968fcc92e14419a392dc9f264c21497669e51ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/470 = 2.12765957e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 470, "tau": 2.1276595744680852e-05}, "prompt_sha1": "4b05fb7fbdb8313c56a4843d94e9a3858c39215f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xAA9D in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 9D AA.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 43677, "endian": "little", "bytes": [157, 170]}, "prompt_sha1": "8fa9a36ac1f9d0839c0b383ef4a209584a109db8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 400 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 400 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 400}, "prompt_sha1": "05fe09da95730a08b5c0e88c3e4b042ec549b4f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `size` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n result += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `data[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n result += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "d53da6ba626bd419eacfdd6b8a472edcc20d6297", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 81 and initial occupancy is 10. In an abstract batch, producer attempts to enqueue 61 items first, dropping any excess beyond capacity; then consumer removes up to 73 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=71, dropped=0; consumed=71; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 81, "start": 10, "prod": 61, "cons": 73, "dropped": 0, "consumed": 71, "final": 0}, "prompt_sha1": "29d544bd15380f00906847a81f363ac00b15ed62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5705 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5705/(5705+20+8) = 0.995116 = 99.51%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5705, "iphdr": 20, "eff": 0.9951159951159951}, "prompt_sha1": "5973ba4f153aeb0a5e964f2ea4a6379377355df1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 6400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×6400×10^6×4 = 153.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 6400, "channels": 4, "gbps": 153.6}, "prompt_sha1": "4423ff4267dd6a8a39c79c70511e31bdce82d4a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 49-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^49/2^18 = 2^31 = 2147483648 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 49, "page_exp": 18, "entries": 2147483648}, "prompt_sha1": "0e8642512621f7f798ce1ad024c94af3a3c16224", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 01010101111101010110110101110101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 20 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01010101111101010110110101110101", "ones": 20, "parity": 0}, "prompt_sha1": "7d9437f9551e42468ee1d9aaec3d26913bc69432", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.4 V source drives a 270 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.4-2.3 = 14.1 V.\nI = V/R = 14.1/270 A = 52.2222 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.4, "vf": 2.3, "r": 270, "current_a": 0.05222222222222221}, "prompt_sha1": "88af36c41885ba2bcf346ddf8ffc797ce0d1704d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 2000 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-20-20 = 1960 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 20, "tcphdr": 20, "mss": 1960}, "prompt_sha1": "53bcee3f6adf2aeaa5d615cdd7ad105bb929aef4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNNTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 0, 1, 0, 1], "final_state": 2}, "prompt_sha1": "b3d2b4510a4728b50604a47232fc35144a3f81e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 15%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.150 × 4 = 0.030000.\nEffective CPI = 1.2 + 0.030000 = 1.230000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.15, "penalty": 4, "result": 1.23}, "prompt_sha1": "2830b84aec8cded6acb874dfd9b2b61491d4d2ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 160.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+14 = 174.5. Period = 174.5/32000000 = 5.453125e-06 s. Maximum rate = 1/period = 183381.088825 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 160.5, "conv_cycles": 14, "period": 5.453125e-06, "rate": 183381.0888252149}, "prompt_sha1": "e065ed5dac4647a8b288aee7b0106ed1c0f4603e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (256×8) = 244140.625000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 256, "pps": 244140.625}, "prompt_sha1": "86b3bcfecc039cae98bcd693bb66a8e61c221472", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-28 = 8952 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 28, "mss": 8952}, "prompt_sha1": "f13272d1b4c31fa4560d9debb095ebdac4eb363b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×2048 KiB = 49152 KiB = 50331648 bytes = 48.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 2048, "reach": 50331648}, "prompt_sha1": "3bc62f6a68acfe97550752595b8fb1e3bf7e20e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6148(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6148(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6148([1, 2]) == 1.5\nassert mean_6148([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6148"}, "prompt_sha1": "d56d5ee0caa88a5f7e364c380820d937c22551e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_12_2_8` with RED, GREEN, YELLOW states. Hold RED for 12 clock cycles, GREEN for 2, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_12_2_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 11) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 1) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_12_2_8", "red": 12, "green": 2, "yellow": 8}, "prompt_sha1": "926eb815385955ba150b161ad55f82e8aa8fb3c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-32 = 1208 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 32, "mss": 1208}, "prompt_sha1": "c69568f71cb2b283d632ba9696c9b1b56cff5f66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m6` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 6 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m6 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd6;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m6", "width": 3, "max": 6}, "prompt_sha1": "3fbc2825dd4b1ef89809093dbf753a60c8e34f5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×48²=0.0025344 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 48, "energy": 0.0025344}, "prompt_sha1": "8fa3edc4df2d166cdc13c6b1bf2f17a2c353a7dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 22.7 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 22.7-2 = 20.7 V.\nI = V/R = 20.7/560 A = 36.9643 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 22.7, "vf": 2.0, "r": 560, "current_a": 0.03696428571428571}, "prompt_sha1": "954ad49b2537f5727d63c41d02308cdd28e7f16c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×560)/(680+560) = 307.096774 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 560, "req": 307.0967741935484}, "prompt_sha1": "fc05f0f41352098895f0e94b883f49b8cbed0573", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 100 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×100×10^6×3 = 0.300000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 100, "channels": 3, "gbps": 0.3}, "prompt_sha1": "353eaa91f11f1bbeb350e20bcb1eefda3e425b0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2928667059, carries 4758 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 4758+0+1 = 4759. ACK = (2928667059+4759) mod 2^32 = 2928671818.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2928667059, "payload": 4758, "syn": 0, "fin": 1, "ack": 2928671818}, "prompt_sha1": "b09f57a9806dc00d603b15776024d49590958944", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 9000 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-40-24 = 8936 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 40, "tcphdr": 24, "mss": 8936}, "prompt_sha1": "58bc4a1d5168cb2d9cb45cdbdbe449a4f00f9616", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/47000=0.000191489362 A. P=V²/R=9²/47000=0.00172340426 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 47000, "i": 0.00019148936170212765, "p": 0.0017234042553191488}, "prompt_sha1": "373076abe077f316c8c21535f0d116814058ea89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xB26B, toggle bit 3 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 3)`. Result = 0xB263.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 45675, "bit": 3, "op": "toggle", "result": 45667}, "prompt_sha1": "5f607bab993ac18ce45a890864f118d1f62c26a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w47_nocin` implementing a 47-bit unsigned adder with inputs `a`, `b` and outputs `47-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w47_nocin (\n input logic [46:0] a,\n input logic [46:0] b,\n output logic [46:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w47_nocin", "width": 47, "cin": false}, "prompt_sha1": "b8fe371284405bd91f410d291fced8ac54deca0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6971-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6971×8 = 55768 bits.\nSerialization delay = bits/rate = 55768/(1000×10^6) s = 5.5768e-05 s = 55.768000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6971, "rate_mbps": 1000, "delay_s": 5.5768e-05}, "prompt_sha1": "f5d9b85d6b0dc29391e424c710a2450a4819a916", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 4 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×100×10^6 = 400000000 B/s. Time = 8192/400000000 = 2.048e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 4, "rate_mhz": 100, "sec": 2.048e-05}, "prompt_sha1": "551f4bbf0a8d62b09036b1d0f5971a803f415f58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 128 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+128) = 0.916230 = 91.62%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 128, "efficiency": 0.9162303664921466}, "prompt_sha1": "fefe8ad7d5024e47d5db5b83783c8b09b1c73846", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE05C21F5CE0F15A8 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E0 5C 21 F5 CE 0F 15 A8.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 16166834101961037224, "endian": "big", "bytes": [224, 92, 33, 245, 206, 15, 21, 168]}, "prompt_sha1": "29157e4cc16c8f5e986d86105b6b93ca4d708998", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (1500×8) = 41666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 1500, "pps": 41666.666666666664}, "prompt_sha1": "93101ad279e6ea443e26e274269875ce045dfbaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=47000 ohm, C=2.2 nF and is stepped to 1 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1(1-e^-2)=0.864665 V; τ=0.0001034 s and t=0.0002068 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 47000, "c": 2.2000000000000003e-09, "multiple": 2, "vin": 1, "vc": 0.8646647167633873}, "prompt_sha1": "3fcb92b1f0930b45a3eabc396097c4b1573b9456", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_61_lsb` for `61-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_61_lsb (\n input logic [60:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 60; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_61_lsb", "width": 61, "priority": "low"}, "prompt_sha1": "3c7fbdbf9142aaf046fb8f269e5a0ebdc1cd9c9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 128 = 0.625000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 128, "spi_hz": 625000.0}, "prompt_sha1": "3a040c9e2008e428148e4fe563b3fcdc957eb739", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.71. Using Amdahl's law, compute the theoretical speedup on 12 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.71) + 0.71/12) = 2.863962.\nThe theoretical speedup is about 2.864×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.71, "n": 12, "result": 2.863961813842482}, "prompt_sha1": "7d15d4f71318fefaade88e6ee4a41f0c2556543e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x48A3413, clear bit 11 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 11)`. Result = 0x48A3413.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 76166163, "bit": 11, "op": "clear", "result": 76166163}, "prompt_sha1": "cc728eb86a899af17c22f2a34a72eb83a6f44457", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 52-bit up/down counter `updown_52_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_52_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [51:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_52_wrap", "width": 52, "wrap": true}, "prompt_sha1": "37ab785ee7d4c75da7891d4a6855b13a07a0fdc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(1×10^6) s = 16.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 16, "time_us": 16.0}, "prompt_sha1": "d16e1ae31822198dc6db0067b413bc3a13079fc9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.5 ns hit time, 90.9% hit rate, and a 130 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.909 = 0.091.\nAMAT = hit time + miss rate × miss penalty\n= 3.5 ns + 0.091×130 ns = 15.3300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.5, "hit_rate": 0.909, "penalty": 130, "result": 15.329999999999997}, "prompt_sha1": "5190109a4487456ae791d4f71bb79a860c322e62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_455056` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_455056 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_455056"}, "prompt_sha1": "2eb5fa0772620966820f8feae580e998a238a9d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 4880 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 4880/5000000 s; frequency = 5000000/4880 = 1024.590164 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 4880, "hz": 1024.5901639344263}, "prompt_sha1": "b2e430ad2ddc9f302265d600b5df48c147c3599c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_53` for a synchronous sampled input `noisy`. Update output `clean` only after observing 53 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_53 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 52) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_53", "stable_samples": 53}, "prompt_sha1": "8c64de9e5668eabd4cb4437c531a0397cf0970da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9804(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9804(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9804([1, 2]) == 1.5\nassert mean_9804([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9804"}, "prompt_sha1": "546f1807b1ddf693db05b71b39394e0a271458ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 49-bit up/down counter `updown_49_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_49_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [48:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_49_wrap", "width": 49, "wrap": true}, "prompt_sha1": "84f5d735e35ab7d7d803458e2cf4a34aecda1f27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 10101111110111001000111111101110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 22 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "10101111110111001000111111101110", "ones": 22, "parity": 0}, "prompt_sha1": "26885cc9448bac4ea42aea56874ff235f377cea1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_94` for a synchronous sampled input `noisy`. Update output `clean` only after observing 94 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_94 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 93) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_94", "stable_samples": 94}, "prompt_sha1": "732e2f0f0738c50a3a191f8166e3fef3aab45a6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 29 and tail index 30, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (29-30) mod 64 = 63. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 29, "tail": 30, "occupancy": 63}, "prompt_sha1": "e5f9460b816f31813aa8a08648fd12761a7b8249", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w29_unsigned` comparing two 29-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w29_unsigned (\n input logic [28:0] a,\n input logic [28:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w29_unsigned", "width": 29, "signed": false}, "prompt_sha1": "0ecce9b88e9fc68099348ec4d7945b5a43021e21", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 6 and tail index 5, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (6-5) mod 8 = 1. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 6, "tail": 5, "occupancy": 1}, "prompt_sha1": "3628db6570a38c0d0a0f9ffe299426c5252e4ec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 0.75 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×0.75/(2.5×10^9) = 0.0003 s = 0.300000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 0.75, "ghz": 2.5, "sec": 0.0003}, "prompt_sha1": "5b7dd6537c0d239d85e267c9770c5ecd8cbf8225", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xBEF2568D, set bit 50 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 50)`. Result = 0x40000BEF2568D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3203552909, "bit": 50, "op": "set", "result": 1125903110395533}, "prompt_sha1": "4d9fb75ba5c11e59e2cd2af5abd179a43d81a558", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 640 counts per period. What compare/high-time count produces exactly 62.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.625 × 640 = 400. Verification: 400/640 = 0.625, which is 62.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 640, "duty": 62.5, "high": 400}, "prompt_sha1": "737cafad4516119b41ee3b1de60a88e8e12ccb9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 120 and initial occupancy is 6. In an abstract batch, producer attempts to enqueue 31 items first, dropping any excess beyond capacity; then consumer removes up to 130 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=37, dropped=0; consumed=37; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 120, "start": 6, "prod": 31, "cons": 130, "dropped": 0, "consumed": 37, "final": 0}, "prompt_sha1": "4022571ad9e776227c0ba2c5ef47a55fdf164fda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 42 and initial occupancy is 22. In an abstract batch, producer attempts to enqueue 93 items first, dropping any excess beyond capacity; then consumer removes up to 189 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=42, dropped=73; consumed=42; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 42, "start": 22, "prod": 93, "cons": 189, "dropped": 73, "consumed": 42, "final": 0}, "prompt_sha1": "193ed0e440743252ad11bfc6047ea809e24e3f1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_9_10_17` with RED, GREEN, YELLOW states. Hold RED for 9 clock cycles, GREEN for 10, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_9_10_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 8) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 9) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_9_10_17", "red": 9, "green": 10, "yellow": 17}, "prompt_sha1": "8ee9559b3023ab8aee7c75a4014d4aa3b8f6f5ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10011011110 using generator polynomial bits 10001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 17, "msg_bits": 11, "msg": 1246, "remainder": 7}, "prompt_sha1": "c5e75321a2a4efed0495c27b3a335972776153bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x22, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x22<<1)|1 = 0x45 = 01000101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 34, "rw": 1, "byte": 69}, "prompt_sha1": "62573e3ec3e999a1645574c80aed50bc8cda36c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=20 ms, C=4 ms,T=200 ms, C=5 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/20 + 4/200 + 5/200 = 0.145000 = 14.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 20], [4, 200], [5, 200]], "utilization": 0.14500000000000002}, "prompt_sha1": "79fd4e67c99fb531990fd643f1fd4d142c061d97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 4 = 20.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 4, "spi_hz": 20000000.0}, "prompt_sha1": "aaddc5a20b1893374bfc210cdf123a061b6889a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 25 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 25000000/(16×250000) = 6.250000.\nNearest integer divisor D = 6.\nActual baud = 25000000/(16×6) = 260416.667 baud.\nError = (260416.667-250000)/250000×100% = 4.1667%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 25000000, "oversample": 16, "baud": 250000, "divisor": 6, "actual": 260416.66666666666, "error_pct": 4.1666666666666625}, "prompt_sha1": "20b413b95a6a25d723c363007209ea4e6eb06f14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 59 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 59 = 62.\nClock pulses = 62×9 = 558.\nTime = 558/100000 s = 5580.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 59, "clocks": 558, "time_s": 0.00558}, "prompt_sha1": "c0a0c85acb320c1314a91aabe0a73cb4617bfcd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1111000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1111000", "ones": 4, "parity": 0}, "prompt_sha1": "25c86b717cdc3019e38a1ca1d85593e200e000d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'P', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "P", "P", "V", "V", "P", "P", "V", "P", "V", "V", "P", "P", "V", "P", "P", "V", "V", "V", "V"], "value": 0, "blocked": 0}, "prompt_sha1": "14f9648e4e7b29cc5cd703a0e217f121b5aea6aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x711F0346 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 71 1F 03 46.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 1897857862, "endian": "big", "bytes": [113, 31, 3, 70]}, "prompt_sha1": "dfe27a4af4224abfe92b91f945e66823d3e53f80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.9 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.9-3 = 20.9 V.\nI = V/R = 20.9/330 A = 63.3333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.9, "vf": 3.0, "r": 330, "current_a": 0.06333333333333332}, "prompt_sha1": "2eaaa1c40c0b266dbb4931f89da5c52ff9aab247", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 2.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+8 = 10.5. Period = 10.5/10000000 = 1.05e-06 s. Maximum rate = 1/period = 952380.952381 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 2.5, "conv_cycles": 8, "period": 1.05e-06, "rate": 952380.9523809524}, "prompt_sha1": "e06871d42e78c466b3b4f41689503ea2e089c3e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.72. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.72) + 0.72/20) = 3.164557.\nThe theoretical speedup is about 3.165×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.72, "n": 20, "result": 3.1645569620253164}, "prompt_sha1": "fa97a811d5dbfc0acec9d4f9beadb0781c04a8f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×80/1000/8 = 50000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 80, "bytes": 50000.0}, "prompt_sha1": "83e50531d0a10497e3c9c52c4d1814e4970b6a29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1280 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-20-40 = 1220 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 20, "tcphdr": 40, "mss": 1220}, "prompt_sha1": "486af257f8bc2e354d9432395d72617094d4ed0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_514064` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_514064 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_514064"}, "prompt_sha1": "069494e72d918183a7998ccdef78e588a13baa4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 60 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 60/1000 = 1.5e+07 bits = 1.875e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 60, "bits": 15000000.0, "bytes": 1875000.0}, "prompt_sha1": "a0b74b3f738eb60766373c9b25fa59d0baf232b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 6862 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 6862/2000000 s; frequency = 2000000/6862 = 291.460216 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 6862, "hz": 291.4602156805596}, "prompt_sha1": "1c1f556beb912e05a8104908a6418ccaa4579b24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8590-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8590×8 = 68720 bits.\nSerialization delay = bits/rate = 68720/(1000×10^6) s = 6.872e-05 s = 68.720000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8590, "rate_mbps": 1000, "delay_s": 6.872e-05}, "prompt_sha1": "15a53d8b0859d0d286db6553563d4adff443bfb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w49_unsigned` comparing two 49-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w49_unsigned (\n input logic [48:0] a,\n input logic [48:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w49_unsigned", "width": 49, "signed": false}, "prompt_sha1": "9977204f7dfebe5700a087669ed2a9bde54dcf0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_3433` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_3433 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_3433", "width": 24}, "prompt_sha1": "ea720e1bdd63eff59cf208071d37b41399af9a61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 14 and tail index 0, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (14-0) mod 16 = 14. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 14, "tail": 0, "occupancy": 14}, "prompt_sha1": "e65f35d31f7675c97083fcb9a9ff203873c84414", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 1 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 1 = 3.\nClock pulses = 3×9 = 27.\nTime = 27/100000 s = 270.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 1, "clocks": 27, "time_s": 0.00027}, "prompt_sha1": "410a13bd710afddd1e11218648e40d047d35145c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 0.5 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×0.5/(3×10^9) = 0.000166666667 s = 0.166667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 0.5, "ghz": 3.0, "sec": 0.00016666666666666666}, "prompt_sha1": "7b8592837ab1f86d170162fcf449b661ccaa3c4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.60.203.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.60.203.0\nBroadcast address: 10.60.203.15\nUsable host range: 10.60.203.1 to 10.60.203.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.60.203.0/28", "usable": 14, "first": "10.60.203.1", "last": "10.60.203.14", "broadcast": "10.60.203.15"}, "prompt_sha1": "d447f02c2e344f06a72505ee4ca9bb5b0368ffb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 18-bit ADC spanning 0 to 3.6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.6/2^18 V = 1.37329101563e-05 V = 13.732910 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 18, "vref": 3.6, "step": 1.373291015625e-05}, "prompt_sha1": "b6f1f524f6d1753cbeed656fe692d2a8f5957cb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=47 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/47 = -1.000000.\nVout = A_v×Vin = -1.000000×1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 47, "vin": 1.0, "gain": -1.0, "vout": -1.0}, "prompt_sha1": "f6c10203c66fcdf90b52e8b5a6d089b181aadc06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 32 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 32-10 = 22.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 32, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 22}, "prompt_sha1": "fba8481a80622cb7f29fe845c97bb562e8d146ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 3194 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×3194/(16×10^6) = 0.0998125 = 9.981250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 500, "cycles": 3194, "load": 0.0998125}, "prompt_sha1": "74352378ce75b6d8d3d270891c95cbe535af63c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.77. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.77) + 0.77/6) = 2.790698.\nThe theoretical speedup is about 2.791×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.77, "n": 6, "result": 2.790697674418605}, "prompt_sha1": "4e01cd9c00a94d07c30b4f8d015eb61186e4d1c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 91.9% hit rate, and a 25 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.919 = 0.081.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.081×25 ns = 3.5250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.919, "penalty": 25, "result": 3.524999999999999}, "prompt_sha1": "811f199a41705fb1bb59008005190425f28400d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 121 and initial occupancy is 105. In an abstract batch, producer attempts to enqueue 24 items first, dropping any excess beyond capacity; then consumer removes up to 152 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=121, dropped=8; consumed=121; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 121, "start": 105, "prod": 24, "cons": 152, "dropped": 8, "consumed": 121, "final": 0}, "prompt_sha1": "10926b4181862fab60be1141a21526ed3102b83c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=40 ms, C=3 ms,T=100 ms, C=3 ms,T=200 ms, C=4 ms,T=40 ms, C=5 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/40 + 3/100 + 3/200 + 4/40 + 5/25 = 0.445000 = 44.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 40], [3, 100], [3, 200], [4, 40], [5, 25]], "utilization": 0.445}, "prompt_sha1": "5622b5ba20cbfa7ff172812a884dc73f73c25303", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 16-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/16 = 2048.\nOffset bits = log2(16) = 4.\nIndex bits = log2(2048) = 11.\nTag bits = 36-11-4 = 21.\nCheck: 21+11+4 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 16, "addr_bits": 36, "lines": 2048, "offset_bits": 4, "index_bits": 11, "tag_bits": 21}, "prompt_sha1": "9766d43ed7ccb8efb0b38e7b30df8ccbca9f95f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 3 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 3 = 6.\nClock pulses = 6×9 = 54.\nTime = 54/1000000 s = 54.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 3, "clocks": 54, "time_s": 5.4e-05}, "prompt_sha1": "5db22e6b2bf5bdb11039fe57eb0396852cc25fb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=22 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/2.2 = -10.000000.\nVout = A_v×Vin = -10.000000×0.5 = -5.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 22, "vin": 0.5, "gain": -10.0, "vout": -5.0}, "prompt_sha1": "1302cc01a8072dd7cb955217ae8ac6f7399b7684", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_4752` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_4752 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_4752"}, "prompt_sha1": "e4e8b8c71e465ae9a5ab651b47e30a8ef1311ca0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 28-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^28/2^15 = 2^13 = 8192 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 28, "page_exp": 15, "entries": 8192}, "prompt_sha1": "85b4aa8aaa625f52b22ca96bb7ec9af8190f6965", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=47 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/2.2 = -21.363636.\nVout = A_v×Vin = -21.363636×0.05 = -1.068182 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 47, "vin": 0.05, "gain": -21.363636363636363, "vout": -1.0681818181818181}, "prompt_sha1": "15b9ec6102d284919b4721165e6c151a913be617", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×512 KiB = 24576 KiB = 25165824 bytes = 24.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 512, "reach": 25165824}, "prompt_sha1": "94c4157945acd054e863b97fbe0e745b3fc74b31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 16-way set-associative cache uses 64-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/64 = 8192.\nSets = 8192/16 = 512.\nOffset bits = log2(64) = 6; index bits = log2(512) = 9; tag bits = 64-6-9 = 49.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 64, "ways": 16, "addr_bits": 64, "lines": 8192, "sets": 512, "offset": 6, "index": 9, "tag": 49}, "prompt_sha1": "43a3bdcb4d6c20f895537e2d2f166885964adec0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 64-bit left-shift register module `shiftreg_left_64`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `64-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_64 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [63:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[62:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_64", "width": 64, "direction": "left"}, "prompt_sha1": "a9ecec15a48a3cee37bbb3d198cf60238003a774", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 934. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 934/1023 × 2.5 V = 2.282502 V.\nThus the estimated input is about 2.2825 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 934, "volts": 2.282502443792766}, "prompt_sha1": "e193ce6f591b67fc060133cf0cf8f77eab9fa5e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 250 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 250 = 50. Verification: 50/250 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 250, "duty": 20, "high": 50}, "prompt_sha1": "0b7f4bf4454a4b410286ef64ffa4be57e4aa155b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 41354 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 41354/1000000 s; frequency = 1000000/41354 = 24.181458 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 41354, "hz": 24.18145765826764}, "prompt_sha1": "76a638f383b1fc2470c5b6bb22dc75b0714471f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 16-bit left-shift register module `shiftreg_left_16`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `16-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_16 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [15:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[14:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_16", "width": 16, "direction": "left"}, "prompt_sha1": "04705d253bbff79b85749d6bd9b8320560fabe31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x7A7A375D. Extract the 3-bit field starting at bit 13 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0x7A7A375D >> 13) & 0x7 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 13, "value": 2054829917, "mask": 7, "field": 1}, "prompt_sha1": "a91aa6c22a232f6f51a53f7348dd6c26cbadf85c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 675. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 675/1023 × 2.5 V = 1.649560 V.\nThus the estimated input is about 1.6496 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 675, "volts": 1.6495601173020527}, "prompt_sha1": "cba1d3a0a66c6f722f2c4be90094ba0d574c360f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 56-bit right-shift register module `shiftreg_right_56`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `56-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_56 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [55:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[55:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_56", "width": 56, "direction": "right"}, "prompt_sha1": "23ab08a71f670fcb95b9f2026daa48ad65d9161b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 96 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 2980 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×2980/(96×10^6) = 0.620833333 = 62.083333%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 96, "irq_hz": 20000, "cycles": 2980, "load": 0.6208333333333333}, "prompt_sha1": "5186692d812d7e357d3b4ff9f6423e9f6412d101", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 14192 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 14192/1000000 s; frequency = 1000000/14192 = 70.462232 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 14192, "hz": 70.46223224351748}, "prompt_sha1": "9d36c0acb012791170de2b326a6300106690afc9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4671 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4671/(4671+40+8) = 0.989828 = 98.98%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4671, "iphdr": 40, "eff": 0.9898283534647171}, "prompt_sha1": "cdd69596aff0bdeee2fd4bc0a6ff2863e4c2d3a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x26EEB6552A4B2E89 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 26 EE B6 55 2A 4B 2E 89.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 2805380094796443273, "endian": "big", "bytes": [38, 238, 182, 85, 42, 75, 46, 137]}, "prompt_sha1": "631386fdeca2968cbf889e84299a843315ab9065", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 45 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 45-21 = 24.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 45, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 24}, "prompt_sha1": "5f73311925ce864892a368b1da5490b69c5433a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xC0, set bit 7 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 7)`. Result = 0xC0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 192, "bit": 7, "op": "set", "result": 192}, "prompt_sha1": "f3379736115a216cdd45bd93a45fcbef786d8600", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 39.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+16 = 55.5. Period = 55.5/2000000 = 2.775e-05 s. Maximum rate = 1/period = 36036.036036 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 39.5, "conv_cycles": 16, "period": 2.775e-05, "rate": 36036.036036036036}, "prompt_sha1": "d5dae8a738086094b02383045baeada27e481efb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 53-bit left-shift register module `shiftreg_left_53`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `53-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_53 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [52:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[51:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_53", "width": 53, "direction": "left"}, "prompt_sha1": "10e3a4d2bd2733af1bc65b19afd66c905ceea45a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 50 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 50×10^6 / (2000×8) = 3125.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "frame_bytes": 2000, "pps": 3125.0}, "prompt_sha1": "b6051f6ee7893f12237cb79e1af1103ee8f88200", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8603 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8603/(8603+20+8) = 0.996756 = 99.68%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8603, "iphdr": 20, "eff": 0.9967558799675588}, "prompt_sha1": "48d5b5e6128473715dba6c8f53b4f86df44210d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 160 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 160000000/(8×500000) = 40.000000.\nNearest integer divisor D = 40.\nActual baud = 160000000/(8×40) = 500000.000 baud.\nError = (500000.000-500000)/500000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 160000000, "oversample": 8, "baud": 500000, "divisor": 40, "actual": 500000.0, "error_pct": 0.0}, "prompt_sha1": "645a722f1317e2ae827cfff1fb97153e830714a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 1.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+8 = 9.5. Period = 9.5/40000000 = 2.375e-07 s. Maximum rate = 1/period = 4210526.315789 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 1.5, "conv_cycles": 8, "period": 2.375e-07, "rate": 4210526.315789473}, "prompt_sha1": "4183d72c0c1b7132f74b9451fba8ff95d6d52fa7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.41. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.41) + 0.41/20) = 1.638002.\nThe theoretical speedup is about 1.638×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.41, "n": 20, "result": 1.6380016380016378}, "prompt_sha1": "6b5bffa9fba5fbfaa3361292b83b7db9195328e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×5/1000/8 = 25000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 5, "bytes": 25000000.0}, "prompt_sha1": "5d7725880e2c28ec36575314e59b4e7603aa2a61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 896 payload bytes plus 40 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 896/(896+40) = 0.957265 = 95.73%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 896, "overhead": 40, "efficiency": 0.9572649572649573}, "prompt_sha1": "2fd5fdc34a77312b8a3ab0199a97b4f41485b4fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 597 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 597/(597+20+8) = 0.955200 = 95.52%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 597, "iphdr": 20, "eff": 0.9552}, "prompt_sha1": "e396d6e0df9e1e3e0d48f2b3723ffcbc0b193e7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_97_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 97 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_97_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd97;\n end else begin\n if (pulse_in)\n count <= 7'd97;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_97_retrig", "cycles": 97, "retrigger": true}, "prompt_sha1": "bfc4e880fa30a94cc2ed5fbeed21bb1b515c5a29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 2.5 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×2.5/(2.5×10^9) = 0.5 s = 500.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 2.5, "ghz": 2.5, "sec": 0.5}, "prompt_sha1": "0cdf706884bb358ba69d8c706bd3bb497371adff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 27-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^27/2^15 = 2^12 = 4096 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 27, "page_exp": 15, "entries": 4096}, "prompt_sha1": "c26da4e16b2eb630ab9f54b195eaa8d1f83bc3cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8526 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8526/(8526+40+8) = 0.994402 = 99.44%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8526, "iphdr": 40, "eff": 0.9944016794961511}, "prompt_sha1": "974fc3a8325353bd178004a4706068bd38c514d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/470 = 4.68085106e-07 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 470, "tau": 4.6808510638297873e-07}, "prompt_sha1": "990b315823b0e6006b1400184845555d28db5337", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock BUF then D; task_B acquires D then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds BUF while waiting for D, while task_B holds D while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before D. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "b86a23c12164377b3098729747a254bd5d1332dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-24 = 1376 bytes.\nRound down to an 8-byte multiple: floor((1376)/8)×8 = 1376 bytes.\nFragments required = ceil(3000/1376) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 24, "payload": 3000, "max_payload": 1376, "fragments": 3}, "prompt_sha1": "c20f03454368191e3a40af12e18ec8de5769d239", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 22 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+22) = 0.879121 = 87.91%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 22, "efficiency": 0.8791208791208791}, "prompt_sha1": "d04adcf9fa93e6915ebde8bd56a5cbcbe3c8d485", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 16 KiB cache with 32-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "e6de8d69a028dad1bbfac1848f030d58df3338b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 40000 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 40000×10^6 × 3/1000 = 1.2e+08 bits = 1.5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 40000, "rtt_ms": 3, "bits": 120000000.0, "bytes": 15000000.0}, "prompt_sha1": "c7322c210b7061abe60b58932d04adf9f05434fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 228 elements. Review loop `for i in range(228-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(228-1)` produces indices 0 through 226, so index 227 is skipped. Correct loop: `for i in range(228):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 228, "variant": "miss_last"}, "prompt_sha1": "48e7dd9fa32250e86e51552de5289be105c899c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 32-bit right-shift register module `shiftreg_right_32`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `32-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_32 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [31:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[31:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_32", "width": 32, "direction": "right"}, "prompt_sha1": "583bec86a2722e1ce291785f9b03ae450abbb85d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 12.9 V source drives a 120 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 12.9-3.4 = 9.5 V.\nI = V/R = 9.5/120 A = 79.1667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 12.9, "vf": 3.4, "r": 120, "current_a": 0.07916666666666666}, "prompt_sha1": "487b56a73a9f9a76b50f2a5ab74efd485a276af5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_842590` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_842590 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_842590"}, "prompt_sha1": "a8b13d69bb7a4ba41f0c0d18c64770b662c11d91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 47-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^47/2^20 = 2^27 = 134217728 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 47, "page_exp": 20, "entries": 134217728}, "prompt_sha1": "3ec61b0b92f2bf80d4708dc26f80373a89115a22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 75%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.050×(6+0.250×80) = 2.300000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.95, "l2": 6, "l2_hit": 0.75, "mem": 80, "amat": 2.300000000000001}, "prompt_sha1": "d753d065fe5912fba01ce79a0e04e796861def70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3750 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0c461b1ea31fed15007d0c7ef7216519aa5f4797", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×128 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 128, "reach": 16777216}, "prompt_sha1": "7e40f1085472e250f4a7fcddd7ecef61897d9da7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w11_nocin` implementing a 11-bit unsigned adder with inputs `a`, `b` and outputs `11-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w11_nocin (\n input logic [10:0] a,\n input logic [10:0] b,\n output logic [10:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w11_nocin", "width": 11, "cin": false}, "prompt_sha1": "248155fc55eda433f915c6d7f1986535b6a7bcc2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x8_write_bypass` with 64 entries of 8 bits. Inputs: `clk`, `we`, `6-bit waddr`, `8-bit wdata`, `6-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [7:0] wdata,\n input logic [5:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x8_write_bypass", "entries": 64, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "d2711efab6cb668abfd690b69480a23fe34008f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 8000 payload bytes plus 128 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 8000/(8000+128) = 0.984252 = 98.43%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 8000, "overhead": 128, "efficiency": 0.984251968503937}, "prompt_sha1": "65081528ae236c0f4d89d7e533c885489141d92a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_242` generating a one-clock-cycle `tick` every 242 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_242 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 241) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_242", "divide": 242}, "prompt_sha1": "52434331da4cc121940187b91423f8d9506e1966", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2669 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "2f9c74f75f874581bf6a2823b369b8b9805140ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-28 = 3932 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 28, "mss": 3932}, "prompt_sha1": "9d254ebb731d97a3fc91a6932c09a70675c8ed48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (1500×8) = 166.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 1500, "pps": 166.66666666666666}, "prompt_sha1": "47ea49fb2789b800ae158c2ff748ec75bf78ca8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/100=0.09 A. P=V²/R=9²/100=0.81 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 100, "i": 0.09, "p": 0.81}, "prompt_sha1": "9ed46946367a743dd3712d2305971ae2912ae768", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 16000 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-20-40 = 15940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 20, "tcphdr": 40, "mss": 15940}, "prompt_sha1": "5b1cf7f4bccbd9e39904813a19a587d3cb763d6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `items` elements of type `int`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n total += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `words[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n total += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "03ecf44d0a331ccca5218c16b235e134f0384452", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×1024 KiB = 524288 KiB = 536870912 bytes = 512.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 1024, "reach": 536870912}, "prompt_sha1": "476a6d80a21c29e98d0bdd017e1be0cc26c4dc00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.217.28.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.217.28.0\nBroadcast address: 10.217.28.255\nUsable host range: 10.217.28.1 to 10.217.28.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.217.28.0/24", "usable": 254, "first": "10.217.28.1", "last": "10.217.28.254", "broadcast": "10.217.28.255"}, "prompt_sha1": "0d23bfbd4184ca39197638beec866005a0dc21da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock STATE then RX; consumer acquires RX then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds STATE while waiting for RX, while consumer holds RX while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire RX before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "fe9aa06878836a1362d30e116da87523f315e64d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(5×10^6) s = 409.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 2048, "time_us": 409.59999999999997}, "prompt_sha1": "956f460cd702e01362ffbf3185771af7e701cda0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 8000 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×8000×10^6×1 = 8.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 8000, "channels": 1, "gbps": 8.0}, "prompt_sha1": "1eb2b7a0132e4c4117595b974c2f049140edf575", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=4700 ohm and C=220000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=4700×220000×10^-12 s = 0.001034 s.\nf_c=1/(2πRC)=1/(2π×4700×220000×10^-12) = 153.9216 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 4700, "c_f": 2.1999999999999998e-07, "tau": 0.001034, "fc": 153.92160840608835}, "prompt_sha1": "6beb4ca295e5a864e99c4498f695c8b2beb7e04a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 160 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 1821 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×1821/(160×10^6) = 0.01138125 = 1.138125%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 160, "irq_hz": 1000, "cycles": 1821, "load": 0.01138125}, "prompt_sha1": "873cfb97772dd1e9d9b5c29629d9d6dc9217b982", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 32-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/32 = 64.\nOffset bits = log2(32) = 5.\nIndex bits = log2(64) = 6.\nTag bits = 28-6-5 = 17.\nCheck: 17+6+5 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 32, "addr_bits": 28, "lines": 64, "offset_bits": 5, "index_bits": 6, "tag_bits": 17}, "prompt_sha1": "92a38c506f6552b0e3d7271e2eb9cca239cf6270", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×8 KiB = 512 KiB = 524288 bytes = 0.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 8, "reach": 524288}, "prompt_sha1": "e29f81681534d614015795a5e56531da08c160f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 8 KiB cache with 64-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "b26484910ee8e29596b08b9814ddfdfc50628d0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 4 MHz, prescaler divisor is 708, and period is 13492 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 4000000/(708×13492) = 0.418746 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 4000000, "prescaler": 708, "period": 13492, "hz": 0.418745739262103}, "prompt_sha1": "a1437c487aa6d53a571bfd00a27b0a84f982eb62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 11 and tail index 1, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (11-1) mod 16 = 10. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 11, "tail": 1, "occupancy": 10}, "prompt_sha1": "d55e626bd0ece0bb2e89db23ba35745045973a90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967178; x = x + 555;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967178+555 = 4294967733. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967733) mod 2^32 = 437. So `x` stores 437. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967178, "add": 555, "result": 437}, "prompt_sha1": "d1d79182a8843f8d7012f6c378535a656f6f2244", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 59-bit right-shift register module `shiftreg_right_59`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `59-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_59 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [58:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[58:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_59", "width": 59, "direction": "right"}, "prompt_sha1": "b8e79ce45fc9f365dfee6e9b8e8680dd514b4a8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 000010100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "000010100", "ones": 2, "parity": 0}, "prompt_sha1": "6c08309c56364d642d67651935b197e51f23eea3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 2 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×2/(1×10^9) = 0.002 s = 2.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 2.0, "ghz": 1.0, "sec": 0.002}, "prompt_sha1": "fcf56308083cab1446cc7dad65391c4c956ed50e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 160 MHz and must generate an exact 250 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 160000000/250 = 640000.\nWith prescaler divisor limited to at most 256, the largest divisor of 640000 that also keeps the period count within 16 bits is 256.\nPeriod count = 640000/256 = 2500.\nPSC register = 256-1 = 255.\nARR register = 2500-1 = 2499.\nVerification: 160000000/(256×2500) = 250 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 160000000, "target_hz": 250, "total_division": 640000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 256, "period": 2500, "psc_reg": 255, "arr_reg": 2499}, "prompt_sha1": "e942ce7a52256b17699000bdb2d95d1fe598a317", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=25 ms, C=2 ms,T=20 ms, C=5 ms,T=10 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/25 + 2/20 + 5/10 + 4/20 = 0.920000 = 92.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 25], [2, 20], [5, 10], [4, 20]], "utilization": 0.92}, "prompt_sha1": "01f4b626ec96b3789464daa977d107bce6b09400", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0110001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0110001", "ones": 3, "parity": 1}, "prompt_sha1": "e874660ccd89d25d92c33fcaa3d198030e276106", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.001 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-09×1²=5e-10 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-09, "v": 1, "energy": 5e-10}, "prompt_sha1": "3dd796fc063eba229db6db517fe5a1a9dd8aa00d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_154` generating a one-clock-cycle `tick` every 154 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_154 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 153) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_154", "divide": 154}, "prompt_sha1": "f2130081dccdba2762db9c569925aa4433de856f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551474; x = x + 506;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551474+506 = 18446744073709551980. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551980) mod 2^64 = 364. So `x` stores 364. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551474, "add": 506, "result": 364}, "prompt_sha1": "5859e12325086006cf00e962d8e2104e794edd5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11101100110 using generator polynomial bits 1100001. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 100000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 97, "msg_bits": 11, "msg": 1894, "remainder": 32}, "prompt_sha1": "2ee4bfdaa5d75a997df88269ff6f809856e93bba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [9, 11, 22, 22, 5, 24]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [38, 52, 89, 90, 32, 93].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [9, 11, 22, 22, 5, 24], "finish": [38, 52, 89, 90, 32, 93]}, "prompt_sha1": "656ce495d42e028028467b154ec370297e39c1ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 1, 1, 0], "final_state": 2}, "prompt_sha1": "0127093c9999527b679a8aaefbe35fe3e53ec5e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 7 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 31 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+2 = 10. Total bits = 31×10 = 310. Time = 310/1000000 = 0.00031 s = 0.310000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 7, "parity": 0, "stop": 2, "frames": 31, "seconds": 0.00031}, "prompt_sha1": "27da85a294a38eb1f68dc48fd9b324392123807a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×16 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 16, "reach": 16777216}, "prompt_sha1": "e979f1417412bcb05b0e50c9d3f43ff4d2f92efb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8070` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8070 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8070"}, "prompt_sha1": "30e809408584494a892619eecd63e1ef0a756489", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-40 = 1960 bytes.\nRound down to an 8-byte multiple: floor((1960)/8)×8 = 1960 bytes.\nFragments required = ceil(8000/1960) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 40, "payload": 8000, "max_payload": 1960, "fragments": 5}, "prompt_sha1": "cc57dce6c806b3db75f9950f6ea2218092905654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_4_27_15` with RED, GREEN, YELLOW states. Hold RED for 4 clock cycles, GREEN for 27, and YELLOW for 15; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_4_27_15 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 3) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 26) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 14) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_4_27_15", "red": 4, "green": 27, "yellow": 15}, "prompt_sha1": "7a3dbe267620a8d234075b813ce2c647d150ed18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9219` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9219 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9219"}, "prompt_sha1": "eb550b18974bad9dc4296b378fb567de0d6e0955", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_52` for a 52-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_52 (\n input logic signed [51:0] data,\n input logic [5:0] shamt,\n output logic signed [51:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_52", "width": 52, "direction": "right", "arithmetic": true}, "prompt_sha1": "43bf61d5660e07db965498da872b38f8ddf95fcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 199 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 199/(199+20+8) = 0.876652 = 87.67%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 199, "iphdr": 20, "eff": 0.8766519823788547}, "prompt_sha1": "fd97677030ccf1625d542228bfed4764100f7660", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1024 payload bytes plus 18 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1024/(1024+18) = 0.982726 = 98.27%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1024, "overhead": 18, "efficiency": 0.982725527831094}, "prompt_sha1": "796be611205076b6479d22ddbca99e84ec457600", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=10 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=2.2e-06 s and t=2.2e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 1e-08, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "a1757cc0d35078bc1ff5946ad0aa56c047de8344", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/1 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 1, "tau": 0.001}, "prompt_sha1": "236f7ff460e45090e39331a8878b72aef023a080", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=100 nF and is stepped to 3.3 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=3.3(1-e^-2)=2.853394 V; τ=0.001 s and t=0.002 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 1.0000000000000001e-07, "multiple": 2, "vin": 3.3, "vc": 2.8533935653191778}, "prompt_sha1": "a2f12a6d194d9a7ce0bfee5c8413d95e08d5080a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w32_2732` implementing a dual-clock asynchronous FIFO with depth 128 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w32_2732 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 32,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w32_2732", "depth": 128, "width": 32, "ptr_w": 7}, "prompt_sha1": "40f21f1a6740464a6414fc55ab2efc2be2889946", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=10 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×1/(10+1) = 0.300000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 10, "r2": 1, "vout": 0.3}, "prompt_sha1": "b40bea0c0ff2e71cda66767c550719f6043b4a1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-28 = 3972 bytes.\nRound down to an 8-byte multiple: floor((3972)/8)×8 = 3968 bytes.\nFragments required = ceil(3000/3968) = 1.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 28, "payload": 3000, "max_payload": 3968, "fragments": 1}, "prompt_sha1": "96c6f75b6a42747f34eb1b8af423f9bb241781a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 111111010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 7 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "111111010", "ones": 7, "parity": 1}, "prompt_sha1": "4d1efc31a4625f840c319c00a17ff05b1dda6fa1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 35661 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 35661/50000000 s; frequency = 50000000/35661 = 1402.091921 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 35661, "hz": 1402.0919211463504}, "prompt_sha1": "d2efb52ced00ecd2941b6545956447ee2bbb2f41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_27_19` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 27, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_27_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 26) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_27_19", "red": 28, "green": 27, "yellow": 19}, "prompt_sha1": "f7fd21843e5a8bb9f8f5c84fd07da2093a8dee4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 100 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 1348 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×1348/(100×10^6) = 0.00674 = 0.674000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 100, "irq_hz": 500, "cycles": 1348, "load": 0.00674}, "prompt_sha1": "8b685d46a4f9bfce6ce08b5d75a1dd121bddc54a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (128×8) = 4882812.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 128, "pps": 4882812.5}, "prompt_sha1": "3ed191c000e57c67a8ac5c789a11bc66ae2ae3da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xE0FB. Extract the 5-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xE0FB >> 2) & 0x1F = 0x1E (30).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 5, "lsb": 2, "value": 57595, "mask": 31, "field": 30}, "prompt_sha1": "f7671a6c6068306c85c05f8207fa942ae45ebf19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×1.8²=1.62e-07 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 1.8, "energy": 1.62e-07}, "prompt_sha1": "64ecc2dd48d79951ad017a28acd33580b30b01a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^13 V = 0.0001220703125 V = 122.070312 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 1.0, "step": 0.0001220703125}, "prompt_sha1": "346c88a6d14cf54ba3fe1d1b6e2d9dd661496b8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 24 MHz. Sampling consumes 160.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+10 = 170.5. Period = 170.5/24000000 = 7.10416667e-06 s. Maximum rate = 1/period = 140762.463343 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 24000000.0, "sample_cycles": 160.5, "conv_cycles": 10, "period": 7.104166666666666e-06, "rate": 140762.4633431085}, "prompt_sha1": "0f3d3e2548c7cef1960fa30dee7c9991fc037208", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['P', 'P', 'V', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["P", "P", "V", "V", "V", "V", "V"], "value": 12, "blocked": 0}, "prompt_sha1": "278155554ffeaaab569663c31624aae3a7c1721b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 0 and tail index 4, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (0-4) mod 8 = 4. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 0, "tail": 4, "occupancy": 4}, "prompt_sha1": "77f727fbed20e292014f402d27783f56dbe827a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `count` elements of type `int`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n result += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `items[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n result += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ac7583d12d286d6639d5e42a5a582dbd702c7370", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_11` for a 11-bit unsigned input `data`, `4-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_11 (\n input logic [10:0] data,\n input logic [3:0] shamt,\n output logic [10:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_11", "width": 11, "direction": "right", "arithmetic": false}, "prompt_sha1": "548102f9e8266969fb5cfe159615516e54995d98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=47000 ohm and C=68000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=47000×68000×10^-12 s = 0.003196 s.\nf_c=1/(2πRC)=1/(2π×47000×68000×10^-12) = 49.7982 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 47000, "c_f": 6.8e-08, "tau": 0.003196, "fc": 49.798167425499166}, "prompt_sha1": "f5e5beee50e0e4e9e3cf455c57d302720f76bff0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 91, and period is 9303 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(91×9303) = 37.799457 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 91, "period": 9303, "hz": 37.79945734154054}, "prompt_sha1": "b68b2be4359ba8c910604995b395769b397906c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_38_50_13` with RED, GREEN, YELLOW states. Hold RED for 38 clock cycles, GREEN for 50, and YELLOW for 13; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_38_50_13 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 37) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 49) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 12) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_38_50_13", "red": 38, "green": 50, "yellow": 13}, "prompt_sha1": "4a109b0846c980a0d71cc77b6ea5c9f7edfbc186", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_3275` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_3275 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_3275"}, "prompt_sha1": "9bda3a6c4a94d0cdee721b15c0c22c8114c67710", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_23_lsb` for `23-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_23_lsb (\n input logic [22:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 22; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_23_lsb", "width": 23, "priority": "low"}, "prompt_sha1": "3267843822ebbfa16a88dcd856399916c0a2d427", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w28_cin` implementing a 28-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `28-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w28_cin (\n input logic [27:0] a,\n input logic [27:0] b,\n input logic cin,\n output logic [27:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w28_cin", "width": 28, "cin": true}, "prompt_sha1": "15b60bc86695c07c4d9dd1f798b3a27c163c5461", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 2 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×10×10^6 = 20000000 B/s. Time = 512/20000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 2, "rate_mhz": 10, "sec": 2.56e-05}, "prompt_sha1": "e357fdff458a0184a5cdcafc2ac4e4b43c3112b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `words` elements of type `float`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n result += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `a[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n result += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "991e5c00b729f2741243f36476c0a886d5acca74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 1600 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×1600×10^6×2 = 12.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 1600, "channels": 2, "gbps": 12.8}, "prompt_sha1": "238cf6c93e737ed64e140faab9e154eb86e0a489", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 16000 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-40-32 = 15928 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 40, "tcphdr": 32, "mss": 15928}, "prompt_sha1": "ec9ed94fb55ce3dc0cbb7fc57d3fafec969a9062", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3354(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3354(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3354([1, 2]) == 1.5\nassert mean_3354([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3354"}, "prompt_sha1": "c9d76e7ed1bbf3d00335747e25ce1c15758b1dc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (1200×8) = 2083.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 1200, "pps": 2083.3333333333335}, "prompt_sha1": "d491dce368c198ecdd5cebcc8c8b19442aff157f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=68000 ohm and C=22000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=68000×22000×10^-12 s = 0.001496 s.\nf_c=1/(2πRC)=1/(2π×68000×22000×10^-12) = 106.3870 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 68000, "c_f": 2.2e-08, "tau": 0.001496, "fc": 106.3869940453846}, "prompt_sha1": "4cc7b20623b6eb5993c31f7d3828d4d27ab6de20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 500 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 500 = 250. Verification: 250/500 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 500, "duty": 50, "high": 250}, "prompt_sha1": "15afcbb38a8f13f792d7641a259c2ba679fdf2f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×20/1000/8 = 2500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 20, "bytes": 2500.0}, "prompt_sha1": "9f6ea54b4aedda9330e7496e4abeb8b911af51da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_224` generating a one-clock-cycle `tick` every 224 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_224 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 223) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_224", "divide": 224}, "prompt_sha1": "6d12fe7757a1be9188a449219b8f50316f8477a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x78, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x78<<1)|1 = 0xF1 = 11110001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 120, "rw": 1, "byte": 241}, "prompt_sha1": "8c6be95faa9d65a9b1f5692c16e6b293b08a46d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xDFBCB354, toggle bit 25 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 25)`. Result = 0xDDBCB354.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3753685844, "bit": 25, "op": "toggle", "result": 3720131412}, "prompt_sha1": "4cdcbad568b1cbe5f609bea469f5ac9148f062ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(50×10^6) s = 40.960000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 2048, "time_us": 40.96}, "prompt_sha1": "02c5f394e7cac02eb38b3f430b7fc3bb7566c2f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 180; x = x + 162;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 180+162 = 342. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (342) mod 2^8 = 86. So `x` stores 86. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 180, "add": 162, "result": 86}, "prompt_sha1": "d9536a412450f52180302400578174cc6b4d29eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(4×10^6) s = 32.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 128, "time_us": 32.0}, "prompt_sha1": "71183a44e40c14310f546170694db11b3f595a49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=22 nF and is stepped to 9 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=9(1-e^-0.5)=3.541224 V; τ=0.00022 s and t=0.00011 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 2.2000000000000002e-08, "multiple": 0.5, "vin": 9, "vc": 3.5412240625862994}, "prompt_sha1": "c889436be06b06a3ee846a838bdcd32f5e307fbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_126` for a synchronous sampled input `noisy`. Update output `clean` only after observing 126 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_126 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 125) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_126", "stable_samples": 126}, "prompt_sha1": "21e61fbcc7d0e1bea452630837e2dbd40bcdcca8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 10 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 10×11 = 110. Time = 110/4800 = 0.0229166667 s = 22.916667 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 7, "parity": 1, "stop": 2, "frames": 10, "seconds": 0.022916666666666665}, "prompt_sha1": "027f0964642b26b26f0834b27ec7d55b27aede47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `size` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n total += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `buf[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n total += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "51928ec48cf94d6ec4dc294b4e0bb0c9198a26b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100001110110 using generator polynomial bits 111111. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 10100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 63, "msg_bits": 12, "msg": 2166, "remainder": 20}, "prompt_sha1": "9c34bcf2bf4c318334e4ba4478998d4e97f07880", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x14EFC4FD, clear bit 29 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 29)`. Result = 0x14EFC4FD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 351257853, "bit": 29, "op": "clear", "result": 351257853}, "prompt_sha1": "fc6650b15f445b3d17c85fd74813cdf40fbaec0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 8%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.080 × 8 = 0.064000.\nEffective CPI = 1.1 + 0.064000 = 1.164000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.08, "penalty": 8, "result": 1.1640000000000001}, "prompt_sha1": "a561f07752a63b7de155a9c1ba6976be1530b5fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=25 ms, C=3 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/25 + 3/50 = 0.260000 = 26.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 25], [3, 50]], "utilization": 0.26}, "prompt_sha1": "0748d8efb429b972420b6eeb5ece566e6350bf63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 40 MHz and must generate an exact 2500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 40000000/2500 = 16000.\nWith prescaler divisor limited to at most 128, the largest divisor of 16000 that also keeps the period count within 16 bits is 128.\nPeriod count = 16000/128 = 125.\nPSC register = 128-1 = 127.\nARR register = 125-1 = 124.\nVerification: 40000000/(128×125) = 2500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 40000000, "target_hz": 2500, "total_division": 16000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 128, "period": 125, "psc_reg": 127, "arr_reg": 124}, "prompt_sha1": "1fffd92c6f450f1e28899e5ef2222406409781c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10101000000111010 using generator polynomial bits 1011. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 11, "msg_bits": 17, "msg": 86074, "remainder": 6}, "prompt_sha1": "95aa02fe9cb4f93d036dfab15d95e733641ec831", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `words` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n total += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `words[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n total += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "2151b2bf3d6d8cc2cde6a847b50aff6c0b24ce1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4045(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4045(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4045([1, 2]) == 1.5\nassert mean_4045([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4045"}, "prompt_sha1": "d1e40e2e6d14843842a285f67787823daf22a35d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w17_cin` implementing a 17-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `17-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w17_cin (\n input logic [16:0] a,\n input logic [16:0] b,\n input logic cin,\n output logic [16:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w17_cin", "width": 17, "cin": true}, "prompt_sha1": "664a6fd437140d9e8e387807d16cc79845393bd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 95%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.040×(6+0.050×80) = 1.400000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.96, "l2": 6, "l2_hit": 0.95, "mem": 80, "amat": 1.4000000000000006}, "prompt_sha1": "8d5276ef8d1a50407e0c7d4a4616110bf22f3d61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 0.2 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 0.2/1000 = 400 bits = 50 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 0.2, "bits": 400.0, "bytes": 50.0}, "prompt_sha1": "1ad2f5f4606fb5e8e9634d3d8e07a2ed1ae88709", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 400000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 400000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 400000}, "prompt_sha1": "b8064ae1d4f90e667c1a0f1f1ca6a1151d2e0a53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `n` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n result += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `buf[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n result += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "e0cf99c26d82239e69c0b3a8e3c6ac1676b9d5dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 62 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 62 = 65.\nClock pulses = 65×9 = 585.\nTime = 585/1000000 s = 585.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 62, "clocks": 585, "time_s": 0.000585}, "prompt_sha1": "6412af115299e91d2a601179a4916dc09cb2b2c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_118591` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_118591 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_118591"}, "prompt_sha1": "8615021e0c9334e9ea420aa9f2ec00d2a80d78d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.81. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.81) + 0.81/6) = 3.076923.\nThe theoretical speedup is about 3.077×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.81, "n": 6, "result": 3.0769230769230775}, "prompt_sha1": "6259ec295e9a7c0075349632d97b38836289b5e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.92. Using Amdahl's law, compute the theoretical speedup on 48 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.92) + 0.92/48) = 10.084034.\nThe theoretical speedup is about 10.084×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.92, "n": 48, "result": 10.084033613445383}, "prompt_sha1": "f85c3876605075832657658750e5cd531369d810", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_245` generating a one-clock-cycle `tick` every 245 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_245 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 244) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_245", "divide": 245}, "prompt_sha1": "d8997bd6fed5233eb9fcd4b9b715b23d3b8c7411", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.42.36.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.42.36.0\nBroadcast address: 10.42.36.7\nUsable host range: 10.42.36.1 to 10.42.36.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.42.36.0/29", "usable": 6, "first": "10.42.36.1", "last": "10.42.36.6", "broadcast": "10.42.36.7"}, "prompt_sha1": "7cd121b90d8c9ccdac45599a484cc153fc6f45ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8398(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8398(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8398([1, 2]) == 1.5\nassert mean_8398([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8398"}, "prompt_sha1": "9c221053d3e77fd856e9b6e850c5fd3a19d81b8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 50 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 50 = 53.\nClock pulses = 53×9 = 477.\nTime = 477/100000 s = 4770.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 50, "clocks": 477, "time_s": 0.00477}, "prompt_sha1": "12692915a9f33b164fc4436eed7d45ebcd819701", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.181.86.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.181.86.0\nBroadcast address: 10.181.86.63\nUsable host range: 10.181.86.1 to 10.181.86.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.181.86.0/26", "usable": 62, "first": "10.181.86.1", "last": "10.181.86.62", "broadcast": "10.181.86.63"}, "prompt_sha1": "d6bb313aa99e969e143b5859bad814924763973d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x64_write_bypass` with 128 entries of 64 bits. Inputs: `clk`, `we`, `7-bit waddr`, `64-bit wdata`, `7-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x64_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [63:0] wdata,\n input logic [6:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x64_write_bypass", "entries": 128, "width": 64, "mode": "write_bypass"}, "prompt_sha1": "35c604be5d05b0eb619e215ecefc54bf7a8f665d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 984, and period is 37874 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(984×37874) = 0.214661 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 984, "period": 37874, "hz": 0.21466127952719566}, "prompt_sha1": "c664b16803938fad581070ad9e4417e76196ff10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.6 V source drives a 120 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.6-3.3 = 12.3 V.\nI = V/R = 12.3/120 A = 102.5000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.6, "vf": 3.3, "r": 120, "current_a": 0.10250000000000001}, "prompt_sha1": "050d58060be366a1cf936fb78edc31fdec32a957", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.191.123.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.191.123.0\nBroadcast address: 10.191.123.3\nUsable host range: 10.191.123.1 to 10.191.123.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.191.123.0/30", "usable": 2, "first": "10.191.123.1", "last": "10.191.123.2", "broadcast": "10.191.123.3"}, "prompt_sha1": "2407f511e2cd5f420645c6d960368c2f0967b69a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10101100101000 using generator polynomial bits 110001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 10001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 49, "msg_bits": 14, "msg": 11048, "remainder": 17}, "prompt_sha1": "9bf2eeeec5645d0f7154257ea86cd892d6c726fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x40_no_bypass` with 32 entries of 40 bits. Inputs: `clk`, `we`, `5-bit waddr`, `40-bit wdata`, `5-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [39:0] wdata,\n input logic [4:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x40_no_bypass", "entries": 32, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "b089f11c6fcedfbfef0b89fb6cad63957587e61e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 192 data bits per transfer at 4000 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 192/8 = 24. Bandwidth = 24×4000×10^6×4 = 384.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 192, "rate_mt": 4000, "channels": 4, "gbps": 384.0}, "prompt_sha1": "a9028e1d113e09720e65eb0d60248d8ad9e5a9a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 25% of instructions, the branch misprediction rate is 20%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.200 × 3 = 0.150000.\nEffective CPI = 1 + 0.150000 = 1.150000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.25, "mispred": 0.2, "penalty": 3, "result": 1.15}, "prompt_sha1": "99423a8197a371d19b7aedd6374a7df8144dcd01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNTNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 1, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "9f23270d6ef1baf8ecf6c01f2c66abaff31bf290", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 2000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 16000 Hz satisfies it.", "output": "Nyquist minimum is 2×2000 = 4000 Hz. Proposed rate 16000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 2000, "min_fs": 4000, "proposed": 16000}, "prompt_sha1": "d524385da417a63a9de1382399e5f0fc868b8e69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 4000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×4000×10^6×8 = 128.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 4000, "channels": 8, "gbps": 128.0}, "prompt_sha1": "4cab7607822497b856d1d045512efcb0e944cbd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w26_cin` implementing a 26-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `26-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w26_cin (\n input logic [25:0] a,\n input logic [25:0] b,\n input logic cin,\n output logic [25:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w26_cin", "width": 26, "cin": true}, "prompt_sha1": "e6ddcd002c030eb1fd187f325d5398fc0e4c52d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_32_msb` for `32-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_32_msb (\n input logic [31:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 32; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_32_msb", "width": 32, "priority": "high"}, "prompt_sha1": "ac2cc22426854ac5d7d3baad390e68d44b51b8f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2868787038, carries 48990 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 48990+0+1 = 48991. ACK = (2868787038+48991) mod 2^32 = 2868836029.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2868787038, "payload": 48990, "syn": 0, "fin": 1, "ack": 2868836029}, "prompt_sha1": "e95c424d5b2273380c8682ac4ec50b0aaf25fbe4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1600 counts per period. What compare/high-time count produces exactly 87.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.875 × 1600 = 1400. Verification: 1400/1600 = 0.875, which is 87.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1600, "duty": 87.5, "high": 1400}, "prompt_sha1": "ac666549074a68b718684e3fedfbfe21ed6c1855", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_276791` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_276791 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_276791"}, "prompt_sha1": "eb42517219dbebe6daf10d6afa58c1634faf1238", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 59 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 59 = 61.\nClock pulses = 61×9 = 549.\nTime = 549/1000000 s = 549.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 59, "clocks": 549, "time_s": 0.000549}, "prompt_sha1": "ec14112fb5976d69406b33f641467e6cba34b8c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 160 counts per period. What compare/high-time count produces exactly 95% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.95 × 160 = 152. Verification: 152/160 = 0.95, which is 95%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 160, "duty": 95, "high": 152}, "prompt_sha1": "13b1603bc0eeb8afbaa5a6d89ba7dc6f2db607ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.115.112.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.115.112.0\nBroadcast address: 10.115.112.3\nUsable host range: 10.115.112.1 to 10.115.112.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.115.112.0/30", "usable": 2, "first": "10.115.112.1", "last": "10.115.112.2", "broadcast": "10.115.112.3"}, "prompt_sha1": "a1c6659d74dfd0004b62ea611b4a1d5393cea44a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 39-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^39/2^14 = 2^25 = 33554432 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 39, "page_exp": 14, "entries": 33554432}, "prompt_sha1": "9c0148cc2541781b2f49e70943c09a8edcbf3b11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_4_lsb` for `4-bit in`. The lowest numbered asserted bit has priority. Output `2-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_4_lsb (\n input logic [3:0] in,\n output logic [1:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 3; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_4_lsb", "width": 4, "priority": "low"}, "prompt_sha1": "0bae44bc8c0ec20441907fd9c514843d365485fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20 Mbit/s and RTT 8 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20×10^6 × 8/1000 = 160000 bits = 20000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20, "rtt_ms": 8, "bits": 160000.0, "bytes": 20000.0}, "prompt_sha1": "688c463b4be81699d8a10340ff34ccd7eebc19b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x54, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x54<<1)|0 = 0xA8 = 10101000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 84, "rw": 0, "byte": 168}, "prompt_sha1": "a91d07e34d60f69ef29af0141e17b06929a5fec4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 811, and period is 22854 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(811×22854) = 3.453003 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 811, "period": 22854, "hz": 3.4530025313745747}, "prompt_sha1": "5a74421e01c240fe692512ae932de1f842bbe417", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=100 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/100 = -1.000000.\nVout = A_v×Vin = -1.000000×1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 100, "vin": 1.0, "gain": -1.0, "vout": -1.0}, "prompt_sha1": "bb88993f46be1897db4ed745e41827e48c29061c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551570; x = x + 501;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551570+501 = 18446744073709552071. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552071) mod 2^64 = 455. So `x` stores 455. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551570, "add": 501, "result": 455}, "prompt_sha1": "585690e7deb6504e6e6b6e328adba7f3c911bf5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/220=0.015 A. P=V²/R=3.3²/220=0.0495 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 220, "i": 0.015, "p": 0.049499999999999995}, "prompt_sha1": "3fe1b54083d14a0aa32dabaf9953865ea11c56e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.63. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.63) + 0.63/64) = 2.632661.\nThe theoretical speedup is about 2.633×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.63, "n": 64, "result": 2.632661456190868}, "prompt_sha1": "e1c173503aa4b9328fea7f40a4f1ec4308c9202d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(16×2400) = 2500.000000.\nNearest integer divisor D = 2500.\nActual baud = 96000000/(16×2500) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 16, "baud": 2400, "divisor": 2500, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "c3647455d1ea852ede3e3921a92a47313658b25e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 8-way set-associative cache uses 32-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/32 = 2048.\nSets = 2048/8 = 256.\nOffset bits = log2(32) = 5; index bits = log2(256) = 8; tag bits = 36-5-8 = 23.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 32, "ways": 8, "addr_bits": 36, "lines": 2048, "sets": 256, "offset": 5, "index": 8, "tag": 23}, "prompt_sha1": "098924cb28b237a5215797199d2aa2e31e5a0211", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (1200×8) = 20833.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 1200, "pps": 20833.333333333332}, "prompt_sha1": "22479d743f0bdd47aaea632d06a2bca8a1297c57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1600 payload bytes plus 128 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1600/(1600+128) = 0.925926 = 92.59%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1600, "overhead": 128, "efficiency": 0.9259259259259259}, "prompt_sha1": "b93ef5d1b4b2940a82691750cb54753da348f74f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 11846 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 11846/2000000 s; frequency = 2000000/11846 = 168.833361 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 11846, "hz": 168.83336147222693}, "prompt_sha1": "8955b3318ffe1efe0573008473811a93d13a4384", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_1516` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_1516 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_1516"}, "prompt_sha1": "889705f39432bbf39e678ed16b24afe0882c2562", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (1500×8) = 8333333.333333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 1500, "pps": 8333333.333333333}, "prompt_sha1": "be21463a31120b75590889d3fe8dccc1575d328a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x32_no_bypass` with 8 entries of 32 bits. Inputs: `clk`, `we`, `3-bit waddr`, `32-bit wdata`, `3-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [31:0] wdata,\n input logic [2:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x32_no_bypass", "entries": 8, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "b057c834ce874e5114fd17f539b2d90895896047", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 3` on one shared integer without synchronization. Assume `items` initially equals 344. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 344; T2 reads 344; both compute 347; T1 writes 347; T2 writes 347. The observed final value is 347, but two serial increments would produce 350.\n\n```\nlock(mutex)\nitems = items + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "dce0bc044730d1d3cef8264ba78d35f6f1aa79d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w6_signed` comparing two 6-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w6_signed (\n input logic signed [5:0] a,\n input logic signed [5:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w6_signed", "width": 6, "signed": true}, "prompt_sha1": "d0051ed63941ed580aa1dbd1a1d76c674821ead2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "00e23e80994659d4b18115099bd543c526b4b1eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1000 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1000-20-60 = 920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1000, "iphdr": 20, "tcphdr": 60, "mss": 920}, "prompt_sha1": "09991352e0458bffd7cb063f08734cd264b04791", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1110110100101111000000101 using generator polynomial bits 100111. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 00100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 39, "msg_bits": 25, "msg": 31088133, "remainder": 4}, "prompt_sha1": "d0f5298690981a0c6ea28f0a78a322b299d1b4b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2133 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "8d153709b67e64f73526cb342b7b98426d7f0c43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 7` on one shared integer without synchronization. Assume `events` initially equals 346. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 346; T2 reads 346; both compute 353; T1 writes 353; T2 writes 353. The observed final value is 353, but two serial increments would produce 360.\n\n```\nlock(mutex)\nevents = events + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "bce52a285df442434c9935987faa5a1248fed11d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=100 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×1/(100+1) = 0.089109 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 100, "r2": 1, "vout": 0.0891089108910891}, "prompt_sha1": "f8fe721af5ceb54aceca9a9ce491705058ca4706", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.86. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.86) + 0.86/20) = 5.464481.\nThe theoretical speedup is about 5.464×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.86, "n": 20, "result": 5.46448087431694}, "prompt_sha1": "f2cc4de50cf1d5bd0922742761554c212a526398", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/22 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 22, "tau": 0.001}, "prompt_sha1": "aa233fb457438a6000a5b47762f2717c17b9e425", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x1F, clear bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 1)`. Result = 0x1D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 31, "bit": 1, "op": "clear", "result": 29}, "prompt_sha1": "39913bdd517af00db8c81ec7c49d33169c1923fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 274 and tail index 78, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (274-78) mod 1024 = 196. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 274, "tail": 78, "occupancy": 196}, "prompt_sha1": "570d5ddc4f9182c29d4be637b98a48da94e71d33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x7C8D69 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 7C 8D 69.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 8162665, "endian": "big", "bytes": [124, 141, 105]}, "prompt_sha1": "223238d32f1aa9befe2a8117a6c1b156754fbc62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.62.194.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.62.194.0\nBroadcast address: 10.62.194.3\nUsable host range: 10.62.194.1 to 10.62.194.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.62.194.0/30", "usable": 2, "first": "10.62.194.1", "last": "10.62.194.2", "broadcast": "10.62.194.3"}, "prompt_sha1": "f1b2e1501e14dc997c596d841f70db78466b40e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100000101110001100000 using generator polynomial bits 10011111. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1000000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 159, "msg_bits": 21, "msg": 1072224, "remainder": 64}, "prompt_sha1": "7f3c1528b8e7a08c3c99a4e6410d29512a5e09cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11010000110111 using generator polynomial bits 11111. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 31, "msg_bits": 14, "msg": 13367, "remainder": 2}, "prompt_sha1": "a3d8371095a2f3203691238b46f86d35fc927938", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-28 = 972 bytes.\nRound down to an 8-byte multiple: floor((972)/8)×8 = 968 bytes.\nFragments required = ceil(6000/968) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 28, "payload": 6000, "max_payload": 968, "fragments": 7}, "prompt_sha1": "c51959bbdcc5c6d4c3a630b381073305aeb047b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=22 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/47 = -0.468085.\nVout = A_v×Vin = -0.468085×0.05 = -0.023404 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 22, "vin": 0.05, "gain": -0.46808510638297873, "vout": -0.02340425531914894}, "prompt_sha1": "7527994bc6ac709f789127b2dd68a09850f01b03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 4800 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×4800×10^6×4 = 230.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 4800, "channels": 4, "gbps": 230.4}, "prompt_sha1": "9cc2412d2caca22ff35403a77dab2e2aa0a3ac2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 49 bits wide and the system uses 512 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 524288 bytes = 2^19 bytes.\nOffset bits = 19.\nVPN bits = 49-19 = 30.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 49, "page_bytes": 524288, "offset_bits": 19, "vpn_bits": 30}, "prompt_sha1": "5a66b8b294b1290640551cec86edfcbf4b6a22aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1500 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-40-40 = 1420 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 40, "tcphdr": 40, "mss": 1420}, "prompt_sha1": "43ebf19738a15235844352af3b71020c365dc6e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 2%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.020 × 8 = 0.024000.\nEffective CPI = 1.1 + 0.024000 = 1.124000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.02, "penalty": 8, "result": 1.124}, "prompt_sha1": "811599db3685dddb87bf2698f276b6a6d768650d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×32 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 32, "reach": 8388608}, "prompt_sha1": "2067995b3caff79b7843994de1573c759f045834", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 7` on one shared integer without synchronization. Assume `credits` initially equals 173. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 173; T2 reads 173; both compute 180; T1 writes 180; T2 writes 180. The observed final value is 180, but two serial increments would produce 187.\n\n```\nlock(mutex)\ncredits = credits + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "8d4f460013961bf319dd83e0ee93658e0c00e1bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3222 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "c71dbdda17e52e965bed04ae5dfc27fa1e20ee3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/10 = 0.022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 10, "tau": 0.022}, "prompt_sha1": "18770d9b5b6d791c5b01780aed520786c7cf0814", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 797 and tail index 237, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (797-237) mod 1024 = 560. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 797, "tail": 237, "occupancy": 560}, "prompt_sha1": "24d0536c36c866de17665e32b01e8c51cac5c287", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 64 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 64-15 = 49.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 64, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 49}, "prompt_sha1": "f418a683153d7542dabac4433c96be1a5246ef4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 57-bit up/down counter `updown_57_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_57_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [56:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 57'd144115188075855871) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_57_sat", "width": 57, "wrap": false}, "prompt_sha1": "1e6874a6e08b21e5071d8761ce17b75f7e7f79c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8561-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8561×8 = 68488 bits.\nSerialization delay = bits/rate = 68488/(5000×10^6) s = 1.36976e-05 s = 13.697600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8561, "rate_mbps": 5000, "delay_s": 1.36976e-05}, "prompt_sha1": "9158a2f233870fa3314d71a90910fefdc0c7be3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 8-way set-associative cache uses 256-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/256 = 1024.\nSets = 1024/8 = 128.\nOffset bits = log2(256) = 8; index bits = log2(128) = 7; tag bits = 57-8-7 = 42.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 256, "ways": 8, "addr_bits": 57, "lines": 1024, "sets": 128, "offset": 8, "index": 7, "tag": 42}, "prompt_sha1": "e0c4bebb21ebf5ff165d54b040723ed18bbe4274", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_34_msb` for `34-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_34_msb (\n input logic [33:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 34; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_34_msb", "width": 34, "priority": "high"}, "prompt_sha1": "5bda81ac7468c86422af5febcdc91485e0597327", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 50 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 50 MHz / 16 = 3.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 50000000.0, "divider": 16, "spi_hz": 3125000.0}, "prompt_sha1": "c2a65fd123c17dc057accfccd78cb0a0c7c49abb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 337895102, carries 10284 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 10284+0+1 = 10285. ACK = (337895102+10285) mod 2^32 = 337905387.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 337895102, "payload": 10284, "syn": 0, "fin": 1, "ack": 337905387}, "prompt_sha1": "6eeb343a2aaa820fcb12d15f20f4b9ac600bc94a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000001011010001000 using generator polynomial bits 110001011. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01010011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 395, "msg_bits": 19, "msg": 267912, "remainder": 83}, "prompt_sha1": "e494392fe1ccd0a19f86aff990c6ae299f5f6d26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 51-bit left-shift register module `shiftreg_left_51`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `51-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_51 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [50:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[49:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_51", "width": 51, "direction": "left"}, "prompt_sha1": "a3e790b46a45496868a6af5a2bf220cc98626ab9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_5041` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_5041 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_5041", "width": 4}, "prompt_sha1": "d1874774bbe677c9fef38263a86f6ad8e8b1266c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x32_write_bypass` with 64 entries of 32 bits. Inputs: `clk`, `we`, `6-bit waddr`, `32-bit wdata`, `6-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [31:0] wdata,\n input logic [5:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x32_write_bypass", "entries": 64, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "2e1ba1cbf615af072bb722419719c81424c6ac66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w25_nocin` implementing a 25-bit unsigned adder with inputs `a`, `b` and outputs `25-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w25_nocin (\n input logic [24:0] a,\n input logic [24:0] b,\n output logic [24:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w25_nocin", "width": 25, "cin": false}, "prompt_sha1": "4c4e44c90b72e65acab3a2305478e2fd3148c78a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m2162` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 2162 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m2162 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd2162;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m2162", "width": 13, "max": 2162}, "prompt_sha1": "f232679d4f075591a8321835927f3dc3e90c7b64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/220 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 220, "tau": 0.001}, "prompt_sha1": "00e81fa0c764304515e4db8222fc46d3eb020296", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 5 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 5×10^6 × 300/1000 = 1.5e+06 bits = 187500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 5, "rtt_ms": 300, "bits": 1500000.0, "bytes": 187500.0}, "prompt_sha1": "56bdd924aa93dc00a0db29ec566bc0147f4fd410", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 11001011100010111011111010111011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 21 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11001011100010111011111010111011", "ones": 21, "parity": 1}, "prompt_sha1": "006c471920eb41853d7227929e94e7bd68222140", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 15369 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 15369/10000 s; frequency = 10000/15369 = 0.650660 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 15369, "hz": 0.6506604203266315}, "prompt_sha1": "317e3b86a46a6be6f300030d6239e6d61cbf7134", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 240 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 240000000/8000 = 30000.\nWith prescaler divisor limited to at most 16, the largest divisor of 30000 that also keeps the period count within 16 bits is 16.\nPeriod count = 30000/16 = 1875.\nPSC register = 16-1 = 15.\nARR register = 1875-1 = 1874.\nVerification: 240000000/(16×1875) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 240000000, "target_hz": 8000, "total_division": 30000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 1875, "psc_reg": 15, "arr_reg": 1874}, "prompt_sha1": "90e67872ce4928c437fd7d29a3953965e0061d1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3099 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "ddc02c685dc32f60eccfc300a83adb5d56021e1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_3911` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_3911 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_3911", "width": 5}, "prompt_sha1": "16773858f4598cea6121261473b5a20a315e0d0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1214441076, carries 35538 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 35538+1+0 = 35539. ACK = (1214441076+35539) mod 2^32 = 1214476615.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1214441076, "payload": 35538, "syn": 1, "fin": 0, "ack": 1214476615}, "prompt_sha1": "51daed568166a792246ae6ca390564a16ba66544", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 640 counts per period. What compare/high-time count produces exactly 40% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.4 × 640 = 256. Verification: 256/640 = 0.4, which is 40%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 640, "duty": 40, "high": 256}, "prompt_sha1": "7d071993c885381c9fd5718136d479222f95df11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 145, and period is 2439 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(145×2439) = 90.483663 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 145, "period": 2439, "hz": 90.48366345732423}, "prompt_sha1": "d48fa66d6afd769f270bea96f90e4e9cd8ac4cfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 220 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00022×1²=0.00011 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00021999999999999998, "v": 1, "energy": 0.00010999999999999999}, "prompt_sha1": "91c36cf87564e8faac50bb083e78fc480647e033", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 19 and tail index 11, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (19-11) mod 128 = 8. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 19, "tail": 11, "occupancy": 8}, "prompt_sha1": "17d2b78c886041d2f81c0c34c1713d2aeda3ec88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 24 data bits per transfer at 1600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 24/8 = 3. Bandwidth = 3×1600×10^6×3 = 14.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 24, "rate_mt": 1600, "channels": 3, "gbps": 14.4}, "prompt_sha1": "9bf02d31eec6f14eb9879e31ea56d6fcc89767ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w23_cin` implementing a 23-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `23-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w23_cin (\n input logic [22:0] a,\n input logic [22:0] b,\n input logic cin,\n output logic [22:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w23_cin", "width": 23, "cin": true}, "prompt_sha1": "377e1969b9cfe8c363b294f3629231e1c88dc0ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 32 = 2.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 32, "spi_hz": 2500000.0}, "prompt_sha1": "454a41840a3dcacf3dd4665be48af4bb2d54278e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 36 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 36000000/(16×28800) = 78.125000.\nNearest integer divisor D = 78.\nActual baud = 36000000/(16×78) = 28846.154 baud.\nError = (28846.154-28800)/28800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 36000000, "oversample": 16, "baud": 28800, "divisor": 78, "actual": 28846.153846153848, "error_pct": 0.1602564102564151}, "prompt_sha1": "e86df0d85f366ff6c5bd923a1d75d45f9e0645ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×32 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 32, "reach": 16777216}, "prompt_sha1": "4fc8b37b282606128226a5ce5b1270e23afd82c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m1872` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 1872 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m1872 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd1872;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m1872", "width": 12, "max": 1872}, "prompt_sha1": "c5d6c775db96f5cb9ddbac065da6122c6409e3a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['P', 'V', 'P', 'V', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'P', 'P', 'P', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["P", "V", "P", "V", "V", "V", "P", "P", "V", "P", "P", "V", "P", "P", "P", "P", "V", "V", "V"], "value": 8, "blocked": 0}, "prompt_sha1": "bd15ae7976c6fadc0274672acb072dd23ff6d426", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 52-bit up/down counter `updown_52_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_52_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [51:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 52'd4503599627370495) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_52_sat", "width": 52, "wrap": false}, "prompt_sha1": "43939635f5cc7e6182ecb55fb0e7b041350bdad0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5925-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5925×8 = 47400 bits.\nSerialization delay = bits/rate = 47400/(5000×10^6) s = 9.48e-06 s = 9.480000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5925, "rate_mbps": 5000, "delay_s": 9.48e-06}, "prompt_sha1": "ba0a4ea1f4770fa9110189f9669adf4593eb8853", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [14, 1, 17]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [25, 6, 32].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [14, 1, 17], "finish": [25, 6, 32]}, "prompt_sha1": "f1b23bc56ace1e585525bbf8ca229f39ef58e82a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 75%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.060×(8+0.250×100) = 2.980000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.94, "l2": 8, "l2_hit": 0.75, "mem": 100, "amat": 2.9800000000000018}, "prompt_sha1": "0139382226de5d097cd0988a63bea26659b03116", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 55-bit up/down counter `updown_55_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_55_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [54:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_55_wrap", "width": 55, "wrap": true}, "prompt_sha1": "59f09b2a50fee6d6c21dfed658c53b5a09fe012d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5609(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5609(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5609([1, 2]) == 1.5\nassert mean_5609([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5609"}, "prompt_sha1": "24d98511d0cff68a2baaea10830607ce8a2c3c1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 32 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 115200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 32000000/(4×115200) = 69.444444.\nNearest integer divisor D = 69.\nActual baud = 32000000/(4×69) = 115942.029 baud.\nError = (115942.029-115200)/115200×100% = 0.6441%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 32000000, "oversample": 4, "baud": 115200, "divisor": 69, "actual": 115942.02898550725, "error_pct": 0.6441223832528193}, "prompt_sha1": "d373adbe0264d846638f9d10383b69f53ad7328c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_4113` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_4113 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_4113"}, "prompt_sha1": "ff1336a26ec9f16c27495bfa0daeb04434a91c0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 121, and period is 22090 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(121×22090) = 4.489523 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 121, "period": 22090, "hz": 4.4895225766866576}, "prompt_sha1": "299450a60843b6ec720f530481ce967d655daabe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 1 and tail index 6, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (1-6) mod 8 = 3. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 1, "tail": 6, "occupancy": 3}, "prompt_sha1": "8ee0c7cf185c193c456a8ce91fe4903280064027", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 010100100111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "010100100111", "ones": 6, "parity": 0}, "prompt_sha1": "e62513f8dc41ffd1ee85620ff65b0fe730790d3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 768 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 768/(768+8) = 0.989691 = 98.97%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 768, "overhead": 8, "efficiency": 0.9896907216494846}, "prompt_sha1": "a92a0241dee49ece38d3333414cb375c7e521daa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=47 nF and is stepped to 5 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=5(1-e^-3)=4.751065 V; τ=4.7e-06 s and t=1.41e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 4.7000000000000004e-08, "multiple": 3, "vin": 5, "vc": 4.75106465816068}, "prompt_sha1": "c29b3f76676e5973e73272ec9ef6e059aa5bbdd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2832 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2832/(2832+40+8) = 0.983333 = 98.33%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2832, "iphdr": 40, "eff": 0.9833333333333333}, "prompt_sha1": "3a03750912f8bad3036b2621d423aaa20cdde311", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=1 nF and is stepped to 5 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=5(1-e^-5)=4.966310 V; τ=4.7e-07 s and t=2.35e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1e-09, "multiple": 5, "vin": 5, "vc": 4.966310265004573}, "prompt_sha1": "40367566ba98193cbbd86980a60a2854a37ef396", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6355 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6355/(6355+40+8) = 0.992504 = 99.25%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6355, "iphdr": 40, "eff": 0.9925035139778229}, "prompt_sha1": "e460fe5dd17d0e22b697a41ff63ed9b0ce1639a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 0.75 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×0.75/(3×10^9) = 0.025 s = 25.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 0.75, "ghz": 3.0, "sec": 0.025}, "prompt_sha1": "628498c4baf0adfa8b59c009c52ce3d9154b532d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x20_write_bypass` with 8 entries of 20 bits. Inputs: `clk`, `we`, `3-bit waddr`, `20-bit wdata`, `3-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x20_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [19:0] wdata,\n input logic [2:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x20_write_bypass", "entries": 8, "width": 20, "mode": "write_bypass"}, "prompt_sha1": "07cb52d651d1dbb4819184f314f2c3baac026db3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x3B16, toggle bit 11 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 11)`. Result = 0x3316.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 15126, "bit": 11, "op": "toggle", "result": 13078}, "prompt_sha1": "a37990cccf4ac0a480164271640190ba6da7be4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8512 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8512/(8512+20+8) = 0.996721 = 99.67%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8512, "iphdr": 20, "eff": 0.9967213114754099}, "prompt_sha1": "1502108eb425ce84be388b56343c6f404c883679", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 536, and period is 24600 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(536×24600) = 2.426890 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 536, "period": 24600, "hz": 2.4268899405411966}, "prompt_sha1": "6caa0dbcda4d1aab8cecab247130356e93970c9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 160.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+12 = 172.5. Period = 172.5/1000000 = 0.0001725 s. Maximum rate = 1/period = 5797.101449 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 160.5, "conv_cycles": 12, "period": 0.0001725, "rate": 5797.101449275363}, "prompt_sha1": "e8b0d7188c5943169a61530ab842450adcf40537", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w64_6332` implementing a dual-clock asynchronous FIFO with depth 128 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w64_6332 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 64,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w64_6332", "depth": 128, "width": 64, "ptr_w": 7}, "prompt_sha1": "7c96b1962014dc87ce731fd8a9439261dd1d6e32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.164.91.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.164.91.0\nBroadcast address: 10.164.91.63\nUsable host range: 10.164.91.1 to 10.164.91.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.164.91.0/26", "usable": 62, "first": "10.164.91.1", "last": "10.164.91.62", "broadcast": "10.164.91.63"}, "prompt_sha1": "d27e5a8cbe2ee7da245a48cd8a4e9e059f7564d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_13` for a 13-bit signed input `data`, `4-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_13 (\n input logic signed [12:0] data,\n input logic [3:0] shamt,\n output logic signed [12:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_13", "width": 13, "direction": "right", "arithmetic": true}, "prompt_sha1": "8c6ed07b6b7db3b9be2884d698139cdd05c2ec9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(10×10^6) s = 1.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 16, "time_us": 1.5999999999999999}, "prompt_sha1": "2b25648024133abb1cda395b14980f8e42eaa273", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2200 ohm and C=8200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2200×8200000×10^-12 s = 0.01804 s.\nf_c=1/(2πRC)=1/(2π×2200×8200000×10^-12) = 8.8223 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2200, "c_f": 8.2e-06, "tau": 0.018039999999999997, "fc": 8.822336091568479}, "prompt_sha1": "7155f31e30febbaf2e8760478bf6ac711b4c5354", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 640.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+12 = 652.5. Period = 652.5/40000000 = 1.63125e-05 s. Maximum rate = 1/period = 61302.681992 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 640.5, "conv_cycles": 12, "period": 1.63125e-05, "rate": 61302.681992337166}, "prompt_sha1": "3a38dc8226bdb973e071ad21e2b92f3ba2778718", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 8-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^8 V = 0.012890625 V = 12890.625000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 8, "vref": 3.3, "step": 0.012890625}, "prompt_sha1": "05519883ca431154fec90cd44ce5b117187928ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 10/1000 = 2.5e+06 bits = 312500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 10, "bits": 2500000.0, "bytes": 312500.0}, "prompt_sha1": "c0389fc2de0d99ddac2c4f33bcd7113398f6df6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 70%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.080×(12+0.300×200) = 6.260000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.92, "l2": 12, "l2_hit": 0.7, "mem": 200, "amat": 6.259999999999997}, "prompt_sha1": "ca4fbc7be8199e6291a86b63290a1af1334b7f02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 15%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.150 × 5 = 0.037500.\nEffective CPI = 1.2 + 0.037500 = 1.237500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.15, "penalty": 5, "result": 1.2375}, "prompt_sha1": "eaf0dfe12127e2d98ef4ebb4966be221f5ac16e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 4 and initial occupancy is 2. In an abstract batch, producer attempts to enqueue 98 items first, dropping any excess beyond capacity; then consumer removes up to 64 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=4, dropped=96; consumed=4; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 4, "start": 2, "prod": 98, "cons": 64, "dropped": 96, "consumed": 4, "final": 0}, "prompt_sha1": "f5a25f0417503f818a97eac5573b8a3b4931b6f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m828` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 828 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m828 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd828;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m828", "width": 11, "max": 828}, "prompt_sha1": "8107d6de6e03296a711aa86a7841fb360968a129", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 91.9% hit rate, and a 40 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.919 = 0.081.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.081×40 ns = 5.2400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.919, "penalty": 40, "result": 5.239999999999998}, "prompt_sha1": "535a83698c7a2164b4766f537a2093e35e03e3bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=100 ms, C=3 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/100 + 3/40 = 0.095000 = 9.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 100], [3, 40]], "utilization": 0.095}, "prompt_sha1": "810cccb66ff75615b39da091483b7f69bf029d07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_58_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 58 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_58_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd58;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_58_ignore", "cycles": 58, "retrigger": false}, "prompt_sha1": "4f83c1237d5669e19976c31f74b2aae5a015476f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_2979` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_2979 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_2979"}, "prompt_sha1": "ff7b71f4ff016facbcc6c56c3fd27a9eb87415cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=15000 ohm and C=6800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=15000×6800000×10^-12 s = 0.102 s.\nf_c=1/(2πRC)=1/(2π×15000×6800000×10^-12) = 1.5603 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 15000, "c_f": 6.8e-06, "tau": 0.10200000000000001, "fc": 1.5603425793323074}, "prompt_sha1": "66af873db3c70f83deef5052b92307e5e6c35985", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 89.0% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.890 = 0.110.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.110×190 ns = 22.9000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.89, "penalty": 190, "result": 22.9}, "prompt_sha1": "af251afc9334322da35085008d32ab605d297f8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1879 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "25336ea172867b38c886c2673f2a8a38580d90b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 29 and initial occupancy is 23. In an abstract batch, producer attempts to enqueue 66 items first, dropping any excess beyond capacity; then consumer removes up to 0 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=29, dropped=60; consumed=0; final occupancy=29.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 29, "start": 23, "prod": 66, "cons": 0, "dropped": 60, "consumed": 0, "final": 29}, "prompt_sha1": "054ada29bf075a4de529739dd427f95a5ad09f46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 60 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 60000000/500 = 120000.\nWith prescaler divisor limited to at most 64, the largest divisor of 120000 that also keeps the period count within 16 bits is 64.\nPeriod count = 120000/64 = 1875.\nPSC register = 64-1 = 63.\nARR register = 1875-1 = 1874.\nVerification: 60000000/(64×1875) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 60000000, "target_hz": 500, "total_division": 120000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 1875, "psc_reg": 63, "arr_reg": 1874}, "prompt_sha1": "f6da31444a99d77f2cbc8c28d2464d2f0f4de896", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTTNNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 1, 0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "aa7875dde405fd22cd5c686fbfc4ade793b85ab7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 11010001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11010001", "ones": 4, "parity": 0}, "prompt_sha1": "2cafba5a2a08de36dbbc2a41b2c295e4b1186bff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w35_cin` implementing a 35-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `35-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w35_cin (\n input logic [34:0] a,\n input logic [34:0] b,\n input logic cin,\n output logic [34:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w35_cin", "width": 35, "cin": true}, "prompt_sha1": "8602cf083ed7f3b1d5f790b6a362dd9ad6c040ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 400 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 400 = 120. Verification: 120/400 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 400, "duty": 30, "high": 120}, "prompt_sha1": "d80a167afa38a8b59a97d5376e6ec812eb14f20b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(24×10^6) s = 1.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 32, "time_us": 1.3333333333333335}, "prompt_sha1": "1c46310be846e41ca03bcfa21effcb196d6f9230", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2731796125, carries 42690 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 42690+0+0 = 42690. ACK = (2731796125+42690) mod 2^32 = 2731838815.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2731796125, "payload": 42690, "syn": 0, "fin": 0, "ack": 2731838815}, "prompt_sha1": "c9f5a646e34fee55f5150409fae4ef4fab73157f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6302(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6302(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6302([1, 2]) == 1.5\nassert mean_6302([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6302"}, "prompt_sha1": "edc873d63843b835385f154f7bb376b5f53b40c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_532622` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_532622 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_532622"}, "prompt_sha1": "e5fc183f562e07144229910e6ba53b2c3deb4bf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 12.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+20 = 32.5. Period = 32.5/12000000 = 2.70833333e-06 s. Maximum rate = 1/period = 369230.769231 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 12.5, "conv_cycles": 20, "period": 2.7083333333333334e-06, "rate": 369230.76923076925}, "prompt_sha1": "2c95dda8b058460b4c9b85d8c2c9544fb7fd6e43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10110110110011111001 using generator polynomial bits 1011. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 11, "msg_bits": 20, "msg": 748793, "remainder": 1}, "prompt_sha1": "e1c312741b62414d0cd3d6aa3756281eb1c4649e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 4 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×80×10^6 = 320000000 B/s. Time = 1048576/320000000 = 0.0032768 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 4, "rate_mhz": 80, "sec": 0.0032768}, "prompt_sha1": "b2f5d5203f1aea716edd0660d70eefac860e1ae8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 4000 payload bytes plus 96 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 4000/(4000+96) = 0.976562 = 97.66%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 4000, "overhead": 96, "efficiency": 0.9765625}, "prompt_sha1": "327994fbb1ecb2ad33cc1c4b39c307a88f198f5c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1062` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1062 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1062 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1062;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1062", "width": 11, "max": 1062}, "prompt_sha1": "aa02a452df2801adb903311d0eef5fa6a657887b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 256 = 0.234375 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 256, "spi_hz": 234375.0}, "prompt_sha1": "96893dc1c862e66e3be35d3169565183b5685502", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 31-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^31/2^18 = 2^13 = 8192 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 31, "page_exp": 18, "entries": 8192}, "prompt_sha1": "c91c1363290001c3f4d2bcc3fc535e92ecbdcbc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TTTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 1, 1, 0, 0], "final_state": 1}, "prompt_sha1": "7c4bcdea0d26688029710acc671aa84d6d408b19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/10 = 0.00022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 10, "tau": 0.00022}, "prompt_sha1": "91513e2e269f7a9202f4c094c14e2821421bf6b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 2 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×50×10^6 = 100000000 B/s. Time = 1048576/100000000 = 0.01048576 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 2, "rate_mhz": 50, "sec": 0.01048576}, "prompt_sha1": "0fa529a8177f2974f05001abee61fadd8ae0719e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x366279E6, set bit 57 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 57)`. Result = 0x2000000366279E6.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 912423398, "bit": 57, "op": "set", "result": 144115188988279270}, "prompt_sha1": "dd7caea70a3024203e0e3eeb7a379fd212544f21", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x07, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x07<<1)|0 = 0x0E = 00001110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 7, "rw": 0, "byte": 14}, "prompt_sha1": "cf6eb23d6b75cfa6df134f25a88f5066f8cba912", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 855, and period is 16410 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(855×16410) = 0.855277 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 855, "period": 16410, "hz": 0.8552765215903867}, "prompt_sha1": "0f6b073fdf2fb078da9da9db7b097eb698d9ef39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 90%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.030×(8+0.100×120) = 1.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.97, "l2": 8, "l2_hit": 0.9, "mem": 120, "amat": 1.6000000000000005}, "prompt_sha1": "427b22a9b4c73d50d7f880c90b04a897a4396cc2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_8733` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_8733 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_8733", "width": 10}, "prompt_sha1": "55e9911f5243cafb72caebc0a3390f6e22347129", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 36 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 36 = 39.\nClock pulses = 39×9 = 351.\nTime = 351/400000 s = 877.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 36, "clocks": 351, "time_s": 0.0008775}, "prompt_sha1": "2621ead3bc869ee0f69f7b9e9a8c74cc7f4083e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 57 and initial occupancy is 42. In an abstract batch, producer attempts to enqueue 18 items first, dropping any excess beyond capacity; then consumer removes up to 151 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=57, dropped=3; consumed=57; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 57, "start": 42, "prod": 18, "cons": 151, "dropped": 3, "consumed": 57, "final": 0}, "prompt_sha1": "0c1920dd99e86c07d296736672348268947113ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=100000 ohm and C=2200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=100000×2200000×10^-12 s = 0.22 s.\nf_c=1/(2πRC)=1/(2π×100000×2200000×10^-12) = 0.7234 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 100000, "c_f": 2.2e-06, "tau": 0.22, "fc": 0.7234315595086153}, "prompt_sha1": "dacc79a32fc9980743d05acbfa44b982162b110f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 27 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×27)/(22000+27) = 26.966904 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 27, "req": 26.966904253870254}, "prompt_sha1": "2166339c898619cccd833d335a432db255a179e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_35_msb` for `35-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_35_msb (\n input logic [34:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 35; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_35_msb", "width": 35, "priority": "high"}, "prompt_sha1": "246d901b77ccbe4599017817fac9920541862970", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x24_write_bypass` with 8 entries of 24 bits. Inputs: `clk`, `we`, `3-bit waddr`, `24-bit wdata`, `3-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x24_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [23:0] wdata,\n input logic [2:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x24_write_bypass", "entries": 8, "width": 24, "mode": "write_bypass"}, "prompt_sha1": "9ba0781b9ed9aeb439336109290ee5c19cf30a10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 55-bit left-shift register module `shiftreg_left_55`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `55-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_55 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [54:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[53:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_55", "width": 55, "direction": "left"}, "prompt_sha1": "21b97a461a0658b97d1bc2f180d5b49eefc93a95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 100 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 100 = 70. Verification: 70/100 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 100, "duty": 70, "high": 70}, "prompt_sha1": "25105c2952611b2c87d865b69ea5b0650a9f0c86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8701-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8701×8 = 69608 bits.\nSerialization delay = bits/rate = 69608/(25000×10^6) s = 2.78432e-06 s = 2.784320 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8701, "rate_mbps": 25000, "delay_s": 2.78432e-06}, "prompt_sha1": "75f1633f8fa8c70b4aa9f5bfe8c47a0e22fff5bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_40_24_8` with RED, GREEN, YELLOW states. Hold RED for 40 clock cycles, GREEN for 24, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_40_24_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 39) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 23) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_40_24_8", "red": 40, "green": 24, "yellow": 8}, "prompt_sha1": "272ca304d1d53f3f28a6664f24359a7476900e0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 5-bit right-shift register module `shiftreg_right_5`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `5-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_5 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [4:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[4:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_5", "width": 5, "direction": "right"}, "prompt_sha1": "145a1584e064a4fab6f538ebc56a62e18641a2a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.78. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.78) + 0.78/192) = 4.463040.\nThe theoretical speedup is about 4.463×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.78, "n": 192, "result": 4.463040446304046}, "prompt_sha1": "6fcb19c79e93eda8f76e6816be2c8a2abf31bc4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.25 ns hit time, 89.6% hit rate, and a 65 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.896 = 0.104.\nAMAT = hit time + miss rate × miss penalty\n= 3.25 ns + 0.104×65 ns = 10.0100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.25, "hit_rate": 0.896, "penalty": 65, "result": 10.009999999999998}, "prompt_sha1": "797f95147cb8c9efd2a370748f3db2a06da75ba7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1/(3.5×10^9) = 0.000571428571 s = 0.571429 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.0, "ghz": 3.5, "sec": 0.0005714285714285715}, "prompt_sha1": "c98ed79585e59d83cb5ec8b7da469fbe6288e685", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 65536 bytes over a datapath transferring 2 bytes per beat at 200 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×200×10^6 = 400000000 B/s. Time = 65536/400000000 = 0.00016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 65536, "width": 2, "rate_mhz": 200, "sec": 0.00016384}, "prompt_sha1": "f2a154bea8db7c3855284edb890428b381deacbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `items` elements of type `float`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n total += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `words[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n total += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "14565026c3383d12c5506c369c01c09aa8248a17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 2 = 0.004000.\nEffective CPI = 1 + 0.004000 = 1.004000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.02, "penalty": 2, "result": 1.004}, "prompt_sha1": "2f4a7e42dfabcada2ff24e40dcd9b300fdf87e18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 16-way set-associative cache uses 32-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/32 = 512.\nSets = 512/16 = 32.\nOffset bits = log2(32) = 5; index bits = log2(32) = 5; tag bits = 64-5-5 = 54.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 32, "ways": 16, "addr_bits": 64, "lines": 512, "sets": 32, "offset": 5, "index": 5, "tag": 54}, "prompt_sha1": "e9887b8f335b7141aacc22b09151dae3867740c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 3499 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×3499/(32×10^6) = 0.054671875 = 5.467188%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 500, "cycles": 3499, "load": 0.054671875}, "prompt_sha1": "3c39de39e5e47bcff230a1cc0ce7b8244f3812fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_40_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 40 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_40_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd40;\n end else begin\n if (pulse_in)\n count <= 6'd40;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_40_retrig", "cycles": 40, "retrigger": true}, "prompt_sha1": "77eae91ab86917c6233b9ee175995e2ff448fcc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 7 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 7 = 9.\nClock pulses = 9×9 = 81.\nTime = 81/100000 s = 810.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 7, "clocks": 81, "time_s": 0.00081}, "prompt_sha1": "bb810600230ed4a0548d10ff41a876f8723fde61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 18 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 18000000/(4×38400) = 117.187500.\nNearest integer divisor D = 117.\nActual baud = 18000000/(4×117) = 38461.538 baud.\nError = (38461.538-38400)/38400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 18000000, "oversample": 4, "baud": 38400, "divisor": 117, "actual": 38461.53846153846, "error_pct": 0.1602564102564088}, "prompt_sha1": "237a6c5840b107938fad07a224fcce8a5f587ade", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_65_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 65 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_65_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd65;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_65_ignore", "cycles": 65, "retrigger": false}, "prompt_sha1": "f60d64721f11321a1e2caee3b580edafa59cf2ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_27_7_7` with RED, GREEN, YELLOW states. Hold RED for 27 clock cycles, GREEN for 7, and YELLOW for 7; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_27_7_7 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 26) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 6) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 6) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_27_7_7", "red": 27, "green": 7, "yellow": 7}, "prompt_sha1": "ccb760948e9d1c374b1b4cf8339156e99fad9ac9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×256 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 256, "reach": 67108864}, "prompt_sha1": "d4802df47afba859f31cbdccee0a7b279b0f4b20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xEF96EECA. Extract the 5-bit field starting at bit 20 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xEF96EECA >> 20) & 0x1F = 0x19 (25).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 20, "value": 4019646154, "mask": 31, "field": 25}, "prompt_sha1": "2e458bdb760eb4ba809405205e8a8245d2747491", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1101011111010001010 using generator polynomial bits 101000001. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11001001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 321, "msg_bits": 19, "msg": 441994, "remainder": 201}, "prompt_sha1": "ff48caa87b7ac6bcf700ddd0003f9d35d6d4d2ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w19_unsigned` comparing two 19-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w19_unsigned (\n input logic [18:0] a,\n input logic [18:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w19_unsigned", "width": 19, "signed": false}, "prompt_sha1": "0c398c937ed371b0e667dcbfffb8dc4bf304f54a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×5²=0.0125 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 5, "energy": 0.0125}, "prompt_sha1": "bc633121e5736259c2a4bf9b66baae42c7344ea4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 200/1000 = 5e+07 bits = 6.25e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 200, "bits": 50000000.0, "bytes": 6250000.0}, "prompt_sha1": "be41cc23c34356904efde6d68dcbb0f06a344918", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.216.205.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.216.205.0\nBroadcast address: 10.216.205.15\nUsable host range: 10.216.205.1 to 10.216.205.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.216.205.0/28", "usable": 14, "first": "10.216.205.1", "last": "10.216.205.14", "broadcast": "10.216.205.15"}, "prompt_sha1": "4eed7dd412884400f072f68b3d3c98c286d51303", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 50000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 50000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 50000}, "prompt_sha1": "75839b936cd489e26e55340ac1be58ed95a298dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `entries` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n acc += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `data[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n acc += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8e85be33205aba3b1ae5637092cfb068b3ef9ff8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×2/1000/8 = 5000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 2, "bytes": 5000.0}, "prompt_sha1": "f9467d57ea13021e62a5e4c1460091940f3113ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (256×8) = 97656.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 256, "pps": 97656.25}, "prompt_sha1": "ddf4219bc8a42633710325f6c6605e996636ea14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTTTNNNNTTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1], "final_state": 3}, "prompt_sha1": "cab2c85449a95d512d3f660928813301b6f138d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_54_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 54 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_54_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd54;\n end else begin\n if (pulse_in)\n count <= 6'd54;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_54_retrig", "cycles": 54, "retrigger": true}, "prompt_sha1": "209e84a6c77735d1c656b1d2421b8ae5f3a7ba61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1652494022, carries 37128 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 37128+1+1 = 37130. ACK = (1652494022+37130) mod 2^32 = 1652531152.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1652494022, "payload": 37128, "syn": 1, "fin": 1, "ack": 1652531152}, "prompt_sha1": "aae3229a449d69623f7f043f548f85147d94faaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 38-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^38/2^15 = 2^23 = 8388608 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 38, "page_exp": 15, "entries": 8388608}, "prompt_sha1": "e2c888bf1e12e86dfe9207518fcdb49c988d70e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_5103` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_5103 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_5103", "width": 16}, "prompt_sha1": "6c02ba1cf3526e64ed95f48acd6fa42cac59c755", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x39. Extract the 2-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0x39 >> 3) & 0x3 = 0x3 (3).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 2, "lsb": 3, "value": 57, "mask": 3, "field": 3}, "prompt_sha1": "9d250030efda49c6005c95de8b46fa814c40ce80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_1364` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_1364 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_1364"}, "prompt_sha1": "e3568e053d6e55187b4df878357ce04a85a146e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 597. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 597/1023 × 2.5 V = 1.458944 V.\nThus the estimated input is about 1.4589 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 597, "volts": 1.4589442815249267}, "prompt_sha1": "a9154bc56483102ef4c6b6a3d983778fdc9ca8c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [28, 17, 1]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [46, 38, 9].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [28, 17, 1], "finish": [46, 38, 9]}, "prompt_sha1": "4f282b8fc24f90443a695d7bd93b027ae1490302", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 9600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(8×9600) = 1875.000000.\nNearest integer divisor D = 1875.\nActual baud = 144000000/(8×1875) = 9600.000 baud.\nError = (9600.000-9600)/9600×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 8, "baud": 9600, "divisor": 1875, "actual": 9600.0, "error_pct": 0.0}, "prompt_sha1": "68df8727a32fb2dc252e85210109fbc3924b7469", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [22, 3, 22]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [46, 8, 47].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [22, 3, 22], "finish": [46, 8, 47]}, "prompt_sha1": "eb7fa17eac9f532f9207a5f0cee58291ea878cd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 2-way set-associative cache uses 64-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/64 = 256.\nSets = 256/2 = 128.\nOffset bits = log2(64) = 6; index bits = log2(128) = 7; tag bits = 64-6-7 = 51.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 64, "ways": 2, "addr_bits": 64, "lines": 256, "sets": 128, "offset": 6, "index": 7, "tag": 51}, "prompt_sha1": "b087eccb7ad9a4d16bfda8873511ab374a718a2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 34476. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 34476/65535 × 5 V = 2.630350 V.\nThus the estimated input is about 2.6304 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 34476, "volts": 2.630350194552529}, "prompt_sha1": "0ff007d82a749e503ed97c42525aa3704055473a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 8 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×80×10^6 = 640000000 B/s. Time = 128/640000000 = 2e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 8, "rate_mhz": 80, "sec": 2e-07}, "prompt_sha1": "96641f21e413f7e29bf3614edbc88a4f6bb300a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xD2. Extract the 6-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xD2 >> 1) & 0x3F = 0x29 (41).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 6, "lsb": 1, "value": 210, "mask": 63, "field": 41}, "prompt_sha1": "bdd66329a765a6bc1c59993730ba65327faadf95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 37-bit right-shift register module `shiftreg_right_37`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `37-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_37 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [36:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[36:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_37", "width": 37, "direction": "right"}, "prompt_sha1": "c2c729d35e885150225bf1121a9644191a82f472", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTTTTTNNTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1], "final_state": 3}, "prompt_sha1": "3be26c1afd7724e9ab47005dbb0942c6b89c15c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 33 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 33-17 = 16.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 33, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 16}, "prompt_sha1": "85c4b54319d8bd2cbc52eeb04c75b32e7d78f784", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2075-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2075×8 = 16600 bits.\nSerialization delay = bits/rate = 16600/(25000×10^6) s = 6.64e-07 s = 0.664000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2075, "rate_mbps": 25000, "delay_s": 6.64e-07}, "prompt_sha1": "32d0c75d385927c4b4ffb1ab6ac4fa1102fa2242", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2750(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2750(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2750([1, 2]) == 1.5\nassert mean_2750([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2750"}, "prompt_sha1": "b682898ee122a0d6c418fc183753d66668369485", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 8-way set-associative cache uses 16-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/16 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(16) = 4; index bits = log2(1024) = 10; tag bits = 40-4-10 = 26.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 16, "ways": 8, "addr_bits": 40, "lines": 8192, "sets": 1024, "offset": 4, "index": 10, "tag": 26}, "prompt_sha1": "66a1a0452e06a31ca8aeac3d9abde42c049345ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(2×10^6) s = 4.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 8, "time_us": 4.0}, "prompt_sha1": "9cbee1429c80fa2aafd96de0b96b831d9de35adf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x628B6741, clear bit 10 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 10)`. Result = 0x628B6341.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 1653303105, "bit": 10, "op": "clear", "result": 1653302081}, "prompt_sha1": "aa68c661ea711b5a91ab8bed4ae4ed0b70654327", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_4433` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_4433 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_4433", "width": 24}, "prompt_sha1": "ae7bf22d48f9241b9f796066b552aa581e82738e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_114_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 114 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_114_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd114;\n end else begin\n if (pulse_in)\n count <= 7'd114;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_114_retrig", "cycles": 114, "retrigger": true}, "prompt_sha1": "f2272cafdcdb7f6c81ab186fa7aec5ed4fa3074a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=220 nF and is stepped to 5 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=5(1-e^-1)=3.160603 V; τ=2.2e-05 s and t=2.2e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 2.2e-07, "multiple": 1, "vin": 5, "vc": 3.1606027941427883}, "prompt_sha1": "9870378efcbc941264dea532f697b7e36acc3e7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 40 and initial occupancy is 4. In an abstract batch, producer attempts to enqueue 22 items first, dropping any excess beyond capacity; then consumer removes up to 87 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=26, dropped=0; consumed=26; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 40, "start": 4, "prod": 22, "cons": 87, "dropped": 0, "consumed": 26, "final": 0}, "prompt_sha1": "06f88f087899e738c762c113fa1aa8a3f7c62068", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 713, and period is 4473 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(713×4473) = 20.067420 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 713, "period": 4473, "hz": 20.067420261008156}, "prompt_sha1": "0f88dbca553f05c681b0a05b3b5773248f82a4dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x48, set bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 6)`. Result = 0x48.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 72, "bit": 6, "op": "set", "result": 72}, "prompt_sha1": "b391df064b0b7c4bb793f75fa3b2d3d4a879baa5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 10000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 512. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/10000 = 14400.\nWith prescaler divisor limited to at most 512, the largest divisor of 14400 that also keeps the period count within 16 bits is 480.\nPeriod count = 14400/480 = 30.\nPSC register = 480-1 = 479.\nARR register = 30-1 = 29.\nVerification: 144000000/(480×30) = 10000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 10000, "total_division": 14400, "max_prescaler": 512, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 480, "period": 30, "psc_reg": 479, "arr_reg": 29}, "prompt_sha1": "6eebc79e8dd2ccde6865515d6189565f9c627e38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 5` on one shared integer without synchronization. Assume `items` initially equals 43. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 43; T2 reads 43; both compute 48; T1 writes 48; T2 writes 48. The observed final value is 48, but two serial increments would produce 53.\n\n```\nlock(mutex)\nitems = items + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "7bd0816c82c26fe62335ef7048f0a95ff4b5b33e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×1/1000/8 = 12500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 1, "bytes": 12500000.0}, "prompt_sha1": "abe32d89c779fa89227c6db0e282942ea0fef976", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×16 KiB = 384 KiB = 393216 bytes = 0.375000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 16, "reach": 393216}, "prompt_sha1": "5c19a8a342795e427ec27c79cce0f92a972bb779", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 65 and tail index 109, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (65-109) mod 256 = 212. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 65, "tail": 109, "occupancy": 212}, "prompt_sha1": "244772db2b728a84d1681d1b84d9a1716d15d5b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.5 on a 4.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.5/(4.5×10^9) = 0.000666666667 s = 0.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.5, "ghz": 4.5, "sec": 0.0006666666666666666}, "prompt_sha1": "317742fb8cb1bf67f1b3d66961e613ee0e4c597d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w34_signed` comparing two 34-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w34_signed (\n input logic signed [33:0] a,\n input logic signed [33:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w34_signed", "width": 34, "signed": true}, "prompt_sha1": "f27a5635a2429f98b46cfae162ae076ccddd182c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1600 payload bytes plus 18 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1600/(1600+18) = 0.988875 = 98.89%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1600, "overhead": 18, "efficiency": 0.9888751545117429}, "prompt_sha1": "9e1d7c55c8c9aa736ce8f5bfa21601cfbcf6ee27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=220 nF and is stepped to 9 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=9(1-e^-5)=8.939358 V; τ=0.0001034 s and t=0.000517 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 2.2e-07, "multiple": 5, "vin": 9, "vc": 8.93935847700823}, "prompt_sha1": "cef5a10a74d6fa3360832ef39c9766a78bc2d225", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 57-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^57/2^21 = 2^36 = 68719476736 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 57, "page_exp": 21, "entries": 68719476736}, "prompt_sha1": "bfcaaea2b2fa0649d741bb84d55e3447515d2238", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 3439. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 3439/4095 × 3.3 V = 2.771355 V.\nThus the estimated input is about 2.7714 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 3439, "volts": 2.771355311355311}, "prompt_sha1": "9561683fb7b298538457f03c6b939563b9fa78b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 97%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.060×(3+0.030×80) = 2.324000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.94, "l2": 3, "l2_hit": 0.97, "mem": 80, "amat": 2.3240000000000003}, "prompt_sha1": "6e624871ec187e997715b38619f5274d0c28c82f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1000 million instructions at average CPI 1.2 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1000×10^6×1.2/(0.8×10^9) = 1.5 s = 1500.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1000, "cpi": 1.2, "ghz": 0.8, "sec": 1.5}, "prompt_sha1": "4c11602ce4675422695a27fda1875eb418575ef1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 4000 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-20-40 = 3940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 20, "tcphdr": 40, "mss": 3940}, "prompt_sha1": "13cf2ae3a61d4c98ecffd415774e2ec5fdeb4f37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 41 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 41-14 = 27.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 41, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 27}, "prompt_sha1": "b72872b7b930fc133657b50741baa88e56925c64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/10=0.33 A. P=V²/R=3.3²/10=1.089 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 10, "i": 0.32999999999999996, "p": 1.089}, "prompt_sha1": "8bedfe09e88ab852cb7447a83df8ff7ce486fe0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_87` for a synchronous sampled input `noisy`. Update output `clean` only after observing 87 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_87 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 86) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_87", "stable_samples": 87}, "prompt_sha1": "eafecf7851a799b6c0eabdae52ecfcb8790059f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.4 V source drives a 820 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.4-3.3 = 8.1 V.\nI = V/R = 8.1/820 A = 9.8780 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.4, "vf": 3.3, "r": 820, "current_a": 0.009878048780487807}, "prompt_sha1": "f31e649ca04d181f265f46e5b2419ba871bc0b66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 4 ns and L2 local hit rate is 85%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.040×(4+0.150×80) = 1.640000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.96, "l2": 4, "l2_hit": 0.85, "mem": 80, "amat": 1.6400000000000006}, "prompt_sha1": "d19b36a4329e687b5f2e527285537570922338d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x32_write_bypass` with 32 entries of 32 bits. Inputs: `clk`, `we`, `5-bit waddr`, `32-bit wdata`, `5-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [31:0] wdata,\n input logic [4:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x32_write_bypass", "entries": 32, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "b97f4a5539bc5a42ac6c5a731b16009d4446eac1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 1001100111011110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 10 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1001100111011110", "ones": 10, "parity": 0}, "prompt_sha1": "454ce14bd18942912659035364d3686185a43cc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 54-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^54/2^11 = 2^43 = 8796093022208 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 54, "page_exp": 11, "entries": 8796093022208}, "prompt_sha1": "a27cb1392e596eed9a4f05f2ebaf71a37d46dbbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 100 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×100×10^6×8 = 1.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 100, "channels": 8, "gbps": 1.6}, "prompt_sha1": "814a68191aeeb045f870904c2136a9e9026e5429", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×56)/(47000+56) = 55.933356 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 56, "req": 55.93335600136009}, "prompt_sha1": "366a99639b11c09d2a3d3884ba832bfd87f773ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 640 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 640 = 128. Verification: 128/640 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 640, "duty": 20, "high": 128}, "prompt_sha1": "6156e4fc4f6645ddb1a15d3e2a2643f5e55ef9b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 19-bit right-shift register module `shiftreg_right_19`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `19-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_19 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [18:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[18:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_19", "width": 19, "direction": "right"}, "prompt_sha1": "238d9151eb14aeabc70bee429e345b8cc57057a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 0 and tail index 1, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (0-1) mod 8 = 7. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 0, "tail": 1, "occupancy": 7}, "prompt_sha1": "b16113f0754a862b3086c61070afd2a2d958c379", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=40 ms, C=1 ms,T=5 ms, C=4 ms,T=5 ms, C=4 ms,T=5 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/40 + 1/5 + 4/5 + 4/5 + 4/50 = 1.955000 = 195.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 40], [1, 5], [4, 5], [4, 5], [4, 50]], "utilization": 1.955}, "prompt_sha1": "91fd229f6bf7ba9991006acc77423b08dac82ecd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 42-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^42/2^15 = 2^27 = 134217728 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 42, "page_exp": 15, "entries": 134217728}, "prompt_sha1": "d98abe7cdc202543dcb879a419dbfec1f0161f48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x48_write_bypass` with 32 entries of 48 bits. Inputs: `clk`, `we`, `5-bit waddr`, `48-bit wdata`, `5-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [47:0] wdata,\n input logic [4:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x48_write_bypass", "entries": 32, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "7fa71ad7f6024270398211f5a753af67c290b194", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=22 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/1 = -22.000000.\nVout = A_v×Vin = -22.000000×0.1 = -2.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 22, "vin": 0.1, "gain": -22.0, "vout": -2.2}, "prompt_sha1": "04a25ca08b783eedc7e7ad59297da8d579620dac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.63. Using Amdahl's law, compute the theoretical speedup on 96 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.63) + 0.63/96) = 2.655602.\nThe theoretical speedup is about 2.656×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.63, "n": 96, "result": 2.6556016597510372}, "prompt_sha1": "3011373488e11bb62876dc5439423777728ac462", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/2.2 = 0.000454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 2.2, "tau": 0.00045454545454545455}, "prompt_sha1": "e531626a7f93635622baec3baf72a48c1215c6a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 36000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 36000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 36000.0}, "prompt_sha1": "5c0ff182a36851a1b4ab285b9676e6a6451ff739", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 16 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 16×1024 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 16, "page_kib": 1024, "reach": 16777216}, "prompt_sha1": "5fb50608b8ef2c49b181526ed2f3538a71f36fb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_36_60_15` with RED, GREEN, YELLOW states. Hold RED for 36 clock cycles, GREEN for 60, and YELLOW for 15; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_36_60_15 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 35) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 59) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 14) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_36_60_15", "red": 36, "green": 60, "yellow": 15}, "prompt_sha1": "806139b141956e01b64758448a4359c8ef8e4d90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 97%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.060×(6+0.030×60) = 0.968000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.94, "l2": 6, "l2_hit": 0.97, "mem": 60, "amat": 0.9680000000000005}, "prompt_sha1": "62fb21ccce499797ba41e755f9192169b7b8c529", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (512×8) = 24414.062500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 512, "pps": 24414.0625}, "prompt_sha1": "f4762fdd93a3821ce24a72aaf07dbb9958461155", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_9634` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_9634 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_9634"}, "prompt_sha1": "f129adf24a2794fd1c2b07d78c6e4bb17a0be263", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8747(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8747(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8747([1, 2]) == 1.5\nassert mean_8747([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8747"}, "prompt_sha1": "542ecb22cff0b655d0ac3a0e8a9da3c0f8c18eaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/1000 = 0.00022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 1000, "tau": 0.00022}, "prompt_sha1": "8b249f4f52bd5e84cbfbbfc87744c83b799a92d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6703` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6703 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6703"}, "prompt_sha1": "1fbaf0dd728f651211c07f21945024b161117ca0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 2%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.020 × 2 = 0.002000.\nEffective CPI = 1.1 + 0.002000 = 1.102000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.02, "penalty": 2, "result": 1.102}, "prompt_sha1": "3911288daddf697d47e7728e3f61ad489f901574", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 8 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×20×10^6 = 160000000 B/s. Time = 1048576/160000000 = 0.0065536 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 8, "rate_mhz": 20, "sec": 0.0065536}, "prompt_sha1": "da501a30181844ad25f9f9f957ee1332d84bd6a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-32 = 1248 bytes.\nRound down to an 8-byte multiple: floor((1248)/8)×8 = 1248 bytes.\nFragments required = ceil(10000/1248) = 9.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 32, "payload": 10000, "max_payload": 1248, "fragments": 9}, "prompt_sha1": "9dffbc11c25b05bcbbd576fc56f06b84de9998b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xF4DEE6EC. Extract the 6-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xF4DEE6EC >> 3) & 0x3F = 0x1D (29).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 3, "value": 4108248812, "mask": 63, "field": 29}, "prompt_sha1": "d5c219fcf460d6031a2031896cc86f0d1ad4bd2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 36-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^36/2^11 = 2^25 = 33554432 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 36, "page_exp": 11, "entries": 33554432}, "prompt_sha1": "2f1c8880693db17785149310c17c43df89abc718", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 47-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^47/2^21 = 2^26 = 67108864 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 47, "page_exp": 21, "entries": 67108864}, "prompt_sha1": "603046ad6d3c1b6b9c722db175b3a35b870ad9b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3839 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "829d3b02638de8de43f37690e384c2cc5b1908c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 21064 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 21064/1000000 s; frequency = 1000000/21064 = 47.474364 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 21064, "hz": 47.47436384352449}, "prompt_sha1": "d591fffe8721911c0db29c8055b5b34c0df8073b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 50 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 50000000/(4×1200) = 10416.666667.\nNearest integer divisor D = 10417.\nActual baud = 50000000/(4×10417) = 1199.962 baud.\nError = (1199.962-1200)/1200×100% = -0.0032%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 50000000, "oversample": 4, "baud": 1200, "divisor": 10417, "actual": 1199.9616012287606, "error_pct": -0.003199897603280988}, "prompt_sha1": "14e41461a89d5cccc0e6238244718e5b8c053df6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 14.2 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 14.2-3 = 11.2 V.\nI = V/R = 11.2/680 A = 16.4706 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 14.2, "vf": 3.0, "r": 680, "current_a": 0.016470588235294115}, "prompt_sha1": "e51edc2be99b12776ee5dc3342ea63a4ba139627", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (1200×8) = 1041666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 1200, "pps": 1041666.6666666666}, "prompt_sha1": "6bc7f2573d0ccbc8af5e68c1e8b0aef1fbc31cb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_8_32_18` with RED, GREEN, YELLOW states. Hold RED for 8 clock cycles, GREEN for 32, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_8_32_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 7) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 31) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_8_32_18", "red": 8, "green": 32, "yellow": 18}, "prompt_sha1": "399146abcc49fd85712924743e597e57c137ffee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 27 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×27)/(2200+27) = 26.672654 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 27, "req": 26.672653794342164}, "prompt_sha1": "da58c627791c7184a439c8d43c1f91a6950cd382", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=20 ms, C=1 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/20 + 1/5 = 0.450000 = 45.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 20], [1, 5]], "utilization": 0.45}, "prompt_sha1": "914f39b6255b87e4e6a483c3cfa4b54c8867f686", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_53236` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_53236 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_53236"}, "prompt_sha1": "0b21afd5619198bf37086cddaa608c2a7dd2b05f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_12` generating a one-clock-cycle `tick` every 12 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_12 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 11) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_12", "divide": 12}, "prompt_sha1": "56be55ee9b2367f28f017f1181f968166ea7ebc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=25 ms, C=4 ms,T=50 ms, C=1 ms,T=5 ms, C=5 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/25 + 4/50 + 1/5 + 5/20 = 0.650000 = 65.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 25], [4, 50], [1, 5], [5, 20]], "utilization": 0.65}, "prompt_sha1": "ce57ee18e05f07de66a99cc41f3acd44cbcaf916", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.65. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.65) + 0.65/3) = 1.764706.\nThe theoretical speedup is about 1.765×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.65, "n": 3, "result": 1.7647058823529411}, "prompt_sha1": "ffd1407c78c08db345156936bad38e15ed7ce4b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 250000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 250000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 250000.0}, "prompt_sha1": "9f0294dc5c924d70967a52cbc6d1b3907c833696", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 2.5 V reference and returns code 1310. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 1310/4095 × 2.5 V = 0.799756 V.\nThus the estimated input is about 0.7998 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 2.5, "code": 1310, "volts": 0.7997557997557997}, "prompt_sha1": "6a24fa7a8d94c09ce8327265186131a469421aa3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2400 counts per period. What compare/high-time count produces exactly 80% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.8 × 2400 = 1920. Verification: 1920/2400 = 0.8, which is 80%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2400, "duty": 80, "high": 1920}, "prompt_sha1": "75e829502b416cbd8ea27882fe46c403a1266242", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_24_21_2` with RED, GREEN, YELLOW states. Hold RED for 24 clock cycles, GREEN for 21, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_24_21_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 23) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 20) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_24_21_2", "red": 24, "green": 21, "yellow": 2}, "prompt_sha1": "cc516ac0620b26165d917768c17896a3626bb22f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m46098` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 46098 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m46098 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd46098;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m46098", "width": 16, "max": 46098}, "prompt_sha1": "8ccc9e381fb12fbf573275aa6a450fc1ef4a9cbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 14 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 14 = 16.\nClock pulses = 16×9 = 144.\nTime = 144/1000000 s = 144.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 14, "clocks": 144, "time_s": 0.000144}, "prompt_sha1": "418fe6b719829056b7ea7a6d5ab5c1ffb59a7753", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 4-bit right-shift register module `shiftreg_right_4`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `4-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_4 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [3:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[3:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_4", "width": 4, "direction": "right"}, "prompt_sha1": "cf72824bc7b95dee42d2a7bf8c44219301561b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 16 = 4.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 16, "spi_hz": 4500000.0}, "prompt_sha1": "d3b311359046103908ea8e9c8c4c8cc2b2aa5acb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 534 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 534/(534+20+8) = 0.950178 = 95.02%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 534, "iphdr": 20, "eff": 0.9501779359430605}, "prompt_sha1": "519372f54c3c8299f558cfaacfb1c3754c2e9cc9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2500 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2500×10^6 × 10/1000 = 2.5e+07 bits = 3.125e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2500, "rtt_ms": 10, "bits": 25000000.0, "bytes": 3125000.0}, "prompt_sha1": "32408dc6b6b82ee116af66fe2a2300e5171f7950", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9237(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9237(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9237([1, 2]) == 1.5\nassert mean_9237([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9237"}, "prompt_sha1": "505f650ab0875b065fd7cca4f0c9946a2021a8a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=25 ms, C=2 ms,T=50 ms, C=5 ms,T=10 ms, C=2 ms,T=200 ms, C=1 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/25 + 2/50 + 5/10 + 2/200 + 1/10 = 0.730000 = 73.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 25], [2, 50], [5, 10], [2, 200], [1, 10]], "utilization": 0.73}, "prompt_sha1": "dd2e0798755f5e515501c25a9ec2ac4ff67c080d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.001 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-09×5²=1.25e-08 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-09, "v": 5, "energy": 1.25e-08}, "prompt_sha1": "23d39a8d5e4e090cd35f66977595e84e3ca9f82b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551415; x = x + 601;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551415+601 = 18446744073709552016. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552016) mod 2^64 = 400. So `x` stores 400. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551415, "add": 601, "result": 400}, "prompt_sha1": "51bfd84f8808269ed151ea8478ba3a32182d800b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (64×8) = 78125000.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 64, "pps": 78125000.0}, "prompt_sha1": "32e6573e7bf444854c293a9de258ad9f05ad10ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w64_7707` implementing a dual-clock asynchronous FIFO with depth 4 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w64_7707 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 64,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w64_7707", "depth": 4, "width": 64, "ptr_w": 2}, "prompt_sha1": "fe3f0fedaf7302d9f09850a9e2337eb19042ac68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.5 V source drives a 1500 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.5-3.4 = 8.1 V.\nI = V/R = 8.1/1500 A = 5.4000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.5, "vf": 3.4, "r": 1500, "current_a": 0.005399999999999999}, "prompt_sha1": "2f8a880e86e43c15ae02509aaf15f3bbf9d31741", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 25 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 25-20 = 5.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 25, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 5}, "prompt_sha1": "e9dbe46c2a74df5cbeaeaa9e7377b1c30c0f0bf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 40000 Mbit/s and RTT 80 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 40000×10^6 × 80/1000 = 3.2e+09 bits = 4e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 40000, "rtt_ms": 80, "bits": 3200000000.0, "bytes": 400000000.0}, "prompt_sha1": "5a3c331795e2e3ff14fa695f3acf9b5f2ddde9b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=22 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/1 = -22.000000.\nVout = A_v×Vin = -22.000000×1 = -22.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 22, "vin": 1.0, "gain": -22.0, "vout": -22.0}, "prompt_sha1": "63c1550986ca7e0809e3a0b9ef59236edc0862b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=10 nF and is stepped to 1.8 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1.8(1-e^-3)=1.710383 V; τ=1e-06 s and t=3e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 1e-08, "multiple": 3, "vin": 1.8, "vc": 1.7103832769378449}, "prompt_sha1": "9b9873d5587549abcb07f9a54b9c9fbc3f0df278", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 128-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/128 = 32.\nOffset bits = log2(128) = 7.\nIndex bits = log2(32) = 5.\nTag bits = 52-5-7 = 40.\nCheck: 40+5+7 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 128, "addr_bits": 52, "lines": 32, "offset_bits": 7, "index_bits": 5, "tag_bits": 40}, "prompt_sha1": "04c51b620f5abd9c9df21d9dc5f5060814bdd21b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 7 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 19 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+2 = 10. Total bits = 19×10 = 190. Time = 190/230400 = 0.000824652778 s = 0.824653 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 7, "parity": 0, "stop": 2, "frames": 19, "seconds": 0.0008246527777777778}, "prompt_sha1": "27b2323fc542516c58480eb3cf8b5dd4e0585b30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-20 = 980 bytes.\nRound down to an 8-byte multiple: floor((980)/8)×8 = 976 bytes.\nFragments required = ceil(4000/976) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 20, "payload": 4000, "max_payload": 976, "fragments": 5}, "prompt_sha1": "8b55a6a7207648c9b3af06ff0a42254d9c77cec1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x24_no_bypass` with 16 entries of 24 bits. Inputs: `clk`, `we`, `4-bit waddr`, `24-bit wdata`, `4-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x24_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [23:0] wdata,\n input logic [3:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x24_no_bypass", "entries": 16, "width": 24, "mode": "no_bypass"}, "prompt_sha1": "8b62b8fdb0901e1dd05b4967b387417f77bce5ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551461; x = x + 403;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551461+403 = 18446744073709551864. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551864) mod 2^64 = 248. So `x` stores 248. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551461, "add": 403, "result": 248}, "prompt_sha1": "ffa5f8d59178978c2f49a84d9509142c45196cc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_112` generating a one-clock-cycle `tick` every 112 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_112 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 111) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_112", "divide": 112}, "prompt_sha1": "2f311b111bbeae85b77e97fcc7702a6f64086c18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1000 million instructions at average CPI 2.5 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1000×10^6×2.5/(0.5×10^9) = 5 s = 5000.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1000, "cpi": 2.5, "ghz": 0.5, "sec": 5.0}, "prompt_sha1": "cf52d34081e937ebf1e40d09e53286f386c7e64b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=100 nF and is stepped to 12 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=12(1-e^-2)=10.375977 V; τ=0.00047 s and t=0.00094 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1.0000000000000001e-07, "multiple": 2, "vin": 12, "vc": 10.375976601160648}, "prompt_sha1": "5167dcaebe6316248a60a4f5e97e5d1f6868ca2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_4371` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_4371 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_4371", "width": 10}, "prompt_sha1": "e0128d75f31d226b1febffe6f2bd6da16b574ed3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 42-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^42/2^11 = 2^31 = 2147483648 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 42, "page_exp": 11, "entries": 2147483648}, "prompt_sha1": "60230da52cbf9aa41997de3fa3778599f8c43fc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 2500. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2500/4095 × 3 V = 1.831502 V.\nThus the estimated input is about 1.8315 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 2500, "volts": 1.8315018315018317}, "prompt_sha1": "89581ad7d81abdcceb9043bd3cf8a70d50105f48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 8%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.080 × 2 = 0.032000.\nEffective CPI = 1.2 + 0.032000 = 1.232000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.08, "penalty": 2, "result": 1.232}, "prompt_sha1": "c4821b6913acbdc290523f664da33619a93e40d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 39432 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 39432/1000000 s; frequency = 1000000/39432 = 25.360114 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 39432, "hz": 25.360113613308986}, "prompt_sha1": "242188d3396f9f9f5ee27d7d86f9daa3a0042262", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 32-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/32 = 128.\nOffset bits = log2(32) = 5.\nIndex bits = log2(128) = 7.\nTag bits = 32-7-5 = 20.\nCheck: 20+7+5 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 32, "addr_bits": 32, "lines": 128, "offset_bits": 5, "index_bits": 7, "tag_bits": 20}, "prompt_sha1": "5acb7a96de71766796ad392e3fc305cf078cf6c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x16, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x16<<1)|0 = 0x2C = 00101100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 22, "rw": 0, "byte": 44}, "prompt_sha1": "f468e425898d77743b4aa0875544d01a574ad8f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [30, 14, 17]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [61, 42, 51].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [30, 14, 17], "finish": [61, 42, 51]}, "prompt_sha1": "69868341bafa85d9cad84c7616bd6a65c5d4ba8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 10%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.100 × 12 = 0.180000.\nEffective CPI = 1 + 0.180000 = 1.180000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.1, "penalty": 12, "result": 1.18}, "prompt_sha1": "d70c2062fbeb8ec18b0335c9727e80ec16de735c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 50 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 50000000/(16×460800) = 6.781684.\nNearest integer divisor D = 7.\nActual baud = 50000000/(16×7) = 446428.571 baud.\nError = (446428.571-460800)/460800×100% = -3.1188%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 50000000, "oversample": 16, "baud": 460800, "divisor": 7, "actual": 446428.5714285714, "error_pct": -3.118799603174605}, "prompt_sha1": "9e74b90c0304e80d26d1d1e89b66262fdc4e7340", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 26436 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 26436/5000000 s; frequency = 5000000/26436 = 189.136027 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 26436, "hz": 189.13602663035255}, "prompt_sha1": "e88294d0cfe92a1a81df1187a7cc52b0062dc454", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/200 = 250000.\nWith prescaler divisor limited to at most 16, the largest divisor of 250000 that also keeps the period count within 16 bits is 16.\nPeriod count = 250000/16 = 15625.\nPSC register = 16-1 = 15.\nARR register = 15625-1 = 15624.\nVerification: 50000000/(16×15625) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 200, "total_division": 250000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 15625, "psc_reg": 15, "arr_reg": 15624}, "prompt_sha1": "2617996ae455e35377c21541df12f509af9ab516", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 28 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 28-15 = 13.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 28, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 13}, "prompt_sha1": "c14abdc9b7add4dde52e0a0f9cb85db538bad3ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 71 and initial occupancy is 14. In an abstract batch, producer attempts to enqueue 21 items first, dropping any excess beyond capacity; then consumer removes up to 126 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=35, dropped=0; consumed=35; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 71, "start": 14, "prod": 21, "cons": 126, "dropped": 0, "consumed": 35, "final": 0}, "prompt_sha1": "2be3875aa5a90ebc056d82a8481c499147f10d57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 14-bit up/down counter `updown_14_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_14_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [13:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_14_wrap", "width": 14, "wrap": true}, "prompt_sha1": "1b84d832e9254bd0b593b1943b22cfad7def85aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w11_unsigned` comparing two 11-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w11_unsigned (\n input logic [10:0] a,\n input logic [10:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w11_unsigned", "width": 11, "signed": false}, "prompt_sha1": "9a07d5f18cdbc359d29b37a945a815ae1627575b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0E, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x0E<<1)|0 = 0x1C = 00011100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 14, "rw": 0, "byte": 28}, "prompt_sha1": "8c4c22ab37254f3b55e2f73e604cacf838dafe63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 12-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^12 V = 0.00030517578125 V = 305.175781 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 12, "vref": 1.25, "step": 0.00030517578125}, "prompt_sha1": "786cc953b3700d5a62c754bcff9990163ae106f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 96 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 96 MHz / 32 = 3.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 96000000.0, "divider": 32, "spi_hz": 3000000.0}, "prompt_sha1": "eb119ca4d03b6bb7e4abddd0d8fbf6f9ac145490", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 160 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 921600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 160000000/(8×921600) = 21.701389.\nNearest integer divisor D = 22.\nActual baud = 160000000/(8×22) = 909090.909 baud.\nError = (909090.909-921600)/921600×100% = -1.3573%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 160000000, "oversample": 8, "baud": 921600, "divisor": 22, "actual": 909090.9090909091, "error_pct": -1.3573232323232356}, "prompt_sha1": "cefc5ea9a581bbdc3abe673f0aa9ec199d48eca6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w15_nocin` implementing a 15-bit unsigned adder with inputs `a`, `b` and outputs `15-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w15_nocin (\n input logic [14:0] a,\n input logic [14:0] b,\n output logic [14:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w15_nocin", "width": 15, "cin": false}, "prompt_sha1": "bc357b2e3cdd2257eae430ec3d415bae27bd1889", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_2` for a synchronous sampled input `noisy`. Update output `clean` only after observing 2 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_2 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [0:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 1) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_2", "stable_samples": 2}, "prompt_sha1": "edcd6386da2bee7d49dd891b7b0f749e6e8fc982", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [17, 19, 16, 25, 18, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [97, 100, 72, 115, 110, 114].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [17, 19, 16, 25, 18, 20], "finish": [97, 100, 72, 115, 110, 114]}, "prompt_sha1": "b2fa6e1dd76307d781206fab1ac6ef75e019fa70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/330=0.0727272727 A. P=V²/R=24²/330=1.74545455 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 330, "i": 0.07272727272727272, "p": 1.7454545454545454}, "prompt_sha1": "577dde7df978da1acf4137f78187aba90c2c0238", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=47000 ohm and C=1000000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=47000×1000000×10^-12 s = 0.047 s.\nf_c=1/(2πRC)=1/(2π×47000×1000000×10^-12) = 3.3863 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 47000, "c_f": 1e-06, "tau": 0.047, "fc": 3.3862753849339433}, "prompt_sha1": "a69eda1a7c9f4871ea73847a6541c903e11d54be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.25 ns hit time, 92.2% hit rate, and a 70 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.922 = 0.078.\nAMAT = hit time + miss rate × miss penalty\n= 3.25 ns + 0.078×70 ns = 8.7100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.25, "hit_rate": 0.922, "penalty": 70, "result": 8.709999999999997}, "prompt_sha1": "e6ca76e6a1268e5b489d3cddefe3d55792c71d9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 13 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "V", "V", "P", "V", "V", "V", "V", "P"], "value": 13, "blocked": 0}, "prompt_sha1": "77965c6ad5ca24c7e4da23e2f05b21a9aa0cfee9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x5A, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x5A<<1)|0 = 0xB4 = 10110100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 90, "rw": 0, "byte": 180}, "prompt_sha1": "46e1f5b769a68b5706feb34aabbd134588d8defe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=22 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×1/(22+1) = 0.521739 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 22, "r2": 1, "vout": 0.5217391304347826}, "prompt_sha1": "c805f1cfb95a1d092628ab6428443013ec5caedc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w38_signed` comparing two 38-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w38_signed (\n input logic signed [37:0] a,\n input logic signed [37:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w38_signed", "width": 38, "signed": true}, "prompt_sha1": "b4b6934a19ee13a793d9151d7161726ceffa30ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 2000 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×2000×10^6×4 = 8.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 2000, "channels": 4, "gbps": 8.0}, "prompt_sha1": "c4623c5edc60e3279fa4abbc354895e57150c11c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "c205c6121b3bdfac07d77ff8b91229696b2cb6a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_38_52_20` with RED, GREEN, YELLOW states. Hold RED for 38 clock cycles, GREEN for 52, and YELLOW for 20; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_38_52_20 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 37) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 51) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 19) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_38_52_20", "red": 38, "green": 52, "yellow": 20}, "prompt_sha1": "4bd4f3d3ecfde7d60b73ffde6c067819d51b56eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 20%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.200 × 12 = 0.360000.\nEffective CPI = 1 + 0.360000 = 1.360000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.2, "penalty": 12, "result": 1.3599999999999999}, "prompt_sha1": "4e8b6e626ba08abfa5d6c2992e508f5e9db280be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-24 = 1976 bytes.\nRound down to an 8-byte multiple: floor((1976)/8)×8 = 1976 bytes.\nFragments required = ceil(3000/1976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 24, "payload": 3000, "max_payload": 1976, "fragments": 2}, "prompt_sha1": "d6c7be94bb420aab834f9ac916c5847d75f0fd9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m19658` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 19658 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m19658 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd19658;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m19658", "width": 15, "max": 19658}, "prompt_sha1": "ed5f21a94651425d9e37c52ade9ae2ddca0d6071", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=220 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/4.7 = -46.808511.\nVout = A_v×Vin = -46.808511×1 = -46.808511 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 220, "vin": 1.0, "gain": -46.80851063829787, "vout": -46.80851063829787}, "prompt_sha1": "310e680a9d899cb818df86f674c551d51c2eaca4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 7 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 36 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+1 = 9. Total bits = 36×9 = 324. Time = 324/38400 = 0.0084375 s = 8.437500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 7, "parity": 0, "stop": 1, "frames": 36, "seconds": 0.0084375}, "prompt_sha1": "bcec0f896538b765e34b9b7cfe5e5c0087de0b95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×56000)/(150+56000) = 149.599288 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 56000, "req": 149.59928762243987}, "prompt_sha1": "6e35c88545ec5cbf92fb5143f3f2ae0e57c6c66a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 422153607, carries 7884 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 7884+0+0 = 7884. ACK = (422153607+7884) mod 2^32 = 422161491.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 422153607, "payload": 7884, "syn": 0, "fin": 0, "ack": 422161491}, "prompt_sha1": "9b30b481f4bbdeaa6f00b60c11f29a1501b51e46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=40 ms, C=3 ms,T=5 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/40 + 3/5 + 4/50 = 0.780000 = 78.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 40], [3, 5], [4, 50]], "utilization": 0.78}, "prompt_sha1": "ddf059a8058741e87fa13c5d2bc3a711c2f7cf9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNNNNTNNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1], "final_state": 1}, "prompt_sha1": "4e3ad16daecc99b54419b0e76c8fa7ab3527d752", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 2 and tail index 3, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (2-3) mod 16 = 15. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 2, "tail": 3, "occupancy": 15}, "prompt_sha1": "33eced18caed7be32b2e1025bc3e77500539ef8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 500 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 500}, "prompt_sha1": "9e5ce8d7060263baa28d91fe1c0b4ddc60a3cffa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 256 = 0.093750 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 256, "spi_hz": 93750.0}, "prompt_sha1": "848e06e3369bcac61a8a1c2b4fc8070fc01350d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1500 payload bytes plus 80 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1500/(1500+80) = 0.949367 = 94.94%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1500, "overhead": 80, "efficiency": 0.9493670886075949}, "prompt_sha1": "a5193a1df7a8fcc900e87caf247cd6dfe70662ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 241 elements. Review loop `for i in range(241-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(241-1)` produces indices 0 through 239, so index 240 is skipped. Correct loop: `for i in range(241):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 241, "variant": "miss_last"}, "prompt_sha1": "4e8a1b24bcc39a5d9a9d7d2de3de97b34f9e8986", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['V', 'P', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["V", "P", "P", "V", "P", "V", "V", "V", "V", "V", "P"], "value": 4, "blocked": 0}, "prompt_sha1": "b4e5b509c59d01b73bd5395c6ad93d71b7e4a1a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 625, and period is 15733 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(625×15733) = 7.322189 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 625, "period": 15733, "hz": 7.322189029428589}, "prompt_sha1": "ab82fbf5e1d6e3e1d3ee4046c05487219e3dd3bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_214850` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_214850 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_214850"}, "prompt_sha1": "b1d34e1f733de749006c2bc3ebc89462061210f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x06, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x06<<1)|1 = 0x0D = 00001101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 6, "rw": 1, "byte": 13}, "prompt_sha1": "780c09dab35a1df89ffcfb092bdee8fc145b3146", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 4` on one shared integer without synchronization. Assume `counter` initially equals 47. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 47; T2 reads 47; both compute 51; T1 writes 51; T2 writes 51. The observed final value is 51, but two serial increments would produce 55.\n\n```\nlock(mutex)\ncounter = counter + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "06dc2075aaf2f8275cdd4c256d10f391765237e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x63, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x63<<1)|0 = 0xC6 = 11000110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 99, "rw": 0, "byte": 198}, "prompt_sha1": "f918b48f131d7042b4a806c92eb619c513a2288b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 64-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/64 = 8192.\nOffset bits = log2(64) = 6.\nIndex bits = log2(8192) = 13.\nTag bits = 40-13-6 = 21.\nCheck: 21+13+6 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 64, "addr_bits": 40, "lines": 8192, "offset_bits": 6, "index_bits": 13, "tag_bits": 21}, "prompt_sha1": "2516f8eae28b7024871068a896c3f6c16d321154", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_13_42_4` with RED, GREEN, YELLOW states. Hold RED for 13 clock cycles, GREEN for 42, and YELLOW for 4; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_13_42_4 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 12) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 41) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 3) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_13_42_4", "red": 13, "green": 42, "yellow": 4}, "prompt_sha1": "f6ee6f6fe03028a70a43b6a525f04de659a76f5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-60 = 3900 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 60, "mss": 3900}, "prompt_sha1": "4b1a1641f63297ad78c2591597520f54859baf41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 50 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 50 MHz / 2 = 25.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 50000000.0, "divider": 2, "spi_hz": 25000000.0}, "prompt_sha1": "571ae8602c05d5795f97fcecb89f6e747df132ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=4.7 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/22 = -0.213636.\nVout = A_v×Vin = -0.213636×0.2 = -0.042727 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 4.7, "vin": 0.2, "gain": -0.21363636363636365, "vout": -0.04272727272727273}, "prompt_sha1": "16d91269dcf5bb425e561f4747dc3d493202b791", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 3 = 0.006000.\nEffective CPI = 1.1 + 0.006000 = 1.106000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.02, "penalty": 3, "result": 1.106}, "prompt_sha1": "8ea97f3030a9d2558b8bedf35c2f2e95931f0c8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 25% of instructions, the branch misprediction rate is 8%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.080 × 8 = 0.160000.\nEffective CPI = 1 + 0.160000 = 1.160000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.25, "mispred": 0.08, "penalty": 8, "result": 1.16}, "prompt_sha1": "2f0e907c37de9fa961e60ab608fc8be66431e700", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^11 = 2^23 = 8388608 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 11, "entries": 8388608}, "prompt_sha1": "97f57226880eebb03c4398012b6f586c86f5a9c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w48_signed` comparing two 48-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w48_signed (\n input logic signed [47:0] a,\n input logic signed [47:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w48_signed", "width": 48, "signed": true}, "prompt_sha1": "c3dfe07f6c0b0fcbccd0aaa65d4da7b682e0f62b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xB3D87086. Extract the 6-bit field starting at bit 16 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xB3D87086 >> 16) & 0x3F = 0x18 (24).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 16, "value": 3017306246, "mask": 63, "field": 24}, "prompt_sha1": "ce0ee98136efe67d24bec4c95c6149e6dc027179", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 92%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.030×(10+0.080×100) = 1.540000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.97, "l2": 10, "l2_hit": 0.92, "mem": 100, "amat": 1.5400000000000005}, "prompt_sha1": "e41922e4cae5dbd6272dbfd20096d4de90b9ca66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1A2D3E in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 1A 2D 3E.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 1715518, "endian": "big", "bytes": [26, 45, 62]}, "prompt_sha1": "f73f19f11f743e8fb97fac2f1afda2fda4f1aed5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 24-bit left-shift register module `shiftreg_left_24`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `24-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_24 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [23:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[22:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_24", "width": 24, "direction": "left"}, "prompt_sha1": "f31c02e93852c01a380dbe747afb1ba362ab32be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(2×10^6) s = 128.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 256, "time_us": 128.0}, "prompt_sha1": "f53976c65ef1ce76d6dff5a82ec30da7268ec655", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 8 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×80×10^6 = 640000000 B/s. Time = 16384/640000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 8, "rate_mhz": 80, "sec": 2.56e-05}, "prompt_sha1": "8495b7dddec557292339d2edbeead3d8d935a25b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_6574` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_6574 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_6574"}, "prompt_sha1": "ab7c441f566c37a8b8e66644e288823110231f6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 39351602, carries 60831 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 60831+1+1 = 60833. ACK = (39351602+60833) mod 2^32 = 39412435.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 39351602, "payload": 60831, "syn": 1, "fin": 1, "ack": 39412435}, "prompt_sha1": "3b5a5926c4cb7c7942f3a940114d1b99124d857e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 123 and initial occupancy is 25. In an abstract batch, producer attempts to enqueue 103 items first, dropping any excess beyond capacity; then consumer removes up to 89 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=123, dropped=5; consumed=89; final occupancy=34.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 123, "start": 25, "prod": 103, "cons": 89, "dropped": 5, "consumed": 89, "final": 34}, "prompt_sha1": "b853d3a6189bee68e185d3f44b62c6c0611e8d29", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 8 = 2.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 8, "spi_hz": 2000000.0}, "prompt_sha1": "3d0e2b61dfb6179abe63a076de0cd33f0f10a632", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 882 elements. Review loop `for i in range(882-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(882-1)` produces indices 0 through 880, so index 881 is skipped. Correct loop: `for i in range(882):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 882, "variant": "miss_last"}, "prompt_sha1": "c60ce513974771ce033a97c473f4264e03bbccfa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1101110110001100101 using generator polynomial bits 11100101. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0100111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 229, "msg_bits": 19, "msg": 453733, "remainder": 39}, "prompt_sha1": "4b5145e45ab78a1da7c7bb09b4bc3153de90b637", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 48 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 48 = 50.\nClock pulses = 50×9 = 450.\nTime = 450/400000 s = 1125.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 48, "clocks": 450, "time_s": 0.001125}, "prompt_sha1": "e9ad0b662bcbd4fa55b9cedbcaecefa861ed5a90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4024` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4024 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4024"}, "prompt_sha1": "95eaaf0df7765ae39bcfeb367bff8d3c72f9dceb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 800 counts per period. What compare/high-time count produces exactly 60% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.6 × 800 = 480. Verification: 480/800 = 0.6, which is 60%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 800, "duty": 60, "high": 480}, "prompt_sha1": "8c4e2d0a47b45167d507abdc96f5736a73c9f63b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=4.7 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×10/(4.7+10) = 8.163265 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 4.7, "r2": 10, "vout": 8.16326530612245}, "prompt_sha1": "2f3cd7ce76e31310ff3a927c846feac070ba9425", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5029` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5029 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5029"}, "prompt_sha1": "e0626e85e695cddae6f648cdd2d615ef3f79d58d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10000 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10000×10^6 × 20/1000 = 2e+08 bits = 2.5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10000, "rtt_ms": 20, "bits": 200000000.0, "bytes": 25000000.0}, "prompt_sha1": "c61f8f227c444657e20fae6ea958b8fc87b1a36c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 120 MHz, prescaler divisor is 36, and period is 44943 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 120000000/(36×44943) = 74.168020 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 120000000, "prescaler": 36, "period": 44943, "hz": 74.16802023303592}, "prompt_sha1": "342ae0f838d6a7dd21e9379d06aac6df40d05ebc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 13 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 13×9 = 117. Time = 117/57600 = 0.00203125 s = 2.031250 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 6, "parity": 1, "stop": 1, "frames": 13, "seconds": 0.00203125}, "prompt_sha1": "94813f1e96aaa487a48f06921ed681c04d4a36b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=2.2 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×2.2/(2.2+2.2) = 1.650000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 2.2, "r2": 2.2, "vout": 1.65}, "prompt_sha1": "f867c4185eff1a943045c4d570cf1179683867cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_57_msb` for `57-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_57_msb (\n input logic [56:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 57; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_57_msb", "width": 57, "priority": "high"}, "prompt_sha1": "eab4e853bd05fa11e978576c52df7cd2862f8020", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 50 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 50 MHz / 32 = 1.562500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 50000000.0, "divider": 32, "spi_hz": 1562500.0}, "prompt_sha1": "7b93c0eeb048d4967100f7fc8a7fdbb4769ae80c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_24_lsb` for `24-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_24_lsb (\n input logic [23:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 23; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_24_lsb", "width": 24, "priority": "low"}, "prompt_sha1": "c34442a0df16a3b37857018cf6709fd53d2e4715", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock DMA then BUF; T2 acquires BUF then DMA. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds DMA while waiting for BUF, while T2 holds BUF while waiting for DMA; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before DMA. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "a4a7a13ee4917d1d0cbeb2ce58d83c114dda783a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 1000010001000100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1000010001000100", "ones": 4, "parity": 0}, "prompt_sha1": "9d18ded85a28d44c7b4db46d9852302ef13825ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xBE85. Extract the 6-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xBE85 >> 1) & 0x3F = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 1, "value": 48773, "mask": 63, "field": 2}, "prompt_sha1": "b86dab0c4eb03708113d3e2dc97338b7584ce4a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×64 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 64, "reach": 33554432}, "prompt_sha1": "89dd379f0afd52971582ecfd0bd47c17fcfdfdb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock BUS then C; task_B acquires C then BUS. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds BUS while waiting for C, while task_B holds C while waiting for BUS; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUS before C. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "642f607ab9cc23b3e488c9625395f9e5c4c50fbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/1000 = 2.2e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 1000, "tau": 2.2e-05}, "prompt_sha1": "185f9c70ad61d09acb7964a5d69b838fea52f35a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 17-bit right-shift register module `shiftreg_right_17`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `17-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_17 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [16:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[16:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_17", "width": 17, "direction": "right"}, "prompt_sha1": "3b6b2c3649382c64f6ca229637622bc37bb7a1e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 8 and tail index 23, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (8-23) mod 32 = 17. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 8, "tail": 23, "occupancy": 17}, "prompt_sha1": "80ec97ff5e85a51addc392f7ca7620b4647eeaa5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock B then D; consumer acquires D then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds B while waiting for D, while consumer holds D while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before D. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "fe903b486a6277c0fba79d70cad3152e07461efb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock QUEUE then TX; task_B acquires TX then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds QUEUE while waiting for TX, while task_B holds TX while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire QUEUE before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "666ef37bfae2f8a8c20aa73546c464be21dd000e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2432-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2432×8 = 19456 bits.\nSerialization delay = bits/rate = 19456/(100×10^6) s = 0.00019456 s = 194.560000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2432, "rate_mbps": 100, "delay_s": 0.00019456}, "prompt_sha1": "2d56b26279cc929a784132f9c7b351cced1fd158", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/47000=0.0010212766 A. P=V²/R=48²/47000=0.0490212766 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 47000, "i": 0.0010212765957446808, "p": 0.04902127659574468}, "prompt_sha1": "a89afa005a11952bc74183909c4fe75da0687fcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_4023` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_4023 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_4023", "width": 10}, "prompt_sha1": "382bb55bf49d81c33e7b821f3301ad9d67442c53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 24 and initial occupancy is 15. In an abstract batch, producer attempts to enqueue 144 items first, dropping any excess beyond capacity; then consumer removes up to 115 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=24, dropped=135; consumed=24; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 24, "start": 15, "prod": 144, "cons": 115, "dropped": 135, "consumed": 24, "final": 0}, "prompt_sha1": "52d537d82d5dceddb8785a1eb064f029b72ad0c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 10. Apply operations ['V', 'V', 'P', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 10 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 10, "ops": ["V", "V", "P", "V", "P", "P"], "value": 10, "blocked": 0}, "prompt_sha1": "52cf87b3bb7e235d23e7a8cb0622d7b68e47b1f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 3.6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.6/2^23 V = 4.29153442383e-07 V = 0.429153 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 3.6, "step": 4.291534423828125e-07}, "prompt_sha1": "5c0ba1c5825455f47de9696b1c0310ff82c5575e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_6_3379` converting a 6-bit binary input `bin` to 6-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_6_3379 (\n input logic [5:0] bin,\n output logic [5:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_6_3379", "width": 6}, "prompt_sha1": "78914c2d76017b3fd24f8bbd4ca4e85c42035003", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.240.133.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.240.133.0\nBroadcast address: 10.240.133.255\nUsable host range: 10.240.133.1 to 10.240.133.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.240.133.0/24", "usable": 254, "first": "10.240.133.1", "last": "10.240.133.254", "broadcast": "10.240.133.255"}, "prompt_sha1": "ef80eba95de9bf0c68bb504233ff8aeecdfe1a5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.49. Using Amdahl's law, compute the theoretical speedup on 4 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.49) + 0.49/4) = 1.581028.\nThe theoretical speedup is about 1.581×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.49, "n": 4, "result": 1.5810276679841895}, "prompt_sha1": "420bc70bf5679914c30cb830c8f0264d7942c895", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 16-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/16 = 2048.\nOffset bits = log2(16) = 4.\nIndex bits = log2(2048) = 11.\nTag bits = 64-11-4 = 49.\nCheck: 49+11+4 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 16, "addr_bits": 64, "lines": 2048, "offset_bits": 4, "index_bits": 11, "tag_bits": 49}, "prompt_sha1": "c303abaead7f6cea741f100d99f118ea7803ee2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m48200` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 48200 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m48200 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd48200;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m48200", "width": 16, "max": 48200}, "prompt_sha1": "d7b20cb713846ccb47ab457da3270c773052a570", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 72 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 72000000/(8×460800) = 19.531250.\nNearest integer divisor D = 20.\nActual baud = 72000000/(8×20) = 450000.000 baud.\nError = (450000.000-460800)/460800×100% = -2.3438%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 72000000, "oversample": 8, "baud": 460800, "divisor": 20, "actual": 450000.0, "error_pct": -2.34375}, "prompt_sha1": "518016243e783e27652664a792aa8fbf2f87bb64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 01010100110101000001111011100101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 16 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01010100110101000001111011100101", "ones": 16, "parity": 0}, "prompt_sha1": "1e85cb50f4c0a6ef8c4c268128e8f50b151e2b7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 22.8 V source drives a 8200 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 22.8-3 = 19.8 V.\nI = V/R = 19.8/8200 A = 2.4146 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 22.8, "vf": 3.0, "r": 8200, "current_a": 0.0024146341463414634}, "prompt_sha1": "8933d0faf025409c229e3c6938525abf8c79ea2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=25 ms, C=5 ms,T=10 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/25 + 5/10 = 0.700000 = 70.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 25], [5, 10]], "utilization": 0.7}, "prompt_sha1": "8036bfdd69e5fc50aee618a6d90118dc0ceed0ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/220 = 0.000454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 220, "tau": 0.00045454545454545455}, "prompt_sha1": "5a6b4a1e8f3f6eb466e13a37fce817eb9a9b34a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 21.8 V source drives a 1800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 21.8-2.8 = 19 V.\nI = V/R = 19/1800 A = 10.5556 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 21.8, "vf": 2.8, "r": 1800, "current_a": 0.010555555555555556}, "prompt_sha1": "0ff6c7e98f411c13bb8f603c75a3a8fa0940d4c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 15 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 15 = 18.\nClock pulses = 18×9 = 162.\nTime = 162/1000000 s = 162.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 15, "clocks": 162, "time_s": 0.000162}, "prompt_sha1": "5fccebc0362b898b32e5996e3480bd8c68bbf4e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=10 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/4.7 = -2.127660.\nVout = A_v×Vin = -2.127660×0.1 = -0.212766 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 10, "vin": 0.1, "gain": -2.127659574468085, "vout": -0.2127659574468085}, "prompt_sha1": "e6e1385fc6733aeb1f6a9654f787fa584a27507a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 16000 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-40-40 = 15920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 40, "tcphdr": 40, "mss": 15920}, "prompt_sha1": "f7fe813b7e0c04505ff1ff5b8bbec2e3cef0d779", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_122_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 122 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_122_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd122;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_122_ignore", "cycles": 122, "retrigger": false}, "prompt_sha1": "cefcfd66083084170946fee3240d350e0230138e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 25% of instructions, the branch misprediction rate is 20%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.200 × 12 = 0.600000.\nEffective CPI = 1.1 + 0.600000 = 1.700000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.25, "mispred": 0.2, "penalty": 12, "result": 1.7000000000000002}, "prompt_sha1": "9e3e0171214b4d158d2db8c4763becc3b95be09f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 160.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+14 = 174.5. Period = 174.5/12000000 = 1.45416667e-05 s. Maximum rate = 1/period = 68767.908309 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 160.5, "conv_cycles": 14, "period": 1.4541666666666667e-05, "rate": 68767.90830945558}, "prompt_sha1": "f1694a30c7ccf4ac166bed3b80ecacd9ed6211e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 120 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 120 MHz / 16 = 7.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 120000000.0, "divider": 16, "spi_hz": 7500000.0}, "prompt_sha1": "54063ada43c87cfc7b607df04038c75168269b2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=22 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×47/(22+47) = 8.173913 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 22, "r2": 47, "vout": 8.173913043478262}, "prompt_sha1": "0b117912167b7bd783ed70ff1397122dd1045ce7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_45_msb` for `45-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_45_msb (\n input logic [44:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 45; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_45_msb", "width": 45, "priority": "high"}, "prompt_sha1": "239659f0d0fe0bb6afb1845e6ad35e6d3a51d1b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2598643732, carries 41932 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 41932+0+0 = 41932. ACK = (2598643732+41932) mod 2^32 = 2598685664.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2598643732, "payload": 41932, "syn": 0, "fin": 0, "ack": 2598685664}, "prompt_sha1": "e7404b1413a978feaf1aa2a3a7dd7ba84ad98e7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 101000000110 using generator polynomial bits 111110011. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01111001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 499, "msg_bits": 12, "msg": 2566, "remainder": 121}, "prompt_sha1": "dff10fa1f89985ed80a713e182a98d6e680b9ce0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(10×10^6) s = 25.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 256, "time_us": 25.599999999999998}, "prompt_sha1": "ccf4a3bd446707e6ebf2095ae4dd4f5db22f48ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 3579 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×3579/(16×10^6) = 0.2236875 = 22.368750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 1000, "cycles": 3579, "load": 0.2236875}, "prompt_sha1": "1c3827abece0b7107cc8b62cf0f04a36914ff8dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `samples` elements of type `double`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `words[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "4f9dca056ba5b1f4f805e54e7ac664b941d26c17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/4.7 = 0.1 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 4.7, "tau": 0.1}, "prompt_sha1": "57fada4a1b6da84e3889c908d399281d62a43893", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 57 and tail index 27, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (57-27) mod 64 = 30. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 57, "tail": 27, "occupancy": 30}, "prompt_sha1": "0c69512ba788d0530a498e4a6251cfae0d2e9258", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 24-bit up/down counter `updown_24_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_24_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [23:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_24_wrap", "width": 24, "wrap": true}, "prompt_sha1": "d8fae7b638e024fd4c3f3e4688f8aeb341e26afe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1600 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1600/(1600+48) = 0.970874 = 97.09%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1600, "overhead": 48, "efficiency": 0.970873786407767}, "prompt_sha1": "9e122587597889987c6ffec84b3c3706e1dcee47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20 Mbit/s and RTT 80 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20×10^6 × 80/1000 = 1.6e+06 bits = 200000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20, "rtt_ms": 80, "bits": 1600000.0, "bytes": 200000.0}, "prompt_sha1": "4f0b9f403d8ca749873e925bb085c7568e454b2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3651` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3651 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3651"}, "prompt_sha1": "7bab71d5ece075663fc8f8ed5c7218b3389eb3e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 33-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^33/2^18 = 2^15 = 32768 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 33, "page_exp": 18, "entries": 32768}, "prompt_sha1": "ad71129d42a00ba23b6367d3409a497c69842e0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 3200 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×3200×10^6×3 = 48.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 3200, "channels": 3, "gbps": 48.0}, "prompt_sha1": "665825abf2cc783f6f87e1b370fc7f23af9137c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 16000 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-20-28 = 15952 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 20, "tcphdr": 28, "mss": 15952}, "prompt_sha1": "d69dbb39a9d62498e3981c96b7ce262f39c45e66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 3940 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×3940/(200×10^6) = 0.00985 = 0.985000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 500, "cycles": 3940, "load": 0.00985}, "prompt_sha1": "be9ac46ac3b4d676cecd3f777f36dffc747af8af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 2000 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-40-60 = 1900 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 40, "tcphdr": 60, "mss": 1900}, "prompt_sha1": "07b98f705b0f1bbf52f53f5072979bb9ab3eefbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 0.75 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×0.75/(1×10^9) = 0.00375 s = 3.750000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 0.75, "ghz": 1.0, "sec": 0.00375}, "prompt_sha1": "3982041c12013146fa6f00da0dcd5de8ee4fcf77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_468589` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_468589 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_468589"}, "prompt_sha1": "a1b1642acf17392dd231544ec9628f9d90a787f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 2 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "ecf84c3d9df253a7f6fdd3a57bc624d22c35b8a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [14, 10, 14]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [30, 32, 38].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [14, 10, 14], "finish": [30, 32, 38]}, "prompt_sha1": "76b7154ea6aa5787175a8d95190d329b77c98e8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=47000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×47000×10^-12 s = 0.01269 s.\nf_c=1/(2πRC)=1/(2π×270000×47000×10^-12) = 12.5418 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 4.7e-08, "tau": 0.01269, "fc": 12.541760684940531}, "prompt_sha1": "25609fdbdd8af1e10901720a3f969f813c077b26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 10 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "b35789209def205555446c5bcff07ddef1c01917", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 55 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 55 = 57.\nClock pulses = 57×9 = 513.\nTime = 513/1000000 s = 513.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 55, "clocks": 513, "time_s": 0.000513}, "prompt_sha1": "7202c350b1b4deef591c239577c0fbcd4531ee18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_32_lsb` for `32-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_32_lsb (\n input logic [31:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 31; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_32_lsb", "width": 32, "priority": "low"}, "prompt_sha1": "683a8f42a39745678d5a9202f2ead8f56cd23576", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_70764` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_70764 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_70764"}, "prompt_sha1": "02e2a064d2ba2130ff828b124905da0f272bc153", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 50 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "211e99fe236199b285d1290c485e0d9364a50fd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 192 payload bytes plus 24 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 192/(192+24) = 0.888889 = 88.89%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 192, "overhead": 24, "efficiency": 0.8888888888888888}, "prompt_sha1": "4cf9b0c4d49628d1848c9308dbddda0d472d95f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000101111001010010 using generator polynomial bits 1001. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 9, "msg_bits": 19, "msg": 286290, "remainder": 2}, "prompt_sha1": "699b3cead5a5e3dbcc233755fa0fe8dac07a4d60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 48 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 3634 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×3634/(48×10^6) = 0.000757083333 = 0.075708%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 48, "irq_hz": 10, "cycles": 3634, "load": 0.0007570833333333333}, "prompt_sha1": "0744bb6980d69ee47de861f81800d1f22d8488a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 2 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×2/(1.5×10^9) = 0.00133333333 s = 1.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 2.0, "ghz": 1.5, "sec": 0.0013333333333333333}, "prompt_sha1": "d6f745e615fab785e42e94b22727602db7cabb8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.42. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.42) + 0.42/192) = 1.717660.\nThe theoretical speedup is about 1.718×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.42, "n": 192, "result": 1.7176596886741813}, "prompt_sha1": "63885541a0497e24a43557496e31150d3f049b11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=100 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/10 = -10.000000.\nVout = A_v×Vin = -10.000000×1 = -10.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 100, "vin": 1.0, "gain": -10.0, "vout": -10.0}, "prompt_sha1": "842404e7949feb0619bf0fb4f644a69ed683d031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w64_5828` implementing a dual-clock asynchronous FIFO with depth 32 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w64_5828 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 64,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w64_5828", "depth": 32, "width": 64, "ptr_w": 5}, "prompt_sha1": "0c33e04f07ac62ccbb12a09195cc660c81daadba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 848153008, carries 48204 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 48204+1+0 = 48205. ACK = (848153008+48205) mod 2^32 = 848201213.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 848153008, "payload": 48204, "syn": 1, "fin": 0, "ack": 848201213}, "prompt_sha1": "68dbae3a98437cd6fa5ede7656aaa6db06a939f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 85.4% hit rate, and a 30 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.854 = 0.146.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.146×30 ns = 5.1300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.854, "penalty": 30, "result": 5.130000000000001}, "prompt_sha1": "3ce31530571b6b2491d52c8fe8b26d73d02b4490", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3490-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3490×8 = 27920 bits.\nSerialization delay = bits/rate = 27920/(5000×10^6) s = 5.584e-06 s = 5.584000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3490, "rate_mbps": 5000, "delay_s": 5.584e-06}, "prompt_sha1": "de95e6f6606a65ca3c2decfd0551fc85ddcb1ae2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 64-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/64 = 512.\nOffset bits = log2(64) = 6.\nIndex bits = log2(512) = 9.\nTag bits = 48-9-6 = 33.\nCheck: 33+9+6 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 64, "addr_bits": 48, "lines": 512, "offset_bits": 6, "index_bits": 9, "tag_bits": 33}, "prompt_sha1": "a9a5006f59ed305e844b83931e999192d5c6af88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=1200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×1200×10^-12 s = 0.000324 s.\nf_c=1/(2πRC)=1/(2π×270000×1200×10^-12) = 491.2190 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 1.2e-09, "tau": 0.000324, "fc": 491.21896016017087}, "prompt_sha1": "92997095ff8b292e131353ce4e61d4c6b4510aa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_644880` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_644880 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_644880"}, "prompt_sha1": "fb3a7a0fc42954e7f56033283d46651333a0bc04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/22=0.113636364 A. P=V²/R=2.5²/22=0.284090909 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 22, "i": 0.11363636363636363, "p": 0.2840909090909091}, "prompt_sha1": "564ea0b42d9245cdb71c5e271e0f83a229508bce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/47=0.0382978723 A. P=V²/R=1.8²/47=0.0689361702 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 47, "i": 0.03829787234042553, "p": 0.06893617021276596}, "prompt_sha1": "0f1fe7c524dc3f8f9db6ffc611593e9b7085b1cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 519 elements. Review loop `for i in range(519-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(519-1)` produces indices 0 through 517, so index 518 is skipped. Correct loop: `for i in range(519):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 519, "variant": "miss_last"}, "prompt_sha1": "812cb3d55e846aff4e2d4ddacf130ebd1d19a519", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 752, and period is 35891 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(752×35891) = 0.444609 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 752, "period": 35891, "hz": 0.4446085873480995}, "prompt_sha1": "d84df31f39aa447697abef212453dc75ae251342", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (1200×8) = 4166666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 1200, "pps": 4166666.6666666665}, "prompt_sha1": "acd192309653aad3589564614a17276dc0ce4652", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_1394` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_1394 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_1394", "width": 32}, "prompt_sha1": "a21bc27934c54a93b54742298dcdd7c9db6f5854", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x7D<<1)|0 = 0xFA = 11111010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 125, "rw": 0, "byte": 250}, "prompt_sha1": "ce8a4c989d8e3702e86afa388be0e4d55605f96a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×56)/(22000+56) = 55.857816 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 56, "req": 55.857816467174466}, "prompt_sha1": "8a92431dd2c5a87d3c1049d34521733e9a93deee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (2000×8) = 31250.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 2000, "pps": 31250.0}, "prompt_sha1": "0e8ffc5397042e78d062e9b244531a7c4896857e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x6EA5C9F2. Extract the 8-bit field starting at bit 6 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x6EA5C9F2 >> 6) & 0xFF = 0x27 (39).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 6, "value": 1856358898, "mask": 255, "field": 39}, "prompt_sha1": "38fdb8c7ceb172716dcf417b76463572f339acdb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w8_9963` implementing a dual-clock asynchronous FIFO with depth 8 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w8_9963 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 8,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w8_9963", "depth": 8, "width": 8, "ptr_w": 3}, "prompt_sha1": "66e5aff841fd7d20dd4c022959f838e01270ecb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3477 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "7c82f41c16faab6352153c79909ee3417df800d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 10000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 10000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 10000}, "prompt_sha1": "1075609712645519e9f422ac6af61e4b357bf2ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 16000 payload bytes plus 32 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 16000/(16000+32) = 0.998004 = 99.80%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 16000, "overhead": 32, "efficiency": 0.998003992015968}, "prompt_sha1": "edcbd340df716180664826939923c3cdc6fe1fbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock IO then STATE; task_B acquires STATE then IO. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds IO while waiting for STATE, while task_B holds STATE while waiting for IO; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "aac68a368b12e49f389fed3b09aaf987193caa7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 26-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^26/2^12 = 2^14 = 16384 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 26, "page_exp": 12, "entries": 16384}, "prompt_sha1": "c727d677675c6dfc1d971519f845f5200582f3f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_635548` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_635548 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_635548"}, "prompt_sha1": "4a45b1d15463bcc31ffc8b64e3e713cbb929c028", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 16000 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-20-60 = 15920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 20, "tcphdr": 60, "mss": 15920}, "prompt_sha1": "17b76b1161ac2ad7d6b24778c117b57cb6bd591e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/220 = 2.13636364e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 220, "tau": 2.136363636363636e-06}, "prompt_sha1": "0e96298b2c17403c33a9c1da6464f8e472992cb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_90` for a synchronous sampled input `noisy`. Update output `clean` only after observing 90 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_90 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 89) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_90", "stable_samples": 90}, "prompt_sha1": "082874394a1b810226687c11a0cecdad508a7f2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6517-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6517×8 = 52136 bits.\nSerialization delay = bits/rate = 52136/(1000×10^6) s = 5.2136e-05 s = 52.136000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6517, "rate_mbps": 1000, "delay_s": 5.2136e-05}, "prompt_sha1": "a5134849267698f2e0e9afc3b99272a60470bfec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_976874` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_976874 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_976874"}, "prompt_sha1": "40ae8e19d3fbb9461e6c3aa6559a75309ce0a44c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 36 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 36-17 = 19.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 36, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 19}, "prompt_sha1": "524513caf986e23d710a20f963e4eefedea9a268", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(2×10^6) s = 12.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 24, "time_us": 12.0}, "prompt_sha1": "79fb8f3f30592a2142743146239ac4c64d829051", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 6 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 44 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+2 = 9. Total bits = 44×9 = 396. Time = 396/230400 = 0.00171875 s = 1.718750 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 6, "parity": 0, "stop": 2, "frames": 44, "seconds": 0.00171875}, "prompt_sha1": "3afae5663831d6cea4b602ca253c442364878d89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3954-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3954×8 = 31632 bits.\nSerialization delay = bits/rate = 31632/(10×10^6) s = 0.0031632 s = 3163.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3954, "rate_mbps": 10, "delay_s": 0.0031632}, "prompt_sha1": "67eeac7e9a27be9a27635e894b58f1f773be1c78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 120 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 120 MHz / 256 = 0.468750 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 120000000.0, "divider": 256, "spi_hz": 468750.0}, "prompt_sha1": "eafce84e3856f8f6d3c15501690b3a3f5c9b4d01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 128 data bits per transfer at 5600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 128/8 = 16. Bandwidth = 16×5600×10^6×3 = 268.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 128, "rate_mt": 5600, "channels": 3, "gbps": 268.8}, "prompt_sha1": "3e956c68d0f1b24cc155b023e16040e18fce68ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 54-bit right-shift register module `shiftreg_right_54`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `54-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_54 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [53:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[53:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_54", "width": 54, "direction": "right"}, "prompt_sha1": "0217f84e74112a9f0bf8b504c31dea71b334bbf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 21.6 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 21.6-3.3 = 18.3 V.\nI = V/R = 18.3/680 A = 26.9118 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 21.6, "vf": 3.3, "r": 680, "current_a": 0.026911764705882354}, "prompt_sha1": "b9a311e217808832f3e5f8fd507b1f5090043e75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.68. Using Amdahl's law, compute the theoretical speedup on 96 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.68) + 0.68/96) = 3.057325.\nThe theoretical speedup is about 3.057×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.68, "n": 96, "result": 3.057324840764332}, "prompt_sha1": "455fcd7efd9dfad44ed472856ed85ddfce627a1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m27` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 27 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m27 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd27;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m27", "width": 5, "max": 27}, "prompt_sha1": "fb6975e138571aa4a335fc474ddfca8b63c6173e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×0.5/1000/8 = 312500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 0.5, "bytes": 312500.0}, "prompt_sha1": "33a9bb1d385ca3a394c8c358961c6625b95f9e1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 896 payload bytes plus 48 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 896/(896+48) = 0.949153 = 94.92%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 896, "overhead": 48, "efficiency": 0.9491525423728814}, "prompt_sha1": "246cbc0e11828dd0b3e7ad65968329238a3d774d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 52 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 52-13 = 39.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 52, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 39}, "prompt_sha1": "5c38a8d72b7053a2c5741362a8674533041cc6f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_64` for a 64-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_64 (\n input logic signed [63:0] data,\n input logic [5:0] shamt,\n output logic signed [63:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_64", "width": 64, "direction": "right", "arithmetic": true}, "prompt_sha1": "2843a8c8090a1d6a4e1dfb74a4e65116fa776e6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1000 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1000×10^6 / (9000×8) = 13888.888889 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "frame_bytes": 9000, "pps": 13888.888888888889}, "prompt_sha1": "89f8c8d1fde166d80ee5aa9498599e76207d8035", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×64 KiB = 1536 KiB = 1572864 bytes = 1.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 64, "reach": 1572864}, "prompt_sha1": "bcfa782d0b1025f6ba46524b44410ff4f6799107", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 128 and initial occupancy is 26. In an abstract batch, producer attempts to enqueue 148 items first, dropping any excess beyond capacity; then consumer removes up to 194 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=128, dropped=46; consumed=128; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 128, "start": 26, "prod": 148, "cons": 194, "dropped": 46, "consumed": 128, "final": 0}, "prompt_sha1": "6295d4bbdf8c84f0c97b48edd4f544fe81e5afd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 180 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 180000000/4000 = 45000.\nWith prescaler divisor limited to at most 128, the largest divisor of 45000 that also keeps the period count within 16 bits is 125.\nPeriod count = 45000/125 = 360.\nPSC register = 125-1 = 124.\nARR register = 360-1 = 359.\nVerification: 180000000/(125×360) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 180000000, "target_hz": 4000, "total_division": 45000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 360, "psc_reg": 124, "arr_reg": 359}, "prompt_sha1": "60f74a76c722ef1426505c5e3221221adb35b0c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (1024×8) = 1220703.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 1024, "pps": 1220703.125}, "prompt_sha1": "a2005595668e433581455a31424e627053290c28", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x696ACA1D3E in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 69 6A CA 1D 3E.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 452763196734, "endian": "big", "bytes": [105, 106, 202, 29, 62]}, "prompt_sha1": "aaab8382dc29e4950af6118a0f44ce54672244c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `completed = completed + 7` on one shared integer without synchronization. Assume `completed` initially equals 244. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 244; T2 reads 244; both compute 251; T1 writes 251; T2 writes 251. The observed final value is 251, but two serial increments would produce 258.\n\n```\nlock(mutex)\ncompleted = completed + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "538f2e9c4c9a76e9b8cc68617aab57f2cece58d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2199` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2199 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2199"}, "prompt_sha1": "077ef68b9d85eace4a039ac87e496aaee44be7f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 125 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 125 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 125.0}, "prompt_sha1": "b38ce67977b506b355dedc492fab0d9af3a8a3b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x783F95 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 78 3F 95.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 7880597, "endian": "big", "bytes": [120, 63, 149]}, "prompt_sha1": "4780676d47f027b835624778fdbe0e986363b217", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3836` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3836 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3836"}, "prompt_sha1": "aed3d0da25cf13068cfa1a6c1dc899c8bce0df0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 14-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^14 V = 0.000125 V = 125.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 14, "vref": 2.048, "step": 0.000125}, "prompt_sha1": "f220949ad161d705e83323698ae3722a4b852bc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 8` on one shared integer without synchronization. Assume `items` initially equals 240. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 240; T2 reads 240; both compute 248; T1 writes 248; T2 writes 248. The observed final value is 248, but two serial increments would produce 256.\n\n```\nlock(mutex)\nitems = items + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "489166144cb184bf3653034f9b24e4b345d04fbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/10 = 0.0047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 10, "tau": 0.0047}, "prompt_sha1": "ef769ff34ad9ba3d0fc1251f052e88b9980d0ab0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 348 elements. Review loop `for i in range(348+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(348+1)` includes index 348, which is out of range for a length-348 sequence. Correct loop: `for i in range(348):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 348, "variant": "one_past"}, "prompt_sha1": "15125483becaa549c22ad68a6d91c769a1c83c5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10000 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10000×56000)/(10000+56000) = 8484.848485 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10000, "r2": 56000, "req": 8484.848484848484}, "prompt_sha1": "6df8b45669c45252270ed7c4155e786a0d91c513", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/50 = 1680000.\nWith prescaler divisor limited to at most 128, the largest divisor of 1680000 that also keeps the period count within 16 bits is 128.\nPeriod count = 1680000/128 = 13125.\nPSC register = 128-1 = 127.\nARR register = 13125-1 = 13124.\nVerification: 84000000/(128×13125) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 50, "total_division": 1680000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 128, "period": 13125, "psc_reg": 127, "arr_reg": 13124}, "prompt_sha1": "8490d2cbb00669c405c275b9002d494249497f7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 011111010101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011111010101", "ones": 8, "parity": 0}, "prompt_sha1": "26138f5df0a7143ab745e21973131ca9f05b2570", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x17, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x17<<1)|0 = 0x2E = 00101110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 23, "rw": 0, "byte": 46}, "prompt_sha1": "6155891295ca5240cca1eb6b7edc2abdd0714b13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/680=0.00485294118 A. P=V²/R=3.3²/680=0.0160147059 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 680, "i": 0.004852941176470588, "p": 0.016014705882352938}, "prompt_sha1": "56752b14607aa6f8464d5727011dd2986407d121", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 21.4 V source drives a 6800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 21.4-2.3 = 19.1 V.\nI = V/R = 19.1/6800 A = 2.8088 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 21.4, "vf": 2.3, "r": 6800, "current_a": 0.002808823529411764}, "prompt_sha1": "e86bb1b5a66a565bd8e587c2df4b4ff282440d4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2537(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2537(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2537([1, 2]) == 1.5\nassert mean_2537([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2537"}, "prompt_sha1": "811886549580f6604914882f897bed1ff197c4e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 32 MHz, prescaler divisor is 501, and period is 21045 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 32000000/(501×21045) = 3.035032 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 32000000, "prescaler": 501, "period": 21045, "hz": 3.035032334949962}, "prompt_sha1": "09fb25831609befb3acb65092ad3435e47a657f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.247.110.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.247.110.0\nBroadcast address: 10.247.110.3\nUsable host range: 10.247.110.1 to 10.247.110.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.247.110.0/30", "usable": 2, "first": "10.247.110.1", "last": "10.247.110.2", "broadcast": "10.247.110.3"}, "prompt_sha1": "cfae17aa25cd3c56b8f6f00dcbb647bf7492dbd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 15%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.150 × 3 = 0.022500.\nEffective CPI = 1.2 + 0.022500 = 1.222500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.15, "penalty": 3, "result": 1.2225}, "prompt_sha1": "e870a7c64654393c14fdc17f1b968fee3ba1150e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^23 V = 3.93390655518e-07 V = 0.393391 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 3.3, "step": 3.933906555175781e-07}, "prompt_sha1": "41c548169a7d1136091de313621ada5491763253", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 20 and initial occupancy is 1. In an abstract batch, producer attempts to enqueue 105 items first, dropping any excess beyond capacity; then consumer removes up to 177 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=20, dropped=86; consumed=20; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 20, "start": 1, "prod": 105, "cons": 177, "dropped": 86, "consumed": 20, "final": 0}, "prompt_sha1": "ba5a0ff6fd83ce1218e75f6df190a3be622e01b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 200/1000 = 4e+07 bits = 5e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 200, "bits": 40000000.0, "bytes": 5000000.0}, "prompt_sha1": "90143d3fb18f5bee760d56fba3d5f44bfc6b6d86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_958433` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_958433 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_958433"}, "prompt_sha1": "dccbd0e3426d6a90f9bdcceda6058a813afe085c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 50; x = x + 372;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 50+372 = 422. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (422) mod 2^8 = 166. So `x` stores 166. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 50, "add": 372, "result": 166}, "prompt_sha1": "61c483a679f7116792c6b5e66fd38fdfe911cad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 16-way set-associative cache uses 64-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/64 = 8192.\nSets = 8192/16 = 512.\nOffset bits = log2(64) = 6; index bits = log2(512) = 9; tag bits = 48-6-9 = 33.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 64, "ways": 16, "addr_bits": 48, "lines": 8192, "sets": 512, "offset": 6, "index": 9, "tag": 33}, "prompt_sha1": "63425f4f8adf57b629eace1f336c3212fb1827a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 16 and tail index 9, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (16-9) mod 32 = 7. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 16, "tail": 9, "occupancy": 7}, "prompt_sha1": "71fc7aa4827d97ffc4a43c2c4d982987c63ba82b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 110100111011000011101000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 12 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110100111011000011101000", "ones": 12, "parity": 0}, "prompt_sha1": "e418eec042ac454e1d969877b8e9e6ff5452d35b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 2 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×20×10^6 = 40000000 B/s. Time = 131072/40000000 = 0.0032768 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 2, "rate_mhz": 20, "sec": 0.0032768}, "prompt_sha1": "fb78522d17e0486049095af6491b4d1f19b0126e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x76, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x76<<1)|1 = 0xED = 11101101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 118, "rw": 1, "byte": 237}, "prompt_sha1": "18356871c481b8d6f02f0615bdfc522c50406673", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (256×8) = 9765.625000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 256, "pps": 9765.625}, "prompt_sha1": "2926e2cfbce066392b69eb41da0ac5cb98076bdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1093 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "523a45e5d8d375d8874756b946498f72705edeee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.75 ns hit time, 95.6% hit rate, and a 160 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.956 = 0.044.\nAMAT = hit time + miss rate × miss penalty\n= 3.75 ns + 0.044×160 ns = 10.7900 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.75, "hit_rate": 0.956, "penalty": 160, "result": 10.790000000000006}, "prompt_sha1": "3079af4ed964dcb398a7311b28e9a2176aeae6fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_29` for a 29-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_29 (\n input logic [28:0] data,\n input logic [4:0] shamt,\n output logic [28:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_29", "width": 29, "direction": "left", "arithmetic": false}, "prompt_sha1": "0b45c4f7045065af7c936ba5d0d8c7a229df48dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 128000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(4×128000) = 31.250000.\nNearest integer divisor D = 31.\nActual baud = 16000000/(4×31) = 129032.258 baud.\nError = (129032.258-128000)/128000×100% = 0.8065%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 4, "baud": 128000, "divisor": 31, "actual": 129032.25806451614, "error_pct": 0.8064516129032313}, "prompt_sha1": "be46bb9a65ee13dfd021e73a410e5235a2686acc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+20) = 0.888889 = 88.89%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 20, "efficiency": 0.8888888888888888}, "prompt_sha1": "11863ae4b62b757bc0e2ccb2823043109680394e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 72. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 72/255 × 2.5 V = 0.705882 V.\nThus the estimated input is about 0.7059 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 72, "volts": 0.7058823529411764}, "prompt_sha1": "6a06efb6b65026324e1420da7671bd9d52d6a013", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 407, and period is 26907 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(407×26907) = 6.574653 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 407, "period": 26907, "hz": 6.5746525775514515}, "prompt_sha1": "fb361ed7ea18f58c4228ac06d388eadb6728d24b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_220` generating a one-clock-cycle `tick` every 220 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_220 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 219) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_220", "divide": 220}, "prompt_sha1": "e35c5476e2c3d7aa852fa8cdd250f406238babe5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/680=0.0705882353 A. P=V²/R=48²/680=3.38823529 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 680, "i": 0.07058823529411765, "p": 3.388235294117647}, "prompt_sha1": "90e1c846a806bf0bd42ae6cb2d7630deb4cff4ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 24 data bits per transfer at 800 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 24/8 = 3. Bandwidth = 3×800×10^6×1 = 2.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 24, "rate_mt": 800, "channels": 1, "gbps": 2.4}, "prompt_sha1": "f2e00ab440ac66b810333435c4640690c21fc156", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_97_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 97 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_97_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd97;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_97_ignore", "cycles": 97, "retrigger": false}, "prompt_sha1": "62b4d42131047279f74a0ccc97afd13dabc3593d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x93CFFF48, set bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 4)`. Result = 0x93CFFF58.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 2479882056, "bit": 4, "op": "set", "result": 2479882072}, "prompt_sha1": "e0698faa5386500310789b8ac54d68eb817142ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 8000 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 8000 = 3000. Verification: 3000/8000 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 8000, "duty": 37.5, "high": 3000}, "prompt_sha1": "c63eb49c669f375c82468445769bae3c4902fd5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 9600 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "f4eaedbe13192985616f3c60a79452d6a459e05a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8417-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8417×8 = 67336 bits.\nSerialization delay = bits/rate = 67336/(10×10^6) s = 0.0067336 s = 6733.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8417, "rate_mbps": 10, "delay_s": 0.0067336}, "prompt_sha1": "8e5e4977cb9b4d49fa5ad8a785e5416f9216b146", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_17` for a 17-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_17 (\n input logic [16:0] data,\n input logic [4:0] shamt,\n output logic [16:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_17", "width": 17, "direction": "left", "arithmetic": false}, "prompt_sha1": "93b62cff7af21f2ba7d9b149cd679f3a580b2cfd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/22 = 0.000213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 22, "tau": 0.00021363636363636365}, "prompt_sha1": "ddc224c336ebb36380f16cd4f8719a17e3434576", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 2 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×20×10^6 = 40000000 B/s. Time = 4096/40000000 = 0.0001024 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 2, "rate_mhz": 20, "sec": 0.0001024}, "prompt_sha1": "da31951e883e25fbd26d1b1af9946b52fc62b2cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_29_14_20` with RED, GREEN, YELLOW states. Hold RED for 29 clock cycles, GREEN for 14, and YELLOW for 20; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_29_14_20 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 28) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 13) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 19) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_29_14_20", "red": 29, "green": 14, "yellow": 20}, "prompt_sha1": "2999d8540cad601510cb8262428824dee84e4ef7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 4000 payload bytes plus 10 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 4000/(4000+10) = 0.997506 = 99.75%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 4000, "overhead": 10, "efficiency": 0.9975062344139651}, "prompt_sha1": "5cd429a1a7e7dbaee215765f43e4e1b98cecaf3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 24 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(24×10^6) s = 0.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 24, "bits": 16, "time_us": 0.6666666666666667}, "prompt_sha1": "81063bf9ca79da13951aec94af4e03ee2b4ddc36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_991962` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_991962 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_991962"}, "prompt_sha1": "a7262be42a80eb5fb6a6a714815dd6693f7baca8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 37 and initial occupancy is 5. In an abstract batch, producer attempts to enqueue 85 items first, dropping any excess beyond capacity; then consumer removes up to 94 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=37, dropped=53; consumed=37; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 37, "start": 5, "prod": 85, "cons": 94, "dropped": 53, "consumed": 37, "final": 0}, "prompt_sha1": "c912cb4ef9db5afdad79e10c018c462830db2070", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xCC9837 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 37 98 CC.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 13408311, "endian": "little", "bytes": [55, 152, 204]}, "prompt_sha1": "f2c77775c2589b67870f1d6fb57eacccbf1c8f40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 20 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 20000000/1000 = 20000.\nWith prescaler divisor limited to at most 64, the largest divisor of 20000 that also keeps the period count within 16 bits is 50.\nPeriod count = 20000/50 = 400.\nPSC register = 50-1 = 49.\nARR register = 400-1 = 399.\nVerification: 20000000/(50×400) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 20000000, "target_hz": 1000, "total_division": 20000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 50, "period": 400, "psc_reg": 49, "arr_reg": 399}, "prompt_sha1": "c389e8f48c96db5e94b89e41dbf14118695299b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w32_6839` implementing a dual-clock asynchronous FIFO with depth 8 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w32_6839 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 32,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w32_6839", "depth": 8, "width": 32, "ptr_w": 3}, "prompt_sha1": "8c15fdecea013604e1dbf5e98ac00a81864bbab4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×80/1000/8 = 400000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 80, "bytes": 400000000.0}, "prompt_sha1": "9b5907537c569f58494c10e5fe20308b8c855222", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_140066` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_140066 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_140066"}, "prompt_sha1": "a7220675afa83b233c4b05f8deacf210cc1f3b7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 105 and initial occupancy is 48. In an abstract batch, producer attempts to enqueue 28 items first, dropping any excess beyond capacity; then consumer removes up to 127 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=76, dropped=0; consumed=76; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 105, "start": 48, "prod": 28, "cons": 127, "dropped": 0, "consumed": 76, "final": 0}, "prompt_sha1": "49dd9eddc2557ffb7f56d6136610ef405f7d2926", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 9; x = x + 257;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 9+257 = 266. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (266) mod 2^8 = 10. So `x` stores 10. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 9, "add": 257, "result": 10}, "prompt_sha1": "cb86b0deafcb2ba7ce97fce754ce882a052f430c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 79.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+8 = 87.5. Period = 87.5/1000000 = 8.75e-05 s. Maximum rate = 1/period = 11428.571429 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 79.5, "conv_cycles": 8, "period": 8.75e-05, "rate": 11428.57142857143}, "prompt_sha1": "934e2548b43e889cf742c63d21de78ef4935af1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 27000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×27000)/(100+27000) = 99.630996 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 27000, "req": 99.6309963099631}, "prompt_sha1": "e89c17b989a9b2b92b46db286c6f2c7e2933ae37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 831 elements. Review loop `for i in range(831-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(831-1)` produces indices 0 through 829, so index 830 is skipped. Correct loop: `for i in range(831):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 831, "variant": "miss_last"}, "prompt_sha1": "969abcc7ecab39dc0d3d6e70625a9c1cc179c465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 5 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 8 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+2 = 8. Total bits = 8×8 = 64. Time = 64/1000000 = 6.4e-05 s = 0.064000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 5, "parity": 0, "stop": 2, "frames": 8, "seconds": 6.4e-05}, "prompt_sha1": "393277d2f0653b47f89ba01ba5e9e6e9eba7301c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 9 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "V", "V", "V", "V", "P", "P", "V", "P"], "value": 9, "blocked": 0}, "prompt_sha1": "7f5cc5658eea45343ba245af5f7e561008ace544", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/47=0.0425531915 A. P=V²/R=2²/47=0.085106383 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 47, "i": 0.0425531914893617, "p": 0.0851063829787234}, "prompt_sha1": "bafc1e635b42fbbfe910014e58bc3e9ff770f7b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=100 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×100/(100+100) = 6.000000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 100, "r2": 100, "vout": 6.0}, "prompt_sha1": "cbfa587a5af7dd256635eeea5dd1e7060a484e05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 12-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^12 V = 0.0006103515625 V = 610.351562 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 12, "vref": 2.5, "step": 0.0006103515625}, "prompt_sha1": "481ae934c50066e0508a952b789df13b4abd2c9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w63_cin` implementing a 63-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `63-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w63_cin (\n input logic [62:0] a,\n input logic [62:0] b,\n input logic cin,\n output logic [62:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w63_cin", "width": 63, "cin": true}, "prompt_sha1": "9f1b0496580026619d1246ec19b7d6ddf9411aaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=10 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(10+10) = 2.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 10, "r2": 10, "vout": 2.5}, "prompt_sha1": "454679cf3b66a168f055c5b9820d55858a97a75e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.88.114.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.88.114.0\nBroadcast address: 10.88.114.7\nUsable host range: 10.88.114.1 to 10.88.114.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.88.114.0/29", "usable": 6, "first": "10.88.114.1", "last": "10.88.114.6", "broadcast": "10.88.114.7"}, "prompt_sha1": "5814102aab25fc916157ff62d9b11a7353dd1d25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10110111011100111000001 using generator polynomial bits 1101. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 13, "msg_bits": 23, "msg": 6011329, "remainder": 7}, "prompt_sha1": "c6e40acac4f707a9e0561a2c0b1fc9fcbbb68539", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 23949 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23949/100000 s; frequency = 100000/23949 = 4.175540 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 23949, "hz": 4.175539688504739}, "prompt_sha1": "3592b5d91cf361850918d6a728ffbec7ca409f4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-40 = 536 bytes.\nRound down to an 8-byte multiple: floor((536)/8)×8 = 536 bytes.\nFragments required = ceil(6000/536) = 12.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 40, "payload": 6000, "max_payload": 536, "fragments": 12}, "prompt_sha1": "af6353c85295ba3b2421b2be2229dbf69fbd647e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/1000 = 0.00047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 1000, "tau": 0.00047000000000000004}, "prompt_sha1": "a9bc93ae46ad874cb92b1938acb836ed605c4f0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 64-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/64 = 32.\nOffset bits = log2(64) = 6.\nIndex bits = log2(32) = 5.\nTag bits = 52-5-6 = 41.\nCheck: 41+5+6 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 64, "addr_bits": 52, "lines": 32, "offset_bits": 6, "index_bits": 5, "tag_bits": 41}, "prompt_sha1": "80d07a339f7505518964f999c789ed2e2c94f6fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 1100010011110110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 9 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1100010011110110", "ones": 9, "parity": 1}, "prompt_sha1": "6cb884db784d30f76f2f64fb8ac702817b21590b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1×10^6×200/1000/8 = 25000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "rtt_ms": 200, "bytes": 25000.0}, "prompt_sha1": "b2f51d89a8dfbfa53a786da365f338e96fccb84f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.9 V source drives a 2200 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.9-2.9 = 21 V.\nI = V/R = 21/2200 A = 9.5455 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.9, "vf": 2.9, "r": 2200, "current_a": 0.009545454545454546}, "prompt_sha1": "aa849661f22ebac0308e0a308b6a44855dd11ec3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 16 KiB cache with 64-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "7d0eedcef8e55f13eb92f289ba1737e185c75e01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 75%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.050×(20+0.250×150) = 3.375000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.95, "l2": 20, "l2_hit": 0.75, "mem": 150, "amat": 3.3750000000000027}, "prompt_sha1": "c40e998b99ede0d19974b71c73c0e5ccbe56c95e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 64 MHz, prescaler divisor is 993, and period is 32593 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 64000000/(993×32593) = 1.977454 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 64000000, "prescaler": 993, "period": 32593, "hz": 1.9774539964638798}, "prompt_sha1": "a7ff1238a605831438bc88c5e51a903c086faebb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_39` for a 39-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_39 (\n input logic [38:0] data,\n input logic [5:0] shamt,\n output logic [38:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_39", "width": 39, "direction": "right", "arithmetic": false}, "prompt_sha1": "04c7ab93ee0ed5e12e77fe765296c045f5cb53c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'V', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'P', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 9 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "V", "P", "V", "V", "V", "P", "V", "P", "P", "P", "V", "P", "P", "P", "V", "V", "P", "V"], "value": 9, "blocked": 0}, "prompt_sha1": "62da4e54fdbc18d990ae3477b4dcb99de768fba0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7458-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7458×8 = 59664 bits.\nSerialization delay = bits/rate = 59664/(25000×10^6) s = 2.38656e-06 s = 2.386560 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7458, "rate_mbps": 25000, "delay_s": 2.38656e-06}, "prompt_sha1": "8be6b7aa3acc7c06fbb55496985dac1630730721", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1450 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-40-40 = 1370 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 40, "tcphdr": 40, "mss": 1370}, "prompt_sha1": "f35c7e9ed4519adad0eece4e9e395f4a3c33be74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock A then BUS; task_B acquires BUS then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds A while waiting for BUS, while task_B holds BUS while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before BUS. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "670cb3e0d3356f3b4c2eee61a66af4ae7286756e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 91.7% hit rate, and a 105 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.917 = 0.083.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.083×105 ns = 9.4650 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.917, "penalty": 105, "result": 9.464999999999996}, "prompt_sha1": "d5f921718fcfe4c4895e56024bfac4a48320f588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_115` for a synchronous sampled input `noisy`. Update output `clean` only after observing 115 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_115 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 114) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_115", "stable_samples": 115}, "prompt_sha1": "a8d9a8b43ff3f71b7bd4e7f1dafde412982e9eb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `words` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `words[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b23dfaa28f26b5bfe3db549ce3c26d07466ce1ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_264851` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_264851 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_264851"}, "prompt_sha1": "c5f88376b4020791b77110e222319dc7c8a4eb7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×1.8²=0.003564 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 1.8, "energy": 0.003564}, "prompt_sha1": "f210a17a5086f32bd8bbf3f18a5afaebf1b414a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 4800 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×4800×10^6×1 = 153.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 4800, "channels": 1, "gbps": 153.6}, "prompt_sha1": "65d8ccad856d8eb5b76275ddcbe4f9945ed1ed3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.73. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.73) + 0.73/192) = 3.652273.\nThe theoretical speedup is about 3.652×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.73, "n": 192, "result": 3.652273159596728}, "prompt_sha1": "fb3dd3eca0e0a8d144fc479e4eec32fb172c1997", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 320 payload bytes plus 24 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 320/(320+24) = 0.930233 = 93.02%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 320, "overhead": 24, "efficiency": 0.9302325581395349}, "prompt_sha1": "611e00d5773b5005c90c66b9f1a571d37a2bddca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_58_msb` for `58-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_58_msb (\n input logic [57:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 58; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_58_msb", "width": 58, "priority": "high"}, "prompt_sha1": "7bcfb8bde3072493ac3941e7329c7407e52b65e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7728(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7728(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7728([1, 2]) == 1.5\nassert mean_7728([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7728"}, "prompt_sha1": "7fdf717faec2b55e5490698c9b4c508632f40037", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 42871 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 42871/1000000 s; frequency = 1000000/42871 = 23.325791 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 42871, "hz": 23.325791327470785}, "prompt_sha1": "0956301b9efff2428b895b6fb2bde8971abd6dea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 64 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 64×8 = 512. Time = 512/4800 = 0.106666667 s = 106.666667 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 5, "parity": 1, "stop": 1, "frames": 64, "seconds": 0.10666666666666667}, "prompt_sha1": "35a2ab8fe7cd33d0867b8e8d0b8b3f64aa758824", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 4` on one shared integer without synchronization. Assume `counter` initially equals 63. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 63; T2 reads 63; both compute 67; T1 writes 67; T2 writes 67. The observed final value is 67, but two serial increments would produce 71.\n\n```\nlock(mutex)\ncounter = counter + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "8c6d643173e593d7ec465a277a13cb4b204bdcb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 8-way set-associative cache uses 256-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/256 = 4096.\nSets = 4096/8 = 512.\nOffset bits = log2(256) = 8; index bits = log2(512) = 9; tag bits = 52-8-9 = 35.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 256, "ways": 8, "addr_bits": 52, "lines": 4096, "sets": 512, "offset": 8, "index": 9, "tag": 35}, "prompt_sha1": "7e33ab05cd4164c17eddaa5c0e438a88efb7ab20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 120 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×120)/(4700+120) = 117.012448 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 120, "req": 117.0124481327801}, "prompt_sha1": "92e42c5bf930ff820048855332e058caaa3ea7b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 160 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 2419 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50000×2419/(160×10^6) = 0.7559375 = 75.593750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 160, "irq_hz": 50000, "cycles": 2419, "load": 0.7559375}, "prompt_sha1": "5804ab88f8c354ee708fea59267d6156b41775d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 1 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×4×10^6 = 4000000 B/s. Time = 4096/4000000 = 0.001024 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 1, "rate_mhz": 4, "sec": 0.001024}, "prompt_sha1": "ca76fbb72f2cd7e16692fa59b3f118620ad4a081", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 3.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+10 = 13.5. Period = 13.5/20000000 = 6.75e-07 s. Maximum rate = 1/period = 1481481.481481 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 3.5, "conv_cycles": 10, "period": 6.75e-07, "rate": 1481481.4814814816}, "prompt_sha1": "068bf6a07b5846aa0ca77dc08c6b13565acf8811", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9369` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9369 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9369"}, "prompt_sha1": "8a03a23848b8f9e9410a7b9e825edbb84468ee93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_91` generating a one-clock-cycle `tick` every 91 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_91 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 90) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_91", "divide": 91}, "prompt_sha1": "5ef5fa8ea493955a6a543bf58e9fee31e4b2201a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 3.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+10 = 13.5. Period = 13.5/8000000 = 1.6875e-06 s. Maximum rate = 1/period = 592592.592593 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 3.5, "conv_cycles": 10, "period": 1.6875e-06, "rate": 592592.5925925926}, "prompt_sha1": "14d518b9dd7ff93c684086bc716e3c24809c2b6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 4 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×4/(1.2×10^9) = 0.0666666667 s = 66.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 4.0, "ghz": 1.2, "sec": 0.06666666666666667}, "prompt_sha1": "3183f53a5f923367e45369f80858292aceac5ff4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 34851 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 34851/100000 s; frequency = 100000/34851 = 2.869358 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 34851, "hz": 2.8693581245875297}, "prompt_sha1": "7c13d4770231a408540f2f449e16bd8cb50365e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(20×10^6) s = 51.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 1024, "time_us": 51.199999999999996}, "prompt_sha1": "dc357e8d96737499ec37ee3950016558e4e8f714", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2200 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 2200 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 2200.0}, "prompt_sha1": "d20fa1ad67fc4768798f136561ba3c583b7a5792", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 8-way set-associative cache uses 128-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/128 = 1024.\nSets = 1024/8 = 128.\nOffset bits = log2(128) = 7; index bits = log2(128) = 7; tag bits = 36-7-7 = 22.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 128, "ways": 8, "addr_bits": 36, "lines": 1024, "sets": 128, "offset": 7, "index": 7, "tag": 22}, "prompt_sha1": "5d5fe8e85f9dac07f3522d1acdfaee74e88841be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=40 ms, C=3 ms,T=5 ms, C=4 ms,T=10 ms, C=2 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/40 + 3/5 + 4/10 + 2/40 = 1.125000 = 112.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 40], [3, 5], [4, 10], [2, 40]], "utilization": 1.125}, "prompt_sha1": "7dd38b76aac24b3c8053c7ecf6f268d8fcdae2f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 101001110011010001010000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 10 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101001110011010001010000", "ones": 10, "parity": 0}, "prompt_sha1": "884b3e30ebff1a084a2ead7bb771f5bcc4b78060", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×180)/(470+180) = 130.153846 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 180, "req": 130.15384615384613}, "prompt_sha1": "18e122048aa387f10f013f995b4bacc1818bfae1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 7 and tail index 7, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (7-7) mod 8 = 0. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 7, "tail": 7, "occupancy": 0}, "prompt_sha1": "aa433b466d241c3d2af6e9775e2483850f5da661", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.189.26.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.189.26.0\nBroadcast address: 10.189.26.7\nUsable host range: 10.189.26.1 to 10.189.26.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.189.26.0/29", "usable": 6, "first": "10.189.26.1", "last": "10.189.26.6", "broadcast": "10.189.26.7"}, "prompt_sha1": "20c6b4599464d8c060a0d423e863bb32ec2be6f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.78. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.78) + 0.78/3) = 2.083333.\nThe theoretical speedup is about 2.083×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.78, "n": 3, "result": 2.0833333333333335}, "prompt_sha1": "11322678e86cab8868d1d6d75d4a3282907777df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 45 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 45-14 = 31.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 45, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 31}, "prompt_sha1": "f5eeab85c603991f087f88bcb5cd431faf0910d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 2-way set-associative cache uses 64-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/64 = 16384.\nSets = 16384/2 = 8192.\nOffset bits = log2(64) = 6; index bits = log2(8192) = 13; tag bits = 36-6-13 = 17.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 64, "ways": 2, "addr_bits": 36, "lines": 16384, "sets": 8192, "offset": 6, "index": 13, "tag": 17}, "prompt_sha1": "27bd8d168d36803f79b28cca9a4e87a0c87f51b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×2048 KiB = 98304 KiB = 100663296 bytes = 96.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 2048, "reach": 100663296}, "prompt_sha1": "afd80f02b57672fae8a48dbc92f18089d890f17e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8535 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8535/(8535+20+8) = 0.996730 = 99.67%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8535, "iphdr": 20, "eff": 0.9967301179493169}, "prompt_sha1": "35e422d4a4346a70d6c7700d84f43bd102eba220", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 28 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 28×9 = 252. Time = 252/115200 = 0.0021875 s = 2.187500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 6, "parity": 1, "stop": 1, "frames": 28, "seconds": 0.0021875}, "prompt_sha1": "098e155a759f89d51b189545ea3b446fa7b319af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/10=1.2 A. P=V²/R=12²/10=14.4 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 10, "i": 1.2, "p": 14.4}, "prompt_sha1": "eb01e7f6159711128c93b22ed59721393eb298f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_32` generating a one-clock-cycle `tick` every 32 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_32 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 31) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_32", "divide": 32}, "prompt_sha1": "18f0709e54fee5566edea43ac21a8c20fb8016f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 36-bit up/down counter `updown_36_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_36_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [35:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_36_wrap", "width": 36, "wrap": true}, "prompt_sha1": "c2e068fab9d429eac80f7ddfd47091f36fdd1d00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 60 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 60000000/5000 = 12000.\nWith prescaler divisor limited to at most 128, the largest divisor of 12000 that also keeps the period count within 16 bits is 125.\nPeriod count = 12000/125 = 96.\nPSC register = 125-1 = 124.\nARR register = 96-1 = 95.\nVerification: 60000000/(125×96) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 60000000, "target_hz": 5000, "total_division": 12000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 96, "psc_reg": 124, "arr_reg": 95}, "prompt_sha1": "f7abfee33a9d0fa03dff79995c1b282e64ad2e59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x6D<<1)|0 = 0xDA = 11011010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 109, "rw": 0, "byte": 218}, "prompt_sha1": "dc66374638da98c2b7d405367ba53f0818fe5064", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 60 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×60/1000/8 = 75000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 60, "bytes": 75000.0}, "prompt_sha1": "1de8786acb3bca07594eb983cb80955a769fb75f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_1782` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_1782 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_1782"}, "prompt_sha1": "fa2d73843d26c63699ed4e3654c70bbea22c5a67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-32 = 1368 bytes.\nRound down to an 8-byte multiple: floor((1368)/8)×8 = 1368 bytes.\nFragments required = ceil(10000/1368) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 32, "payload": 10000, "max_payload": 1368, "fragments": 8}, "prompt_sha1": "35bbee34c8c19780b0de14283a02acac54afc53b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×300/1000/8 = 750000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 300, "bytes": 750000.0}, "prompt_sha1": "4dc5c27d47906140a8d273626c1849361b110e06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x2B, toggle bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 1)`. Result = 0x29.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 43, "bit": 1, "op": "toggle", "result": 41}, "prompt_sha1": "033e30c90a37626dbab9b707328ce984a81714a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w5_cin` implementing a 5-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `5-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w5_cin (\n input logic [4:0] a,\n input logic [4:0] b,\n input logic cin,\n output logic [4:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w5_cin", "width": 5, "cin": true}, "prompt_sha1": "381c744741a35c6880c747bac1ad0e571f45abf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_103_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 103 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_103_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd103;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_103_ignore", "cycles": 103, "retrigger": false}, "prompt_sha1": "4bcb4bfd6aa7afa2d66e6a1c1ccd6be9cd338ef3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_38` for a 38-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_38 (\n input logic signed [37:0] data,\n input logic [5:0] shamt,\n output logic signed [37:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_38", "width": 38, "direction": "right", "arithmetic": true}, "prompt_sha1": "9453d75446848f1f09a4be571a5a3878254d153d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5805-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5805×8 = 46440 bits.\nSerialization delay = bits/rate = 46440/(2500×10^6) s = 1.8576e-05 s = 18.576000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5805, "rate_mbps": 2500, "delay_s": 1.8576e-05}, "prompt_sha1": "c56cd246a718b1a4d70871a4b28b36480011bc97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-32 = 1468 bytes.\nRound down to an 8-byte multiple: floor((1468)/8)×8 = 1464 bytes.\nFragments required = ceil(5000/1464) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 32, "payload": 5000, "max_payload": 1464, "fragments": 4}, "prompt_sha1": "dd782b2db9411ab439c97842bbba88cd6a2b8f40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×180)/(68+180) = 49.354839 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 180, "req": 49.354838709677416}, "prompt_sha1": "203216bab26202bb4a0b5b7ccc8b07b1c8eebbc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `samples` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `buf[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "3f276dbe58f4b7b0f0d2ae1535f281a36ec5d287", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 011101101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011101101", "ones": 6, "parity": 0}, "prompt_sha1": "97d0dc3167d94fa1c22d528a9db5e07903db7611", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 00010001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00010001", "ones": 2, "parity": 0}, "prompt_sha1": "310de4c97576b0bb6a4ca8d1738e345ca7681d25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_47` generating a one-clock-cycle `tick` every 47 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_47 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 46) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_47", "divide": 47}, "prompt_sha1": "60d7278c24d0fed37ad902fd0ccf975d7cef34a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 1 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×2×10^6 = 2000000 B/s. Time = 128/2000000 = 6.4e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 1, "rate_mhz": 2, "sec": 6.4e-05}, "prompt_sha1": "656dd571456b2c997c6e11cb599a537d8e81e5a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 64 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 64 MHz / 256 = 0.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 64000000.0, "divider": 256, "spi_hz": 250000.0}, "prompt_sha1": "a8cb5c93669284ecd1e2e4cd497b59c0c0882bf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/100 = 0.00047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 100, "tau": 0.00047}, "prompt_sha1": "fa27de05e07cbbf61f1aa0885309f3524a3f8c67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 100 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 1653 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×1653/(100×10^6) = 0.0008265 = 0.082650%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 100, "irq_hz": 50, "cycles": 1653, "load": 0.0008265}, "prompt_sha1": "ab01876e9fe3fb2065c77479247d8372dbbc0cd8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_35_10_15` with RED, GREEN, YELLOW states. Hold RED for 35 clock cycles, GREEN for 10, and YELLOW for 15; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_35_10_15 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 34) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 9) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 14) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_35_10_15", "red": 35, "green": 10, "yellow": 15}, "prompt_sha1": "75ace66dad040d2e21bf1cf7decdde17fe2c3e4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 64 bytes over a datapath transferring 16 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×1×10^6 = 16000000 B/s. Time = 64/16000000 = 4e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 64, "width": 16, "rate_mhz": 1, "sec": 4e-06}, "prompt_sha1": "a93d8b9408c4883a7b6ffdca7340a6dae139c4a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w9_nocin` implementing a 9-bit unsigned adder with inputs `a`, `b` and outputs `9-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w9_nocin (\n input logic [8:0] a,\n input logic [8:0] b,\n output logic [8:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w9_nocin", "width": 9, "cin": false}, "prompt_sha1": "d4a52241e35fcfc77db31aa73d65895fe8c4f3ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_20_lsb` for `20-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_20_lsb (\n input logic [19:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 19; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_20_lsb", "width": 20, "priority": "low"}, "prompt_sha1": "4ffcd58e817b7ba8d7bd4c57a808fa020a221591", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.1 V source drives a 1800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.1-2.7 = 5.4 V.\nI = V/R = 5.4/1800 A = 3.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.1, "vf": 2.7, "r": 1800, "current_a": 0.0029999999999999996}, "prompt_sha1": "357d737b993dfa25f76b2a8b9b03a63b19806bf1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2000 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 2000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 2000}, "prompt_sha1": "ba036cd884f634ddbefa67d8994d21d3044ed599", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_105` generating a one-clock-cycle `tick` every 105 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_105 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 104) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_105", "divide": 105}, "prompt_sha1": "803f8e20ed405911c5f4e7c008cea07ff93da5e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w40_unsigned` comparing two 40-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w40_unsigned (\n input logic [39:0] a,\n input logic [39:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w40_unsigned", "width": 40, "signed": false}, "prompt_sha1": "7e4a8dddd2216ad7317a6b8d08ded2eb16aadfe8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 192 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 192/(192+28) = 0.872727 = 87.27%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 192, "overhead": 28, "efficiency": 0.8727272727272727}, "prompt_sha1": "4d52bc375e0204232291cf3a6460a2a80c0f35ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD3D317DDBDD1671B in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 1B 67 D1 BD DD 17 D3 D3.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 15263569803228571419, "endian": "little", "bytes": [27, 103, 209, 189, 221, 23, 211, 211]}, "prompt_sha1": "62c2dd57c161ad29cd576bbe16515371bc19af79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 4053 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0769c2c1521e927ac07690787837c247ce0139bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1460 payload bytes plus 52 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1460/(1460+52) = 0.965608 = 96.56%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1460, "overhead": 52, "efficiency": 0.9656084656084656}, "prompt_sha1": "04e036aea5649f829be17816cbcf37c28bd7b85a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 1 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×40×10^6 = 40000000 B/s. Time = 2048/40000000 = 5.12e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 1, "rate_mhz": 40, "sec": 5.12e-05}, "prompt_sha1": "6336152267f06a0306907bdf017b32c5138e5ac6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 8 KiB cache with 128-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "70d73527ad20b9a96ae6307da4fa926b3fa68fb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "afb69f58ab0ddc0e17df253d4999384c7d229b27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 0.75 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×0.75/(0.8×10^9) = 0.46875 s = 468.750000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 0.75, "ghz": 0.8, "sec": 0.46875}, "prompt_sha1": "8d5c7a58b7a8d3f391603bf8e8812f013c861102", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_33` for a synchronous sampled input `noisy`. Update output `clean` only after observing 33 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_33 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 32) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_33", "stable_samples": 33}, "prompt_sha1": "4dda9d6a117d906b71d1a6392a488b28108bc374", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 25% of instructions, the branch misprediction rate is 15%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.150 × 3 = 0.112500.\nEffective CPI = 1.1 + 0.112500 = 1.212500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.25, "mispred": 0.15, "penalty": 3, "result": 1.2125000000000001}, "prompt_sha1": "008539874cdaaa1bfd10ea12c165c9dcc8bebe0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4104150958, carries 40466 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 40466+0+1 = 40467. ACK = (4104150958+40467) mod 2^32 = 4104191425.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4104150958, "payload": 40466, "syn": 0, "fin": 1, "ack": 4104191425}, "prompt_sha1": "caec28889b6c55da0f6872f2932e7652780b5281", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2400 counts per period. What compare/high-time count produces exactly 87.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.875 × 2400 = 2100. Verification: 2100/2400 = 0.875, which is 87.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2400, "duty": 87.5, "high": 2100}, "prompt_sha1": "25799402ccfd5ef2cb2a3326aa4c6066c22c2351", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0011000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0011000", "ones": 2, "parity": 0}, "prompt_sha1": "c2477783eebd30743077cd2b69332ce8cbd0065a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_50` generating a one-clock-cycle `tick` every 50 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_50 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 49) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_50", "divide": 50}, "prompt_sha1": "12d1c5ec5e036b0738e278daac4a70b4ffc2465e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_101` for a synchronous sampled input `noisy`. Update output `clean` only after observing 101 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_101 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 100) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_101", "stable_samples": 101}, "prompt_sha1": "9b5d57955807d18d5386f4d79d29e652eea55a6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `n` elements of type `float`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `words[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8350c247c4a7d3314d18d771093ec1255bd91f00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551438; x = x + 446;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551438+446 = 18446744073709551884. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551884) mod 2^64 = 268. So `x` stores 268. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551438, "add": 446, "result": 268}, "prompt_sha1": "21fac8af95957681583f054c5369bfc96e9e01a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/220 = 2.13636364e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 220, "tau": 2.1363636363636365e-05}, "prompt_sha1": "9bab396e99e3e8d4bf8a8ecd3244a8d3f6a3bc7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1200 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1200-20-32 = 1148 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1200, "iphdr": 20, "tcphdr": 32, "mss": 1148}, "prompt_sha1": "b4a6dd372ed51c73af2e6cd205a9e16a904eedb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 9-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^9 V = 0.00244140625 V = 2441.406250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 9, "vref": 1.25, "step": 0.00244140625}, "prompt_sha1": "e548a445ccbd943adbbade211a1ddab56e674a1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 80%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.020×(20+0.200×50) = 1.800000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.98, "l2": 20, "l2_hit": 0.8, "mem": 50, "amat": 1.8000000000000005}, "prompt_sha1": "94b75285d0b476c36e879c2c5af1afdc758bb090", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w27_signed` comparing two 27-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w27_signed (\n input logic signed [26:0] a,\n input logic signed [26:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w27_signed", "width": 27, "signed": true}, "prompt_sha1": "cc98131193632812a8eb2dba78c98fc662e843fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 64-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/64 = 32.\nOffset bits = log2(64) = 6.\nIndex bits = log2(32) = 5.\nTag bits = 64-5-6 = 53.\nCheck: 53+5+6 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 64, "addr_bits": 64, "lines": 32, "offset_bits": 6, "index_bits": 5, "tag_bits": 53}, "prompt_sha1": "5bb71ef405a88ca99672a8de1ab280f9952b5efe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 8-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/256 = 256.\nSets = 256/8 = 32.\nOffset bits = log2(256) = 8; index bits = log2(32) = 5; tag bits = 32-8-5 = 19.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 256, "ways": 8, "addr_bits": 32, "lines": 256, "sets": 32, "offset": 8, "index": 5, "tag": 19}, "prompt_sha1": "d12c6711c7e63972489bc3a0061cbe99939c730f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3508` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3508 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3508"}, "prompt_sha1": "57c83edf9ff62502a5fa2f3946c5c65705d38f90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock DMA then IO; T2 acquires IO then DMA. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds DMA while waiting for IO, while T2 holds IO while waiting for DMA; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DMA before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "20bf5ac665ab3c09ce45a8e1d87b3ec1b77245c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xA12F in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 2F A1.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 41263, "endian": "little", "bytes": [47, 161]}, "prompt_sha1": "4f9d92e5a9d2bb6fac02841537c1159521c3820c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_9662` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_9662 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_9662"}, "prompt_sha1": "658a89756abb263ed71a7560b3b84eb3be6d467a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.212.91.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.212.91.0\nBroadcast address: 10.212.91.15\nUsable host range: 10.212.91.1 to 10.212.91.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.212.91.0/28", "usable": 14, "first": "10.212.91.1", "last": "10.212.91.14", "broadcast": "10.212.91.15"}, "prompt_sha1": "a27bc1e9ea563b979ac3beab2635d72922b0501c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1.5 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1.5/(2.4×10^9) = 0.0125 s = 12.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.5, "ghz": 2.4, "sec": 0.0125}, "prompt_sha1": "c7565fd455639662eb2eeb0a75b57dd4257b3eac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `samples` elements of type `float`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `words[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "f9236651295979c7d8c88f4e0c27eff531fa02d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x12_no_bypass` with 16 entries of 12 bits. Inputs: `clk`, `we`, `4-bit waddr`, `12-bit wdata`, `4-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x12_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [11:0] wdata,\n input logic [3:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x12_no_bypass", "entries": 16, "width": 12, "mode": "no_bypass"}, "prompt_sha1": "c85692ca0b74e438bef5294a969d0d9fd1200076", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 22 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 22 = 24.\nClock pulses = 24×9 = 216.\nTime = 216/1000000 s = 216.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 22, "clocks": 216, "time_s": 0.000216}, "prompt_sha1": "cb44986c15d3525de44f9eb987a87bb486b81c4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 228 and tail index 236, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (228-236) mod 256 = 248. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 228, "tail": 236, "occupancy": 248}, "prompt_sha1": "d882fe412e5c9fc4e0eb27396b8d14806a924bd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x40_no_bypass` with 8 entries of 40 bits. Inputs: `clk`, `we`, `3-bit waddr`, `40-bit wdata`, `3-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [39:0] wdata,\n input logic [2:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x40_no_bypass", "entries": 8, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "1b4067bf02e408f330b09298e08633d1c763ae6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=100 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×47/(100+47) = 2.877551 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 100, "r2": 47, "vout": 2.877551020408163}, "prompt_sha1": "ca837a6ed5c064c3786ac47abc9a047ff166d47f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 4 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×1×10^6 = 4000000 B/s. Time = 1048576/4000000 = 0.262144 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 4, "rate_mhz": 1, "sec": 0.262144}, "prompt_sha1": "4dd1e947c228d69864030efb76b74b0acb54542f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m36899` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 36899 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m36899 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd36899;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m36899", "width": 16, "max": 36899}, "prompt_sha1": "a132bb4781cc400a2efae08f7d60619f71e37c8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'V', 'V', 'P', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "V", "V", "P", "V", "P", "P", "V", "P", "P", "V", "V", "V", "P", "V", "P", "V", "V", "P", "V"], "value": 2, "blocked": 0}, "prompt_sha1": "2b3c7faf7ff630f20c06553d9accdc2d35de3f1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x28, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x28<<1)|1 = 0x51 = 01010001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 40, "rw": 1, "byte": 81}, "prompt_sha1": "08944698e16b376fac83da4a2262087b6beadd03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×100²=0.0005 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 100, "energy": 0.0005}, "prompt_sha1": "4b16f836f7da69b7cb1a3ebf9750a0773d422114", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w16_8346` implementing a dual-clock asynchronous FIFO with depth 128 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w16_8346 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 16,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w16_8346", "depth": 128, "width": 16, "ptr_w": 7}, "prompt_sha1": "478079b43bb93adf735a482f63323bf67db028ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w13_cin` implementing a 13-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `13-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w13_cin (\n input logic [12:0] a,\n input logic [12:0] b,\n input logic cin,\n output logic [12:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w13_cin", "width": 13, "cin": true}, "prompt_sha1": "deedaa55d166c8b040eedf6cd6d3c5a196de13be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 48 MHz. Sampling consumes 39.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+14 = 53.5. Period = 53.5/48000000 = 1.11458333e-06 s. Maximum rate = 1/period = 897196.261682 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 48000000.0, "sample_cycles": 39.5, "conv_cycles": 14, "period": 1.1145833333333334e-06, "rate": 897196.261682243}, "prompt_sha1": "f1c912fe7387db6f416ae1196f1053d2dabd93f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 235 elements. Review loop `for i in range(235+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(235+1)` includes index 235, which is out of range for a length-235 sequence. Correct loop: `for i in range(235):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 235, "variant": "one_past"}, "prompt_sha1": "9663e0bfa3e86eb55c9c628f768accc75d1f1dad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 11001111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11001111", "ones": 6, "parity": 0}, "prompt_sha1": "31a2ec932cf9475af0a0302d6d29c9b35c1737c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 22-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^22 V = 2.98023223877e-07 V = 0.298023 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 22, "vref": 1.25, "step": 2.980232238769531e-07}, "prompt_sha1": "3432d1b7be639e3d89884e3d16910c2eb5eb064a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 85%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.020×(10+0.150×60) = 1.380000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.98, "l2": 10, "l2_hit": 0.85, "mem": 60, "amat": 1.3800000000000003}, "prompt_sha1": "b28fa1517a5dc80e9a9f3be851630f9e81382286", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.4 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 2.5 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.4-2.5 = 5.9 V.\nI = V/R = 5.9/680 A = 8.6765 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.4, "vf": 2.5, "r": 680, "current_a": 0.008676470588235294}, "prompt_sha1": "cb9214a2b42b8506caa403961ef100c74ce39f57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x71, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x71<<1)|1 = 0xE3 = 11100011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 113, "rw": 1, "byte": 227}, "prompt_sha1": "e2fc7b3755aa27afbc2d94488827f6be2e933147", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 85.3% hit rate, and a 60 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.853 = 0.147.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.147×60 ns = 10.5700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.853, "penalty": 60, "result": 10.57}, "prompt_sha1": "1ed1d6ee780f91d10469b5d37a9921144dad5089", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 3` on one shared integer without synchronization. Assume `credits` initially equals 195. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 195; T2 reads 195; both compute 198; T1 writes 198; T2 writes 198. The observed final value is 198, but two serial increments would produce 201.\n\n```\nlock(mutex)\ncredits = credits + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "51c48977effbd8344465a68916b37aca0685e009", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 256-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/256 = 4096.\nSets = 4096/4 = 1024.\nOffset bits = log2(256) = 8; index bits = log2(1024) = 10; tag bits = 36-8-10 = 18.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 256, "ways": 4, "addr_bits": 36, "lines": 4096, "sets": 1024, "offset": 8, "index": 10, "tag": 18}, "prompt_sha1": "9b1487cbf4e7208fc7ed9c4ee34b91e0605b664a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=20 ms, C=5 ms,T=50 ms, C=5 ms,T=200 ms, C=5 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/20 + 5/50 + 5/200 + 5/25 = 0.575000 = 57.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 20], [5, 50], [5, 200], [5, 25]], "utilization": 0.5750000000000001}, "prompt_sha1": "99dfe3d15b95eef0adf040afb27e601dfab3486a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 250 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/250 = 100000.\nWith prescaler divisor limited to at most 4096, the largest divisor of 100000 that also keeps the period count within 16 bits is 4000.\nPeriod count = 100000/4000 = 25.\nPSC register = 4000-1 = 3999.\nARR register = 25-1 = 24.\nVerification: 25000000/(4000×25) = 250 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 250, "total_division": 100000, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 4000, "period": 25, "psc_reg": 3999, "arr_reg": 24}, "prompt_sha1": "6dc0983053cc3f25657604826ecbfc42ab6dbbac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w56_cin` implementing a 56-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `56-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w56_cin (\n input logic [55:0] a,\n input logic [55:0] b,\n input logic cin,\n output logic [55:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w56_cin", "width": 56, "cin": true}, "prompt_sha1": "7557f7e5e72f9340f91fe1a13d429f2143de3549", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 4` on one shared integer without synchronization. Assume `credits` initially equals 448. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 448; T2 reads 448; both compute 452; T1 writes 452; T2 writes 452. The observed final value is 452, but two serial increments would produce 456.\n\n```\nlock(mutex)\ncredits = credits + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "07b2118979b60ff7ff3323b555e817d83d7ba0e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `words` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n result += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `items[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n result += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "16b633e4edf29d007df8b52c174f5841d49d5d6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1400 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-20-28 = 1352 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 20, "tcphdr": 28, "mss": 1352}, "prompt_sha1": "125c6c3f17a1cf02c62d59ea7f0fa45983d54f69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 245 elements. Review loop `for i in range(245-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(245-1)` produces indices 0 through 243, so index 244 is skipped. Correct loop: `for i in range(245):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 245, "variant": "miss_last"}, "prompt_sha1": "b118464b59aff7754908e6f1fc83237a2f698a1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 514. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 514/1023 × 3 V = 1.507331 V.\nThus the estimated input is about 1.5073 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 514, "volts": 1.5073313782991202}, "prompt_sha1": "2c8d067b9e18bb3c7052848d4aed7bdf2bed6345", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 10000 = 3000. Verification: 3000/10000 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 30, "high": 3000}, "prompt_sha1": "f25faefd1ff6d08db806974663031922a0068565", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=47 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/2.2 = -21.363636.\nVout = A_v×Vin = -21.363636×0.25 = -5.340909 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 47, "vin": 0.25, "gain": -21.363636363636363, "vout": -5.340909090909091}, "prompt_sha1": "00756a1878fd750479826c3f4cc6f491486d37fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xE662A28C. Extract the 2-bit field starting at bit 14 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xE662A28C >> 14) & 0x3 = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 2, "lsb": 14, "value": 3865223820, "mask": 3, "field": 2}, "prompt_sha1": "035751998ba73dde6a9852960d16f5642ebd8cbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_925106` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_925106 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_925106"}, "prompt_sha1": "68f36bee3743758420a10e32849e9218db40c934", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x4EA0C052C2B3 in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 4E A0 C0 52 C2 B3.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 86452328383155, "endian": "big", "bytes": [78, 160, 192, 82, 194, 179]}, "prompt_sha1": "817b8ce8e44f7292beea5f77a3cf43b03ec0a2df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1704(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1704(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1704([1, 2]) == 1.5\nassert mean_1704([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1704"}, "prompt_sha1": "0fe4c0094a2226383cc4d0ac2ab0ff5c2cb7f396", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'V', 'V', 'V', 'P', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "V", "V", "V", "P", "V", "V", "P", "P", "P", "V", "P", "V"], "value": 1, "blocked": 0}, "prompt_sha1": "9a1c8c240ae5b54112aec188139a69074258ca71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-40 = 516 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 40, "mss": 516}, "prompt_sha1": "5fdbb3728abdbf14d0f42e9cbf7695ea2e8385cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 50 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 50×10^6×200/1000/8 = 1250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "rtt_ms": 200, "bytes": 1250000.0}, "prompt_sha1": "40540bfd0c1f8e7477206764fc7674ca4257d1e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5478-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5478×8 = 43824 bits.\nSerialization delay = bits/rate = 43824/(25000×10^6) s = 1.75296e-06 s = 1.752960 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5478, "rate_mbps": 25000, "delay_s": 1.75296e-06}, "prompt_sha1": "7b234aa3fe531b57aa35b049fdde55ab8815cf7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=47 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/4.7 = -10.000000.\nVout = A_v×Vin = -10.000000×0.05 = -0.500000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 47, "vin": 0.05, "gain": -10.0, "vout": -0.5}, "prompt_sha1": "62e1d17778a605849d671e34acd275fb19ee9319", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 2 = 30.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 2, "spi_hz": 30000000.0}, "prompt_sha1": "60c681ff35687210db0846d83a51bdf8875865f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 800 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 800 = 300. Verification: 300/800 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 800, "duty": 37.5, "high": 300}, "prompt_sha1": "3f9fd97b633a7ee8818b50a0091553e17b7fcbce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 93; x = x + 619;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 93+619 = 712. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (712) mod 2^8 = 200. So `x` stores 200. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 93, "add": 619, "result": 200}, "prompt_sha1": "78cc21027c96497373d875f1dfc5abd2f817c15a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 57600 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "04294fbbb9287f5b944315037e2529fb1ec0fd58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'V', 'V', 'P', 'P', 'P', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "V", "V", "P", "P", "P", "P", "V", "V", "V"], "value": 8, "blocked": 0}, "prompt_sha1": "3e7908d86bf8e625ab223cca646a5a3057a86f37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 80 = 30. Verification: 30/80 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 37.5, "high": 30}, "prompt_sha1": "b8f62a056de56c79fe141465474be203cdd70a57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD616 in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: D6 16.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 54806, "endian": "big", "bytes": [214, 22]}, "prompt_sha1": "e72036440c0a4442eefdb41fc3bf852a806fe8be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 1 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×1/(2×10^9) = 0.05 s = 50.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 1.0, "ghz": 2.0, "sec": 0.05}, "prompt_sha1": "493dcf3c65863c252720ed5c25e4b26f41f31d43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_30_lsb` for `30-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_30_lsb (\n input logic [29:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 29; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_30_lsb", "width": 30, "priority": "low"}, "prompt_sha1": "da0a8d05f72d4cef8df42ec1462b17a125c5b139", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 64-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/64 = 1024.\nOffset bits = log2(64) = 6.\nIndex bits = log2(1024) = 10.\nTag bits = 32-10-6 = 16.\nCheck: 16+10+6 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 64, "addr_bits": 32, "lines": 1024, "offset_bits": 6, "index_bits": 10, "tag_bits": 16}, "prompt_sha1": "747cfc729382ea20c0d8c0b926da1be1b9ea3b7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=680000 ohm and C=2200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=680000×2200000×10^-12 s = 1.496 s.\nf_c=1/(2πRC)=1/(2π×680000×2200000×10^-12) = 0.1064 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 680000, "c_f": 2.2e-06, "tau": 1.496, "fc": 0.10638699404538458}, "prompt_sha1": "46bede8239157854e1ec8cf0c7304d9da18d7a4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/4700=0.00070212766 A. P=V²/R=3.3²/4700=0.00231702128 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 4700, "i": 0.000702127659574468, "p": 0.0023170212765957444}, "prompt_sha1": "06b8ec1d948d102b88fc4ffb18a03e895d091007", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x8_write_bypass` with 32 entries of 8 bits. Inputs: `clk`, `we`, `5-bit waddr`, `8-bit wdata`, `5-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [7:0] wdata,\n input logic [4:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x8_write_bypass", "entries": 32, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "9df85f7bee7349847baf1db733d914d2e1847d37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2993 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "5b717ea9055f8567d0b0a7d00e4eb1b7292a5f4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 32-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/32 = 16384.\nOffset bits = log2(32) = 5.\nIndex bits = log2(16384) = 14.\nTag bits = 32-14-5 = 13.\nCheck: 13+14+5 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 32, "addr_bits": 32, "lines": 16384, "offset_bits": 5, "index_bits": 14, "tag_bits": 13}, "prompt_sha1": "10a40b8fa1c02ce20da6776cbf724dc1f3febac7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-20 = 1260 bytes.\nRound down to an 8-byte multiple: floor((1260)/8)×8 = 1256 bytes.\nFragments required = ceil(2000/1256) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 20, "payload": 2000, "max_payload": 1256, "fragments": 2}, "prompt_sha1": "30b0c14e2deb17c737b0bdc509db8ca2fdfaca97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5234 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5234/(5234+20+8) = 0.994679 = 99.47%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5234, "iphdr": 20, "eff": 0.9946788293424553}, "prompt_sha1": "9a59f70367a3adbac4f91ad5459ad28a7b312a68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×12000)/(68+12000) = 67.616838 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 12000, "req": 67.61683791846205}, "prompt_sha1": "2582a982c6c2d9833dce6d12f7db331124fef164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 300 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 300 = 45. Verification: 45/300 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 300, "duty": 15, "high": 45}, "prompt_sha1": "095c6cbdda0778d7a94a0cda3ecc5b4c50e5a786", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 986 elements. Review loop `for i in range(986-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(986-1)` produces indices 0 through 984, so index 985 is skipped. Correct loop: `for i in range(986):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 986, "variant": "miss_last"}, "prompt_sha1": "918486037703584af53189be7b0c4e605c36b9b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_19_38_18` with RED, GREEN, YELLOW states. Hold RED for 19 clock cycles, GREEN for 38, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_19_38_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 18) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_19_38_18", "red": 19, "green": 38, "yellow": 18}, "prompt_sha1": "38a9e3a5b15181569b20567eab273ee26ba41dbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 97, and period is 3245 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(97×3245) = 25.415786 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 97, "period": 3245, "hz": 25.415786380315474}, "prompt_sha1": "1dc2a62d76bc38da84788d6262acf00d4b144e49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 160 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 4852 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10000×4852/(160×10^6) = 0.30325 = 30.325000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 160, "irq_hz": 10000, "cycles": 4852, "load": 0.30325}, "prompt_sha1": "5cfc566e65f286dcefa5c1619af6b5617d3af503", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.161.250.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.161.250.0\nBroadcast address: 10.161.250.127\nUsable host range: 10.161.250.1 to 10.161.250.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.161.250.0/25", "usable": 126, "first": "10.161.250.1", "last": "10.161.250.126", "broadcast": "10.161.250.127"}, "prompt_sha1": "9fa325dd389cfe185a8af7b5e2446b987cb5b6dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4676(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4676(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4676([1, 2]) == 1.5\nassert mean_4676([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4676"}, "prompt_sha1": "0f2edfa2d0eacd728a13100496b0218a110aa41c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 13.5 V source drives a 390 ohm resistor in series with an LED whose forward voltage is assumed to be 2.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 13.5-2.1 = 11.4 V.\nI = V/R = 11.4/390 A = 29.2308 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 13.5, "vf": 2.1, "r": 390, "current_a": 0.02923076923076923}, "prompt_sha1": "b6f2122152dc41812aa90050453f0aacf84b6b22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 90%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.040×(15+0.100×200) = 2.900000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.96, "l2": 15, "l2_hit": 0.9, "mem": 200, "amat": 2.9000000000000012}, "prompt_sha1": "6a086a08e2d91a6974dcd2c4172198e20f2e4a43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=10 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/22 = -0.454545.\nVout = A_v×Vin = -0.454545×0.25 = -0.113636 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 10, "vin": 0.25, "gain": -0.45454545454545453, "vout": -0.11363636363636363}, "prompt_sha1": "13fdd545527aa29fc159dd2fdef44825ce1a5c57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_50` for a 50-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_50 (\n input logic signed [49:0] data,\n input logic [5:0] shamt,\n output logic signed [49:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_50", "width": 50, "direction": "right", "arithmetic": true}, "prompt_sha1": "86b9ef6f144200068e593133618e65fe4ddb0d9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x20_no_bypass` with 4 entries of 20 bits. Inputs: `clk`, `we`, `2-bit waddr`, `20-bit wdata`, `2-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x20_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [19:0] wdata,\n input logic [1:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x20_no_bypass", "entries": 4, "width": 20, "mode": "no_bypass"}, "prompt_sha1": "cb5f9b845d702146235ed3e770cdea24b30b7445", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1000 million instructions at average CPI 0.75 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1000×10^6×0.75/(2×10^9) = 0.375 s = 375.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1000, "cpi": 0.75, "ghz": 2.0, "sec": 0.375}, "prompt_sha1": "f4ca077eda4fc4abaf9b11e1f71ea5b031ad8bf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 27 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 27-14 = 13.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 27, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 13}, "prompt_sha1": "ef6609d9f3c66a21f9df94460bd18f0be525d5d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 500 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 500×10^6×200/1000/8 = 12500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "rtt_ms": 200, "bytes": 12500000.0}, "prompt_sha1": "15a798e647c84d99c92fa1dcb6496ac5f8baf23c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3 ns hit time, 86.6% hit rate, and a 165 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.866 = 0.134.\nAMAT = hit time + miss rate × miss penalty\n= 3 ns + 0.134×165 ns = 25.1100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.0, "hit_rate": 0.866, "penalty": 165, "result": 25.110000000000003}, "prompt_sha1": "fc0e0b963f143f1fd20e239494dda229578927eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_62` for a 62-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_62 (\n input logic [61:0] data,\n input logic [5:0] shamt,\n output logic [61:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_62", "width": 62, "direction": "right", "arithmetic": false}, "prompt_sha1": "9e1bad264c8a9b596e8012cd51966325cab7d895", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 57-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^57/2^15 = 2^42 = 4398046511104 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 57, "page_exp": 15, "entries": 4398046511104}, "prompt_sha1": "7f8a5f2dd7acd5e2880cee53fd54bc56d7f4763d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 508 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×508/(200×10^6) = 2.54e-05 = 0.002540%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 10, "cycles": 508, "load": 2.54e-05}, "prompt_sha1": "23ef1059e2a19c0c18be2a2a7044882ff0354834", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=220 nF and is stepped to 1 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=1(1-e^-5)=0.993262 V; τ=0.022 s and t=0.11 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 2.2e-07, "multiple": 5, "vin": 1, "vc": 0.9932620530009145}, "prompt_sha1": "daec51b359d50f6d90acbf270f534214ed809fff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=2.2 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×1/(2.2+1) = 2.812500 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 2.2, "r2": 1, "vout": 2.8125}, "prompt_sha1": "9f45d2dd6a0e5e855a939ced5a726ea4e572985c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 1500-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (1500×8) = 16666.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 1500, "pps": 16666.666666666668}, "prompt_sha1": "016dff347edb5fc7c9414bef29b2f584f1cc3630", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 39.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+12 = 51.5. Period = 51.5/2000000 = 2.575e-05 s. Maximum rate = 1/period = 38834.951456 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 39.5, "conv_cycles": 12, "period": 2.575e-05, "rate": 38834.95145631068}, "prompt_sha1": "2106861f5d761d855b7f8a2b1fc29714c1d83f0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 325 elements. Review loop `for i in range(325-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(325-1)` produces indices 0 through 323, so index 324 is skipped. Correct loop: `for i in range(325):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 325, "variant": "miss_last"}, "prompt_sha1": "e55692ead01f0d3c626f4557552abc264e5ac342", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 27-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^27/2^10 = 2^17 = 131072 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 27, "page_exp": 10, "entries": 131072}, "prompt_sha1": "4b2aaa92a61409e15c36284992b4a1a2563d3f51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [15, 3, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [22, 8, 11].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [15, 3, 4], "finish": [22, 8, 11]}, "prompt_sha1": "e6ff1cbb272dceeb60e2bfeff72d7af9f2119f01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [16, 30, 2, 4, 2]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [36, 54, 10, 14, 16].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [16, 30, 2, 4, 2], "finish": [36, 54, 10, 14, 16]}, "prompt_sha1": "e03920db49ee42930227100d697f1d1ae170d37a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 28. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 28/255 × 2.5 V = 0.274510 V.\nThus the estimated input is about 0.2745 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 28, "volts": 0.27450980392156865}, "prompt_sha1": "56a52e80894eb09308c643d0a704faaae0565591", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=47 nF and is stepped to 1 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1(1-e^-3)=0.950213 V; τ=4.7e-05 s and t=0.000141 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7000000000000004e-08, "multiple": 3, "vin": 1, "vc": 0.950212931632136}, "prompt_sha1": "47c58133c10fd34b9d782f6cfbc9adcbd4cc9c60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1000 ohm and C=820000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1000×820000×10^-12 s = 0.00082 s.\nf_c=1/(2πRC)=1/(2π×1000×820000×10^-12) = 194.0914 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1000, "c_f": 8.2e-07, "tau": 0.00082, "fc": 194.09139401450653}, "prompt_sha1": "e6967b6f8ef03d44e9681edfa22a0e69efd07d8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×400×10^6×4 = 51.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 400, "channels": 4, "gbps": 51.2}, "prompt_sha1": "6633918e72506f567d33e4458b725e3ff06f0b33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.77. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.77) + 0.77/8) = 3.065134.\nThe theoretical speedup is about 3.065×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.77, "n": 8, "result": 3.0651340996168583}, "prompt_sha1": "31a9d7144212800ce688762ff7fb0ea7e65b34be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_8363` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_8363 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_8363"}, "prompt_sha1": "e0f98a48115e9c35e4a463df150378f5a2d7ee22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 8 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×8×10^6 = 64000000 B/s. Time = 262144/64000000 = 0.004096 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 8, "rate_mhz": 8, "sec": 0.004096}, "prompt_sha1": "510ba48727f8b84ac6aca4719ceadd5480abd9a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=2.2 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/10 = -0.220000.\nVout = A_v×Vin = -0.220000×0.2 = -0.044000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 2.2, "vin": 0.2, "gain": -0.22000000000000003, "vout": -0.04400000000000001}, "prompt_sha1": "b42c07b3f2cbd1f370be17f2eb9391c58ce214eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 63 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 63-10 = 53.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 63, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 53}, "prompt_sha1": "cfb64f28ccb4508b11c401626ddaeee6a246bd04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x2D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x2D<<1)|0 = 0x5A = 01011010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 45, "rw": 0, "byte": 90}, "prompt_sha1": "3231d7bc6d621124350eb6d19d0a5f951c6a5c20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=10000 ohm and C=6800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=10000×6800000×10^-12 s = 0.068 s.\nf_c=1/(2πRC)=1/(2π×10000×6800000×10^-12) = 2.3405 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 10000, "c_f": 6.8e-06, "tau": 0.068, "fc": 2.340513868998461}, "prompt_sha1": "bae099141573de6768387ae0913d951f08715369", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 9 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 53 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+1 = 11. Total bits = 53×11 = 583. Time = 583/38400 = 0.0151822917 s = 15.182292 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 9, "parity": 0, "stop": 1, "frames": 53, "seconds": 0.015182291666666667}, "prompt_sha1": "af59ea2dfe9256bbb67ffd9a94cff61b879392ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65313; x = x + 495;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65313+495 = 65808. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65808) mod 2^16 = 272. So `x` stores 272. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65313, "add": 495, "result": 272}, "prompt_sha1": "6d7926c5e80e5ab5be93bbb936b6b15a04bd863c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock QUEUE then A; T2 acquires A then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds QUEUE while waiting for A, while T2 holds A while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "9900d12217e83e92d399f733b12e239d4d9ae92a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.82. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.82) + 0.82/10) = 3.816794.\nThe theoretical speedup is about 3.817×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.82, "n": 10, "result": 3.8167938931297707}, "prompt_sha1": "31310b597faf18691f965f88596aad092af58184", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_18` for a synchronous sampled input `noisy`. Update output `clean` only after observing 18 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_18 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 17) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_18", "stable_samples": 18}, "prompt_sha1": "265fdaad5a8f564b06bfde685f01f3abc252b638", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 4.1 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 4.1-2 = 2.1 V.\nI = V/R = 2.1/2700 A = 0.7778 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 4.1, "vf": 2.0, "r": 2700, "current_a": 0.0007777777777777776}, "prompt_sha1": "153134f253a989517a647e0abb2ba8fd5107d906", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 28 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 28 = 30.\nClock pulses = 30×9 = 270.\nTime = 270/100000 s = 2700.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 28, "clocks": 270, "time_s": 0.0027}, "prompt_sha1": "1a254bc4fbe6aa261ff5fcc1dbdb6014f8eecfaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [24, 17, 12, 30, 9, 30]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [106, 88, 65, 120, 57, 122].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [24, 17, 12, 30, 9, 30], "finish": [106, 88, 65, 120, 57, 122]}, "prompt_sha1": "a275d55824c21cc10f62a0c94cd01f9bbcf0e405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 16-bit right-shift register module `shiftreg_right_16`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `16-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_16 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [15:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[15:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_16", "width": 16, "direction": "right"}, "prompt_sha1": "15b390a3ddaa718578a66660b9f11c6f341aa641", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 30 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 30×8 = 240. Time = 240/4800 = 0.05 s = 50.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 6, "parity": 0, "stop": 1, "frames": 30, "seconds": 0.05}, "prompt_sha1": "778de07e2613b2f9fbbb19ecd0c02feecab3583c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1001100101011111101101001 using generator polynomial bits 1000001. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 110010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 65, "msg_bits": 25, "msg": 20103017, "remainder": 50}, "prompt_sha1": "389f3944a5d2b76cdd53b4526255d40f0399441d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3213-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3213×8 = 25704 bits.\nSerialization delay = bits/rate = 25704/(100×10^6) s = 0.00025704 s = 257.040000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3213, "rate_mbps": 100, "delay_s": 0.00025704}, "prompt_sha1": "be1db7621386e800cd63169c272cfc05119b3ab6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 10 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 10000000/(16×28800) = 21.701389.\nNearest integer divisor D = 22.\nActual baud = 10000000/(16×22) = 28409.091 baud.\nError = (28409.091-28800)/28800×100% = -1.3573%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 10000000, "oversample": 16, "baud": 28800, "divisor": 22, "actual": 28409.090909090908, "error_pct": -1.3573232323232356}, "prompt_sha1": "fe6a41e390e290e85df009d785c65d2fb1e2612b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×82)/(22000+82) = 81.695499 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 82, "req": 81.69549859614166}, "prompt_sha1": "c54370c76f679a563bb8784ba73c670aade7471c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_36_msb` for `36-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_36_msb (\n input logic [35:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 36; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_36_msb", "width": 36, "priority": "high"}, "prompt_sha1": "ed5511c3ab305f93e0dc564ca4aa5f9943ff4cd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x49, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x49<<1)|1 = 0x93 = 10010011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 73, "rw": 1, "byte": 147}, "prompt_sha1": "8cd0b74ba2229f2461d347f4517072d2aba1b093", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.4 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.4-2.3 = 21.1 V.\nI = V/R = 21.1/2700 A = 7.8148 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.4, "vf": 2.3, "r": 2700, "current_a": 0.007814814814814814}, "prompt_sha1": "6e2ff186cc5f3f6153bf72fee0b539076f845078", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=47 nF and is stepped to 1 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1(1-e^-4)=0.981684 V; τ=0.00047 s and t=0.00188 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 4.7000000000000004e-08, "multiple": 4, "vin": 1, "vc": 0.9816843611112658}, "prompt_sha1": "d55422ceab6c628d27c991b8f37a3ca435b49a97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1492 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-40-28 = 1424 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 40, "tcphdr": 28, "mss": 1424}, "prompt_sha1": "cd398e24ab85b63becdec4e5c73ae17ce7014825", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_35_30_14` with RED, GREEN, YELLOW states. Hold RED for 35 clock cycles, GREEN for 30, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_35_30_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 34) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 29) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_35_30_14", "red": 35, "green": 30, "yellow": 14}, "prompt_sha1": "08e628593c8048acb58058df53224268933301eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_22_msb` for `22-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_22_msb (\n input logic [21:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 22; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_22_msb", "width": 22, "priority": "high"}, "prompt_sha1": "f566749520a8de9e4e30a31fa6c554202cb14fdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 1 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×80×10^6 = 80000000 B/s. Time = 2048/80000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 1, "rate_mhz": 80, "sec": 2.56e-05}, "prompt_sha1": "4f7e3cdf61d5ad729e0f5f75c63c8d0833ec381f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 128 data bits per transfer at 200 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 128/8 = 16. Bandwidth = 16×200×10^6×3 = 9.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 128, "rate_mt": 200, "channels": 3, "gbps": 9.6}, "prompt_sha1": "35130944eaca7066390f36e337ed4fee80da3772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 30 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×30/(240×10^6) = 0.0025 = 0.250000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 20000, "cycles": 30, "load": 0.0025}, "prompt_sha1": "79e5c37250088304d46607e84742f4f8be8894e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 214. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 214/255 × 2.5 V = 2.098039 V.\nThus the estimated input is about 2.0980 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 214, "volts": 2.0980392156862746}, "prompt_sha1": "a3546262d6a403d0b249f83c701d50a8d25e3f3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 8000 payload bytes plus 18 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 8000/(8000+18) = 0.997755 = 99.78%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 8000, "overhead": 18, "efficiency": 0.9977550511349463}, "prompt_sha1": "427234db7de329f693141108ff9a74a5af9d39e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 12500 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 12500 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 12500.0}, "prompt_sha1": "30e7d4f3bd12d7dd68c15f48ab20ff5d2ab19c65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.206.17.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.206.17.0\nBroadcast address: 10.206.17.3\nUsable host range: 10.206.17.1 to 10.206.17.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.206.17.0/30", "usable": 2, "first": "10.206.17.1", "last": "10.206.17.2", "broadcast": "10.206.17.3"}, "prompt_sha1": "894e2abb990efe33999e74566fbe7530291df431", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_49_lsb` for `49-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_49_lsb (\n input logic [48:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 48; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_49_lsb", "width": 49, "priority": "low"}, "prompt_sha1": "77718ac70fced1d3a486030648d70b3437310fa6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/2.2 = 0.00454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 2.2, "tau": 0.004545454545454545}, "prompt_sha1": "ce025c3108cbc62efad8af41b997882de3968fc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3113556011, carries 2678 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 2678+1+0 = 2679. ACK = (3113556011+2679) mod 2^32 = 3113558690.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3113556011, "payload": 2678, "syn": 1, "fin": 0, "ack": 3113558690}, "prompt_sha1": "d9d605efe4677356b1d1a307deec4900314d8b1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 4 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×4/(1×10^9) = 0.008 s = 8.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 4.0, "ghz": 1.0, "sec": 0.008}, "prompt_sha1": "a9fd107cc61533687c136a0920bc6bd87d7615c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 0.75 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×0.75/(1.5×10^9) = 0.0005 s = 0.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 0.75, "ghz": 1.5, "sec": 0.0005}, "prompt_sha1": "492cdbf550c7abc39a44baf4b75de33cea30f27e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w31_nocin` implementing a 31-bit unsigned adder with inputs `a`, `b` and outputs `31-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w31_nocin (\n input logic [30:0] a,\n input logic [30:0] b,\n output logic [30:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w31_nocin", "width": 31, "cin": false}, "prompt_sha1": "1905769ffff68507dfcf2c7bff62b42b116c4f5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 150 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (150×82)/(150+82) = 53.017241 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 150, "r2": 82, "req": 53.01724137931034}, "prompt_sha1": "a55cda1013adff219b15490ca35533d4f44ad9fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x64_no_bypass` with 64 entries of 64 bits. Inputs: `clk`, `we`, `6-bit waddr`, `64-bit wdata`, `6-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x64_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [63:0] wdata,\n input logic [5:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x64_no_bypass", "entries": 64, "width": 64, "mode": "no_bypass"}, "prompt_sha1": "11b4cc39fee7a1d81c19179e02c4a972f2af6b2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m2240` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 2240 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m2240 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd2240;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m2240", "width": 13, "max": 2240}, "prompt_sha1": "949829eb710538930a9e6c86fc57aa395e7a4e59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(1×10^6) s = 1024.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 1024, "time_us": 1024.0}, "prompt_sha1": "623b392dca5f181a5deab633b25b941e5d4a0ae5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=100 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/100 = -1.000000.\nVout = A_v×Vin = -1.000000×0.1 = -0.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 100, "vin": 0.1, "gain": -1.0, "vout": -0.1}, "prompt_sha1": "d7cfdb669e973ffa8b8f1e1addf71e9484f7eb22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=1 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×1/(1+1) = 12.000000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 1, "r2": 1, "vout": 12.0}, "prompt_sha1": "dbfa8f089773596a44a051752970bcca48fe40a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 80 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 2842 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×2842/(80×10^6) = 0.07105 = 7.105000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 80, "irq_hz": 2000, "cycles": 2842, "load": 0.07105}, "prompt_sha1": "af5d6d441162681023f42691ffbbbcefb3a92d32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=5 ms, C=2 ms,T=40 ms, C=3 ms,T=100 ms, C=2 ms,T=50 ms, C=4 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/5 + 2/40 + 3/100 + 2/50 + 4/100 = 0.760000 = 76.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 5], [2, 40], [3, 100], [2, 50], [4, 100]], "utilization": 0.76}, "prompt_sha1": "8f354fb37792628347a6bdd480899ba7ac85d07c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22 ohm and 27000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22×27000)/(22+27000) = 21.982089 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22, "r2": 27000, "req": 21.982088668492338}, "prompt_sha1": "515419c51267ac5cc8f71e16ed2d7bdda52d5d33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_24_2_19` with RED, GREEN, YELLOW states. Hold RED for 24 clock cycles, GREEN for 2, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_24_2_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 23) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 1) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_24_2_19", "red": 24, "green": 2, "yellow": 19}, "prompt_sha1": "f70ad150ac0ab53ddea01a28db191bcacc55284c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_119` for a synchronous sampled input `noisy`. Update output `clean` only after observing 119 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_119 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 118) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_119", "stable_samples": 119}, "prompt_sha1": "0710ed19bda22143cd00e6b85d2b3be7c84d0b83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 121, and period is 37664 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(121×37664) = 35.108168 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 121, "period": 37664, "hz": 35.10816826642887}, "prompt_sha1": "1092815acb0ff180e693abaecc77dc1febcc2ec6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-40 = 1960 bytes.\nRound down to an 8-byte multiple: floor((1960)/8)×8 = 1960 bytes.\nFragments required = ceil(4000/1960) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 40, "payload": 4000, "max_payload": 1960, "fragments": 3}, "prompt_sha1": "2dd6106c2b6a2f88254c0363d7f48869790d8142", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-28 = 528 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 28, "mss": 528}, "prompt_sha1": "37290f4f5756ae18cb2edd0e2155d2705f1b4019", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 16-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/16 = 4096.\nOffset bits = log2(16) = 4.\nIndex bits = log2(4096) = 12.\nTag bits = 48-12-4 = 32.\nCheck: 32+12+4 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 16, "addr_bits": 48, "lines": 4096, "offset_bits": 4, "index_bits": 12, "tag_bits": 32}, "prompt_sha1": "56c48b57a17e4bbe6774232496458ddb5a475109", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×9²=4.05e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 9, "energy": 4.05e-06}, "prompt_sha1": "b48cac360715525edb830eb4cc389b31571ea836", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 40 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 40-10 = 30.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 40, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 30}, "prompt_sha1": "8de04eb45128b935e42bdd1cb80a0ad8a19ee207", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x19490923. Extract the 8-bit field starting at bit 5 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x19490923 >> 5) & 0xFF = 0x49 (73).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 5, "value": 424216867, "mask": 255, "field": 73}, "prompt_sha1": "83b1a908b54b0c64d9c0c74ca9b7d6641e0e74f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x48_write_bypass` with 16 entries of 48 bits. Inputs: `clk`, `we`, `4-bit waddr`, `48-bit wdata`, `4-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [47:0] wdata,\n input logic [3:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x48_write_bypass", "entries": 16, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "1c30790fb101e032c5769e311c396f8a47c42a7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 97%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.080×(3+0.030×40) = 2.336000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.92, "l2": 3, "l2_hit": 0.97, "mem": 40, "amat": 2.336}, "prompt_sha1": "eb1babd316aae61f90c8055e5c531acfd064dbad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 2 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×50×10^6 = 100000000 B/s. Time = 512/100000000 = 5.12e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 2, "rate_mhz": 50, "sec": 5.12e-06}, "prompt_sha1": "b7af51981341fce192dbcfbace84633d4179b1cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8112 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8112/(8112+40+8) = 0.994118 = 99.41%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8112, "iphdr": 40, "eff": 0.9941176470588236}, "prompt_sha1": "7d87a7be06229406771aaa51b5c3c454a5887edf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x19, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x19<<1)|1 = 0x33 = 00110011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 25, "rw": 1, "byte": 51}, "prompt_sha1": "d7e951dd8ea980fb63fee2014814be2fc7c814be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 550. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 550/4095 × 3.3 V = 0.443223 V.\nThus the estimated input is about 0.4432 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 550, "volts": 0.4432234432234432}, "prompt_sha1": "ae6fdb8a7cac9423aa471b834c8fbe8736810709", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 7` on one shared integer without synchronization. Assume `counter` initially equals 484. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 484; T2 reads 484; both compute 491; T1 writes 491; T2 writes 491. The observed final value is 491, but two serial increments would produce 498.\n\n```\nlock(mutex)\ncounter = counter + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "c144f05b529c35bdea163182f865d7d12c592898", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1407964464, carries 44203 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 44203+0+1 = 44204. ACK = (1407964464+44204) mod 2^32 = 1408008668.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1407964464, "payload": 44203, "syn": 0, "fin": 1, "ack": 1408008668}, "prompt_sha1": "0efa2e18c6e6a9679939a9c106403bd37ec205e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x7CC61D92E27518C0 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 7C C6 1D 92 E2 75 18 C0.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 8990906222793529536, "endian": "big", "bytes": [124, 198, 29, 146, 226, 117, 24, 192]}, "prompt_sha1": "b9770e37d28c0f74699c9f6c878884aca26cd259", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 20 and initial occupancy is 14. In an abstract batch, producer attempts to enqueue 165 items first, dropping any excess beyond capacity; then consumer removes up to 156 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=20, dropped=159; consumed=20; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 20, "start": 14, "prod": 165, "cons": 156, "dropped": 159, "consumed": 20, "final": 0}, "prompt_sha1": "8bd906eea4dd6542ac10bd5c041397f43fd54e80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 63 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 63-13 = 50.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 63, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 50}, "prompt_sha1": "a74dc02b1e12e8af3b71f2ba11baab5b5f67c78d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [3, 9, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [7, 20, 38].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [3, 9, 26], "finish": [7, 20, 38]}, "prompt_sha1": "b05fd225dfba2d7f8c6cfa334021db89850f5130", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=4700 nF and is stepped to 5 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=5(1-e^-3)=4.751065 V; τ=0.1034 s and t=0.3102 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 4.7e-06, "multiple": 3, "vin": 5, "vc": 4.75106465816068}, "prompt_sha1": "8f303be0221471d2edaf178e33cf9092a2b81369", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 80 MHz. Sampling consumes 247.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+20 = 267.5. Period = 267.5/80000000 = 3.34375e-06 s. Maximum rate = 1/period = 299065.420561 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 80000000.0, "sample_cycles": 247.5, "conv_cycles": 20, "period": 3.34375e-06, "rate": 299065.4205607477}, "prompt_sha1": "0d9b04ce81d61fa84cf903efec76b3b9987de133", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w2_nocin` implementing a 2-bit unsigned adder with inputs `a`, `b` and outputs `2-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w2_nocin (\n input logic [1:0] a,\n input logic [1:0] b,\n output logic [1:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w2_nocin", "width": 2, "cin": false}, "prompt_sha1": "ff1d7e93b55ebb1fe57de4150045d024ca637a0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 200/1000 = 5e+09 bits = 6.25e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 200, "bits": 5000000000.0, "bytes": 625000000.0}, "prompt_sha1": "a5184c8a5f9b425427b0861ceb85297319912c77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 7.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+20 = 27.5. Period = 27.5/1000000 = 2.75e-05 s. Maximum rate = 1/period = 36363.636364 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 7.5, "conv_cycles": 20, "period": 2.75e-05, "rate": 36363.63636363636}, "prompt_sha1": "a68ce1331e269e1c9a9469c4f7a62f4ceb683081", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w32_6510` implementing a dual-clock asynchronous FIFO with depth 4 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w32_6510 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 32,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w32_6510", "depth": 4, "width": 32, "ptr_w": 2}, "prompt_sha1": "b4db733577c8834e3fe2dbb22cc0e2b9bddfbe19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.75 ns hit time, 92.3% hit rate, and a 25 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.923 = 0.077.\nAMAT = hit time + miss rate × miss penalty\n= 2.75 ns + 0.077×25 ns = 4.6750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.75, "hit_rate": 0.923, "penalty": 25, "result": 4.674999999999999}, "prompt_sha1": "f52494fa8c35c9c0c3c444357c7752931a64f820", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 2 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×2/(2×10^9) = 0.05 s = 50.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 2.0, "ghz": 2.0, "sec": 0.05}, "prompt_sha1": "990819b19fa016cdf9531dfbac886de01e155172", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock TX then RX; consumer acquires RX then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds TX while waiting for RX, while consumer holds RX while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire RX before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "9c5bbed6c8a1aff3c7c3529b180541a400f4cc99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 7-bit up/down counter `updown_7_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_7_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [6:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 7'd127) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_7_sat", "width": 7, "wrap": false}, "prompt_sha1": "1f114fe48cc47e4a59204dc35a179df3a47c0a4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 2000 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-20-24 = 1956 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 20, "tcphdr": 24, "mss": 1956}, "prompt_sha1": "38d6b378527e3695e48908020720bf26cf7a510a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_21` generating a one-clock-cycle `tick` every 21 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_21 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 20) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_21", "divide": 21}, "prompt_sha1": "fcc1ef53b7583e8d51e8686a87bb4f89560dfad1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 56-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^56/2^21 = 2^35 = 34359738368 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 56, "page_exp": 21, "entries": 34359738368}, "prompt_sha1": "d34c45da1b267f2c7af0db00cad17756aa3e363f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [27, 2, 7, 16, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [72, 7, 29, 60, 65].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [27, 2, 7, 16, 20], "finish": [72, 7, 29, 60, 65]}, "prompt_sha1": "caf5e81074e6558de29de6128b638a3955a82779", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=4.7 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/1 = -4.700000.\nVout = A_v×Vin = -4.700000×0.25 = -1.175000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 4.7, "vin": 0.25, "gain": -4.7, "vout": -1.175}, "prompt_sha1": "dce63f06c8b003ee38d751cb17e37688b833e0ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-40 = 960 bytes.\nRound down to an 8-byte multiple: floor((960)/8)×8 = 960 bytes.\nFragments required = ceil(3000/960) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 40, "payload": 3000, "max_payload": 960, "fragments": 4}, "prompt_sha1": "2ae914a6f231521222a65e0ab7d9890fbfb3949c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_7615` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_7615 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_7615", "width": 8}, "prompt_sha1": "3f67441bac4b044c394df7ad0c0fa67a39acaa80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 0.5 on a 2.4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×0.5/(2.4×10^9) = 0.000416666667 s = 0.416667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 0.5, "ghz": 2.4, "sec": 0.0004166666666666667}, "prompt_sha1": "39c9b65a05a65b6ea71ac0b468aa31f5f4b00df0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_159918` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_159918 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_159918"}, "prompt_sha1": "0fa51bbbc7d3aaa903a8c1a0e9ee18bc436dc761", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.246.59.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.246.59.0\nBroadcast address: 10.246.59.63\nUsable host range: 10.246.59.1 to 10.246.59.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.246.59.0/26", "usable": 62, "first": "10.246.59.1", "last": "10.246.59.62", "broadcast": "10.246.59.63"}, "prompt_sha1": "877ab0eccf4c0e93f3a465a4b2cb4a069f237d61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10000 Mbit/s and RTT 80 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10000×10^6 × 80/1000 = 8e+08 bits = 1e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10000, "rtt_ms": 80, "bits": 800000000.0, "bytes": 100000000.0}, "prompt_sha1": "dddc7b47750ea6f54f756167303496d6327e69ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_8_56_18` with RED, GREEN, YELLOW states. Hold RED for 8 clock cycles, GREEN for 56, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_8_56_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 7) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 55) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_8_56_18", "red": 8, "green": 56, "yellow": 18}, "prompt_sha1": "a763f1f2c324f3d340730d7f5b2b6f44c39327cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(4×10^6) s = 4.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 16, "time_us": 4.0}, "prompt_sha1": "68da5d90204f553ebd0a2ad66fc8db8167df0c72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1000 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1000-20-32 = 948 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1000, "iphdr": 20, "tcphdr": 32, "mss": 948}, "prompt_sha1": "d39433aad94732ff44759afb00a4c1817caca3cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTNTNNNTNNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "14a079faabc6e6e0a3d76a45c435128f9454c0b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/100000=9e-05 A. P=V²/R=9²/100000=0.00081 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 100000, "i": 9e-05, "p": 0.00081}, "prompt_sha1": "6e9abc90230aff9c0cb4ba1adea2d3792d783298", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 97%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.080×(20+0.030×200) = 2.580000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.92, "l2": 20, "l2_hit": 0.97, "mem": 200, "amat": 2.5799999999999996}, "prompt_sha1": "6ac07bae60a27627ed47bd047c3466de21191806", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w18_signed` comparing two 18-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w18_signed (\n input logic signed [17:0] a,\n input logic signed [17:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w18_signed", "width": 18, "signed": true}, "prompt_sha1": "656b1741ba525cc60d0023b512e5e8aee34802a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(16×10^6) s = 2.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 32, "time_us": 2.0}, "prompt_sha1": "d77c65c8f4023a09637ba868b76a8991cbd76321", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=8200 ohm and C=1800 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=8200×1800×10^-12 s = 1.476e-05 s.\nf_c=1/(2πRC)=1/(2π×8200×1800×10^-12) = 10782.8552 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 8200, "c_f": 1.8e-09, "tau": 1.476e-05, "fc": 10782.85522302814}, "prompt_sha1": "a8411b07aa4e7c937b3346e9bf44acd3ff0fa059", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3650425970, carries 55580 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 55580+0+1 = 55581. ACK = (3650425970+55581) mod 2^32 = 3650481551.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3650425970, "payload": 55580, "syn": 0, "fin": 1, "ack": 3650481551}, "prompt_sha1": "abce2bd91feef4919807eef80526d32b2eb83582", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_197432` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_197432 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_197432"}, "prompt_sha1": "0cd70088cb0fa201dba71416d3ec3eaffcbe4411", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 48 MHz. Sampling consumes 12.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+24 = 36.5. Period = 36.5/48000000 = 7.60416667e-07 s. Maximum rate = 1/period = 1315068.493151 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 48000000.0, "sample_cycles": 12.5, "conv_cycles": 24, "period": 7.604166666666667e-07, "rate": 1315068.493150685}, "prompt_sha1": "552b01ce40991b947c8b279c775b6b9be6268fb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6801 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6801/(6801+20+8) = 0.995900 = 99.59%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6801, "iphdr": 20, "eff": 0.9958998389222433}, "prompt_sha1": "a9396f3d0934da6e6682562e766416bbcda979ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×0.5/1000/8 = 125.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 0.5, "bytes": 125.0}, "prompt_sha1": "2b38218b8df922042b7f587a0cee36f2f2918344", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6717` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6717 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6717"}, "prompt_sha1": "649b9697b099f8d38b2d6068db8ba5de621643ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=25 ms, C=2 ms,T=50 ms, C=1 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/25 + 2/50 + 1/50 = 0.220000 = 22.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 25], [2, 50], [1, 50]], "utilization": 0.22}, "prompt_sha1": "49ecf3bffa5d17d8319f09b0a3096313929133c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 4-way set-associative cache uses 16-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/16 = 8192.\nSets = 8192/4 = 2048.\nOffset bits = log2(16) = 4; index bits = log2(2048) = 11; tag bits = 52-4-11 = 37.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 16, "ways": 4, "addr_bits": 52, "lines": 8192, "sets": 2048, "offset": 4, "index": 11, "tag": 37}, "prompt_sha1": "0bb53dc98c532ca3d3bed1e36b5fedd8aee9151a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50×10^6 × 200/1000 = 1e+07 bits = 1.25e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50, "rtt_ms": 200, "bits": 10000000.0, "bytes": 1250000.0}, "prompt_sha1": "23e5bd7007e1c4304519e1fa51f7e5ddcb7c7eda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w9_m266` with clk, asynchronous active-low rst_n, active-high enable, and output logic [8:0] count. On reset count=0. When enabled it increments until 266 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w9_m266 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [8:0] count\n);\n localparam logic [8:0] LIMIT = 9'd266;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w9_m266", "width": 9, "max": 266}, "prompt_sha1": "69ae0f627ee3a2b1623f7dd2c6b4fdbac24a6024", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_125_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 125 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_125_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd125;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_125_ignore", "cycles": 125, "retrigger": false}, "prompt_sha1": "927d449cdc0aaf8e965fc832d664f37869d27886", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 96 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 96000000/500 = 192000.\nWith prescaler divisor limited to at most 16, the largest divisor of 192000 that also keeps the period count within 16 bits is 16.\nPeriod count = 192000/16 = 12000.\nPSC register = 16-1 = 15.\nARR register = 12000-1 = 11999.\nVerification: 96000000/(16×12000) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 96000000, "target_hz": 500, "total_division": 192000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 12000, "psc_reg": 15, "arr_reg": 11999}, "prompt_sha1": "4d8d9cde7a090c6d58230b5487a5de5d12059320", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=150000 ohm and C=1000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=150000×1000×10^-12 s = 0.00015 s.\nf_c=1/(2πRC)=1/(2π×150000×1000×10^-12) = 1061.0330 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 150000, "c_f": 1e-09, "tau": 0.00015000000000000001, "fc": 1061.0329539459688}, "prompt_sha1": "81aa98574093fb5bb3342b9eaa35d317971928a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4650 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4650/(4650+20+8) = 0.994015 = 99.40%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4650, "iphdr": 20, "eff": 0.9940145361265498}, "prompt_sha1": "48bc91ddb4c0bc152ea7f60aac7037dbef785799", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^6 V = 0.0703125 V = 70312.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 4.5, "step": 0.0703125}, "prompt_sha1": "9ba94edf8c1bf789ae157a51302fe9c8dd6e2f4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=220 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/10 = -22.000000.\nVout = A_v×Vin = -22.000000×1 = -22.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 220, "vin": 1.0, "gain": -22.0, "vout": -22.0}, "prompt_sha1": "ef034d30300ac67d64ae344b99b1e1282a525fd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 90%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.050×(12+0.100×80) = 3.000000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.95, "l2": 12, "l2_hit": 0.9, "mem": 80, "amat": 3.000000000000001}, "prompt_sha1": "a7293bf2bd7cf2aded79c40377157c31a0d3d044", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 903 elements. Review loop `for i in range(903-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(903-1)` produces indices 0 through 901, so index 902 is skipped. Correct loop: `for i in range(903):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 903, "variant": "miss_last"}, "prompt_sha1": "e71be23aba4a1ba0c1808affe234bdd4099f9809", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 4800 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×4800×10^6×4 = 76.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 4800, "channels": 4, "gbps": 76.8}, "prompt_sha1": "4cc5f04236f10162822c24e3ac35dc605c975654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.107.36.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.107.36.0\nBroadcast address: 10.107.36.63\nUsable host range: 10.107.36.1 to 10.107.36.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.107.36.0/26", "usable": 62, "first": "10.107.36.1", "last": "10.107.36.62", "broadcast": "10.107.36.63"}, "prompt_sha1": "afe606c6b29bc511be852925eb3c9bdac7fbcb2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 2050 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 2050/10000 s; frequency = 10000/2050 = 4.878049 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 2050, "hz": 4.878048780487805}, "prompt_sha1": "666600c09950cdcc544898b33815b8d0c5dff967", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_3729` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_3729 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_3729", "width": 8}, "prompt_sha1": "8f2b92d424aac8c05f926da99e217a9fe20db50a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x3D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x3D<<1)|0 = 0x7A = 01111010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 61, "rw": 0, "byte": 122}, "prompt_sha1": "8391c5fd1d1c38cd3509d264248e801b42889721", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 7, and period is 3214 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(7×3214) = 7111.743266 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 7, "period": 3214, "hz": 7111.743266068095}, "prompt_sha1": "e8f1fb83635145fd730ea39318d40ea1dee182b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/220=0.00818181818 A. P=V²/R=1.8²/220=0.0147272727 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 220, "i": 0.008181818181818182, "p": 0.014727272727272728}, "prompt_sha1": "188a1e3427748d75870ee96819df36c60a6e8c3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551563; x = x + 519;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551563+519 = 18446744073709552082. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552082) mod 2^64 = 466. So `x` stores 466. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551563, "add": 519, "result": 466}, "prompt_sha1": "fabea85c80386967804bdf4458eb19dd8160e36b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 1000 = 300. Verification: 300/1000 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 30, "high": 300}, "prompt_sha1": "12717362616c0cfb585fe35144d2ee8fb1d963fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m22973` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 22973 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m22973 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd22973;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m22973", "width": 16, "max": 22973}, "prompt_sha1": "8259b61916e551469b97d0158d7d5fb928283d01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 50000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 50000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 50000}, "prompt_sha1": "8d764233b5f3f53853bc95a501af26a7dcb6203b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 21736 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 21736/10000 s; frequency = 10000/21736 = 0.460066 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 21736, "hz": 0.46006624953993375}, "prompt_sha1": "b14ab8107d76a8f13479bde0d9a38e15ae631514", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x10, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x10<<1)|1 = 0x21 = 00100001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 16, "rw": 1, "byte": 33}, "prompt_sha1": "9c636c0b918bf56fcab1cb3cca518a5b48c41a7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2903(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2903(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2903([1, 2]) == 1.5\nassert mean_2903([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2903"}, "prompt_sha1": "1f71897a590a02351ee06a0491e49d9c005dd14c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 100 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 100/1000 = 2e+07 bits = 2.5e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 100, "bits": 20000000.0, "bytes": 2500000.0}, "prompt_sha1": "5e93539cb596c7f0184e86974993460b456b8311", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/4.7 = 0.000468085106 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 4.7, "tau": 0.00046808510638297874}, "prompt_sha1": "e4db18fe0531fb14e1a9f70d6b49e03d2d28491f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 80 MHz and must generate an exact 10000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 80000000/10000 = 8000.\nWith prescaler divisor limited to at most 32, the largest divisor of 8000 that also keeps the period count within 16 bits is 32.\nPeriod count = 8000/32 = 250.\nPSC register = 32-1 = 31.\nARR register = 250-1 = 249.\nVerification: 80000000/(32×250) = 10000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 80000000, "target_hz": 10000, "total_division": 8000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32, "period": 250, "psc_reg": 31, "arr_reg": 249}, "prompt_sha1": "6dd288ae6afe7bede759254b450f59da357d9bf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 5600 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×5600×10^6×1 = 28.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 5600, "channels": 1, "gbps": 28.0}, "prompt_sha1": "e3215aeae95af42ea9d93ef2116fe55ffabbb22f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.4 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 2.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.4-2.1 = 1.3 V.\nI = V/R = 1.3/330 A = 3.9394 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.4, "vf": 2.1, "r": 330, "current_a": 0.003939393939393939}, "prompt_sha1": "0a11ad502a4f83fbe38ae483fef4c014858bdcdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xF9E7. Extract the 4-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xF9E7 >> 2) & 0xF = 0x9 (9).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 4, "lsb": 2, "value": 63975, "mask": 15, "field": 9}, "prompt_sha1": "84e5c6ab787a92d9b0ef0ca2fbe97116795b7587", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3891` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3891 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3891"}, "prompt_sha1": "698a3fb18b2c3a09b96997e72f4c5e9925e5d57f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1001111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1001111", "ones": 5, "parity": 1}, "prompt_sha1": "405ca5b354985f506f08c746316da3c4eb40752d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.65. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.65) + 0.65/8) = 2.318841.\nThe theoretical speedup is about 2.319×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.65, "n": 8, "result": 2.318840579710145}, "prompt_sha1": "43d0e7f58f6c5c76a241b4c87c5aee3c1dc6c4d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/500 = 288000.\nWith prescaler divisor limited to at most 128, the largest divisor of 288000 that also keeps the period count within 16 bits is 128.\nPeriod count = 288000/128 = 2250.\nPSC register = 128-1 = 127.\nARR register = 2250-1 = 2249.\nVerification: 144000000/(128×2250) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 500, "total_division": 288000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 128, "period": 2250, "psc_reg": 127, "arr_reg": 2249}, "prompt_sha1": "ce762ad707eaff9e3f67c62cce5131b4826914d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=82000 ohm and C=2200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=82000×2200×10^-12 s = 0.0001804 s.\nf_c=1/(2πRC)=1/(2π×82000×2200×10^-12) = 882.2336 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 82000, "c_f": 2.2e-09, "tau": 0.0001804, "fc": 882.2336091568479}, "prompt_sha1": "77245c7bbe3bf069256c92aa97386179ae4a420d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1400 bytes, IP header 20 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-20-52 = 1328 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 20, "tcphdr": 52, "mss": 1328}, "prompt_sha1": "6f0cb2a9e4940b56a81758fac12291a6e5c66eea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w44_cin` implementing a 44-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `44-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w44_cin (\n input logic [43:0] a,\n input logic [43:0] b,\n input logic cin,\n output logic [43:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w44_cin", "width": 44, "cin": true}, "prompt_sha1": "9ae7b11b2e775ef4bcc125d975e60b80e13743e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 6 and initial occupancy is 3. In an abstract batch, producer attempts to enqueue 28 items first, dropping any excess beyond capacity; then consumer removes up to 27 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=6, dropped=25; consumed=6; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 6, "start": 3, "prod": 28, "cons": 27, "dropped": 25, "consumed": 6, "final": 0}, "prompt_sha1": "ee226aa0c41f205e91f38dfe23634c8667958ac6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w16_4096` implementing a dual-clock asynchronous FIFO with depth 16 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w16_4096 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 16,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w16_4096", "depth": 16, "width": 16, "ptr_w": 4}, "prompt_sha1": "6583953f009b16e5cae96181fdd1535a363b9ebe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.6 V source drives a 3900 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.6-2.3 = 14.3 V.\nI = V/R = 14.3/3900 A = 3.6667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.6, "vf": 2.3, "r": 3900, "current_a": 0.003666666666666667}, "prompt_sha1": "4ab636262e0e1174c68a440b0a4aacbb7c203c8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-28 = 1972 bytes.\nRound down to an 8-byte multiple: floor((1972)/8)×8 = 1968 bytes.\nFragments required = ceil(2000/1968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 28, "payload": 2000, "max_payload": 1968, "fragments": 2}, "prompt_sha1": "8526352f2e45bac585f0f5681042b1cc01ac0c4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=10 ms, C=4 ms,T=100 ms, C=5 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/10 + 4/100 + 5/25 = 0.740000 = 74.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 10], [4, 100], [5, 25]], "utilization": 0.74}, "prompt_sha1": "e30b37e62f5cf54f4435e15bd86f3286e0071239", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 20000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 20000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 20000}, "prompt_sha1": "0f999f63c1369b49b99d22b33dd50d7fed6343e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 220. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 220; T2 reads 220; both compute 221; T1 writes 221; T2 writes 221. The observed final value is 221, but two serial increments would produce 222.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "5a127df09368508cac1bd327fa992c66e820148e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 11000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 11000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 11000.0}, "prompt_sha1": "9817bf0ab5b98d0a7cc9bd06485e857fc62f6b85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-24 = 1256 bytes.\nRound down to an 8-byte multiple: floor((1256)/8)×8 = 1256 bytes.\nFragments required = ceil(5000/1256) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 24, "payload": 5000, "max_payload": 1256, "fragments": 4}, "prompt_sha1": "4be0581a21dfd540c87c4f607b500b3a06fb0d0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (2000×8) = 12500.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 2000, "pps": 12500.0}, "prompt_sha1": "ef21ab1c13fbfe652ca67bcff24d58f3ec656f8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_5` for a 5-bit unsigned input `data`, `3-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_5 (\n input logic [4:0] data,\n input logic [2:0] shamt,\n output logic [4:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_5", "width": 5, "direction": "right", "arithmetic": false}, "prompt_sha1": "c79904e3bff8ef6999e5a497aaa9a3e62774a468", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [27, 27, 20, 9, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [86, 87, 73, 40, 20].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [27, 27, 20, 9, 4], "finish": [86, 87, 73, 40, 20]}, "prompt_sha1": "5e74bf2d70b231a1dab681aff80b44f1f98a3165", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 1 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 1×8 = 8. Time = 8/115200 = 6.94444444e-05 s = 0.069444 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 6, "parity": 0, "stop": 1, "frames": 1, "seconds": 6.944444444444444e-05}, "prompt_sha1": "6ffadefd6f6fb28262026b7e9cda279dedaaf0ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 0.5/1000 = 125000 bits = 15625 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 0.5, "bits": 125000.0, "bytes": 15625.0}, "prompt_sha1": "b91aaf9d9d267109088d8df9b7723e93e0eb0930", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 3` on one shared integer without synchronization. Assume `events` initially equals 446. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 446; T2 reads 446; both compute 449; T1 writes 449; T2 writes 449. The observed final value is 449, but two serial increments would produce 452.\n\n```\nlock(mutex)\nevents = events + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "c39ff2bf644618dc061b34e0aa606ed1faf02225", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock L1 then CACHE; consumer acquires CACHE then L1. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds L1 while waiting for CACHE, while consumer holds CACHE while waiting for L1; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "94ede56ec1ed4232ffb43519f81cee9a93e719ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-24 = 1376 bytes.\nRound down to an 8-byte multiple: floor((1376)/8)×8 = 1376 bytes.\nFragments required = ceil(10000/1376) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 24, "payload": 10000, "max_payload": 1376, "fragments": 8}, "prompt_sha1": "3220aebf4b07fa134a712d5062518b16d3c808fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 8 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 8000000/(16×1000000) = 0.500000.\nNearest integer divisor D = 1.\nActual baud = 8000000/(16×1) = 500000.000 baud.\nError = (500000.000-1000000)/1000000×100% = -50.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 8000000, "oversample": 16, "baud": 1000000, "divisor": 1, "actual": 500000.0, "error_pct": -50.0}, "prompt_sha1": "8418a0e7dc243d26314d5de11a071644a50cb9d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 120 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 120 MHz / 32 = 3.750000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 120000000.0, "divider": 32, "spi_hz": 3750000.0}, "prompt_sha1": "7f91a7cd8d79852c53c237e3654b2360af9b7f2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=100 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×1/(100+1) = 0.032673 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 100, "r2": 1, "vout": 0.032673267326732675}, "prompt_sha1": "d14836f571b28f58a7dc8de17a482df6645f8497", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'P', 'V', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "P", "V", "V", "V", "V", "P", "P", "P", "P", "V", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "6debb2f9644aee3f4e802afe0d788da6a0b5c35d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_4355` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_4355 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_4355", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "7758fa52ce8f492ca4e2da9026a8c3a9588d7742", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 240 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 240 = 72. Verification: 72/240 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 240, "duty": 30, "high": 72}, "prompt_sha1": "855ecf336f3af30e1be98a56d05296bde38dc264", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8983(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8983(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8983([1, 2]) == 1.5\nassert mean_8983([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8983"}, "prompt_sha1": "08c1ba0131d637295f7173336b0a236f8339e89b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock L1 then DESC; worker_2 acquires DESC then L1. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds L1 while waiting for DESC, while worker_2 holds DESC while waiting for L1; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "ba42d31239a593bdb1af5c0c32288c295a0d6d90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_8286` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_8286 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_8286", "width": 4}, "prompt_sha1": "48415734cbf1f150233da2bb60ebc4a239872ab9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1991-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1991×8 = 15928 bits.\nSerialization delay = bits/rate = 15928/(10000×10^6) s = 1.5928e-06 s = 1.592800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1991, "rate_mbps": 10000, "delay_s": 1.5928e-06}, "prompt_sha1": "57c59180b69b9ef11e453f478dfecbb7375b9ae6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x16_no_bypass` with 64 entries of 16 bits. Inputs: `clk`, `we`, `6-bit waddr`, `16-bit wdata`, `6-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [15:0] wdata,\n input logic [5:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x16_no_bypass", "entries": 64, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "2cdaa47be3addce202985a573456178cb28477ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×150/1000/8 = 375000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 150, "bytes": 375000.0}, "prompt_sha1": "1ba32aeb2c2e6335d1a63eab22db53ecbc0c6f59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 41-bit up/down counter `updown_41_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_41_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [40:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 41'd2199023255551) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_41_sat", "width": 41, "wrap": false}, "prompt_sha1": "c5a8f33baf5a290f5d0e8501cbe71a9f0e29e2ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 400 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×400×10^6×3 = 2.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 400, "channels": 3, "gbps": 2.4}, "prompt_sha1": "2f627ee926162b01361cee48936d5649cfd576a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_4993` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_4993 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_4993", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "095792fd074af62a637e08685042020c13652680", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 3-bit up/down counter `updown_3_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_3_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [2:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_3_wrap", "width": 3, "wrap": true}, "prompt_sha1": "f858c309d0d783f058ccc79a413096f8a1aae44a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-20 = 1380 bytes.\nRound down to an 8-byte multiple: floor((1380)/8)×8 = 1376 bytes.\nFragments required = ceil(4000/1376) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 20, "payload": 4000, "max_payload": 1376, "fragments": 3}, "prompt_sha1": "adf18d4d2cdeeb1ae0e99e7f2ad0eb4249cfdc01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 400 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×400×10^6×1 = 2.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 400, "channels": 1, "gbps": 2.0}, "prompt_sha1": "a7699a0c32d56baaba047e76be963dd03bec5eb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1824B3F45A212714 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 18 24 B3 F4 5A 21 27 14.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 1739713218137368340, "endian": "big", "bytes": [24, 36, 179, 244, 90, 33, 39, 20]}, "prompt_sha1": "806e544798a637bdf9f2d9118a24fce3b3c82231", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 25 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 25 = 28.\nClock pulses = 28×9 = 252.\nTime = 252/100000 s = 2520.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 25, "clocks": 252, "time_s": 0.00252}, "prompt_sha1": "5a5db13f95f62e8e3a98ea08543e0c252a475102", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 16-way set-associative cache uses 256-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/256 = 4096.\nSets = 4096/16 = 256.\nOffset bits = log2(256) = 8; index bits = log2(256) = 8; tag bits = 36-8-8 = 20.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 256, "ways": 16, "addr_bits": 36, "lines": 4096, "sets": 256, "offset": 8, "index": 8, "tag": 20}, "prompt_sha1": "c091e246a9c3702507e4329171db2a7e81cb2627", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_5221` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_5221 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_5221", "width": 5}, "prompt_sha1": "b7d3dbe612ce8e6dff2556167f53d7f504164a99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 16 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 16×4 KiB = 64 KiB = 65536 bytes = 0.062500 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 16, "page_kib": 4, "reach": 65536}, "prompt_sha1": "ac1b0f5ba45e0c73614e4225322e05e2e5416c38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×560)/(68+560) = 60.636943 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 560, "req": 60.63694267515923}, "prompt_sha1": "92a7a3b4140b021b2b8fa6186ef2830029400717", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_14_msb` for `14-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_14_msb (\n input logic [13:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 14; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_14_msb", "width": 14, "priority": "high"}, "prompt_sha1": "931bf20b24d3fc38d8a2aebc8ebc08857813455a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/220=0.109090909 A. P=V²/R=24²/220=2.61818182 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 220, "i": 0.10909090909090909, "p": 2.618181818181818}, "prompt_sha1": "a309ad859fddad767b75795644aba828771c2859", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 42-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^42/2^10 = 2^32 = 4294967296 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 42, "page_exp": 10, "entries": 4294967296}, "prompt_sha1": "dc651a0981360892eaef10cda2e65076ed99aa22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_71_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 71 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_71_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd71;\n end else begin\n if (pulse_in)\n count <= 7'd71;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_71_retrig", "cycles": 71, "retrigger": true}, "prompt_sha1": "6485a44d291e162314c29c502e87e6721d878bc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 745 elements. Review loop `for i in range(745+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(745+1)` includes index 745, which is out of range for a length-745 sequence. Correct loop: `for i in range(745):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 745, "variant": "one_past"}, "prompt_sha1": "4d0211dcde625564ce2d9088e9ed8d6d24600cae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4770(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4770(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4770([1, 2]) == 1.5\nassert mean_4770([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4770"}, "prompt_sha1": "e5d61002ecba9ab799a0cd4c9d0bc7174e7bc82d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×3.3²=2.55915e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 3.3, "energy": 2.5591499999999997e-05}, "prompt_sha1": "431e8e68c68d3f69f3fcb3a0240d406d2cf09a62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7B, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x7B<<1)|0 = 0xF6 = 11110110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 123, "rw": 0, "byte": 246}, "prompt_sha1": "385f7ab4f230e276f8fc89016a28e2ce76bc82f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 50000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 50000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 50000.0}, "prompt_sha1": "acfa250c87c7bd0f13891b39ab30c6db040187c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 16-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/16 = 8192.\nOffset bits = log2(16) = 4.\nIndex bits = log2(8192) = 13.\nTag bits = 28-13-4 = 11.\nCheck: 11+13+4 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 16, "addr_bits": 28, "lines": 8192, "offset_bits": 4, "index_bits": 13, "tag_bits": 11}, "prompt_sha1": "b9e179ef41c3ffa927468951d61b5337f914af8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.87.119.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.87.119.0\nBroadcast address: 10.87.119.15\nUsable host range: 10.87.119.1 to 10.87.119.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.87.119.0/28", "usable": 14, "first": "10.87.119.1", "last": "10.87.119.14", "broadcast": "10.87.119.15"}, "prompt_sha1": "cea1d92cf5ebba7f8eb6492f0aadcff9159a46db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/22=0.0818181818 A. P=V²/R=1.8²/22=0.147272727 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 22, "i": 0.08181818181818182, "p": 0.14727272727272728}, "prompt_sha1": "ce0ce1ab433b305869eccc6ac5725c0d73ebdc35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x16_write_bypass` with 4 entries of 16 bits. Inputs: `clk`, `we`, `2-bit waddr`, `16-bit wdata`, `2-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [15:0] wdata,\n input logic [1:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x16_write_bypass", "entries": 4, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "d4411b21bb93a038b93d09edabb0160e09f0ab4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(10×10^6) s = 12.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 128, "time_us": 12.799999999999999}, "prompt_sha1": "b44265d5f409aece949d1e8aa599d3582529adb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 84 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 84000000/(8×1200) = 8750.000000.\nNearest integer divisor D = 8750.\nActual baud = 84000000/(8×8750) = 1200.000 baud.\nError = (1200.000-1200)/1200×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 84000000, "oversample": 8, "baud": 1200, "divisor": 8750, "actual": 1200.0, "error_pct": 0.0}, "prompt_sha1": "7b1c008a80e10a2b0e519953455bbbfd79a67f45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=47 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×22/(47+22) = 2.869565 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 47, "r2": 22, "vout": 2.869565217391304}, "prompt_sha1": "50261421d52f553df7b781322e6552b126b819d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(16×10^6) s = 16.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 256, "time_us": 16.0}, "prompt_sha1": "e7ec7df17697d05c56b61a58d04bdbe634c3a4ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w52_unsigned` comparing two 52-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w52_unsigned (\n input logic [51:0] a,\n input logic [51:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w52_unsigned", "width": 52, "signed": false}, "prompt_sha1": "8fe8917bddbb2df6ef2b2a96a84ad9a98070d093", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 48 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 48/(48+20) = 0.705882 = 70.59%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 48, "overhead": 20, "efficiency": 0.7058823529411765}, "prompt_sha1": "dd0f66f2bdd145f083bc002054313316527a1a87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/4700=0.00255319149 A. P=V²/R=12²/4700=0.0306382979 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 4700, "i": 0.002553191489361702, "p": 0.030638297872340424}, "prompt_sha1": "c0cd650c8ae8b551326e4cdb7b07b50b1cfcaebd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2605` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2605 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2605"}, "prompt_sha1": "bca0979ad2423c95daa43a71fb569e56a57fbb1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_14_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 14 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_14_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 4'd14;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_14_ignore", "cycles": 14, "retrigger": false}, "prompt_sha1": "6d34ea26a1a2c102cb99fabb9fc5f6fd7cc4119e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 54-bit left-shift register module `shiftreg_left_54`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `54-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_54 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [53:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[52:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_54", "width": 54, "direction": "left"}, "prompt_sha1": "c265ee68c943d159d8173ca4f8dca030fb2ed80f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `words` elements of type `int`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `samples[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "9ad6fbdd392f6a989dc65c4675a09a38f6f395f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 5 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 5×13 = 65. Time = 65/19200 = 0.00338541667 s = 3.385417 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 9, "parity": 1, "stop": 2, "frames": 5, "seconds": 0.0033854166666666668}, "prompt_sha1": "bcc59fa4c63291aa3db76f9dec725eebeb89c8f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m4738` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 4738 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m4738 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd4738;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m4738", "width": 13, "max": 4738}, "prompt_sha1": "a164eeb13ca4c04d4859e55816cee3b8286fb7d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 64-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/64 = 64.\nOffset bits = log2(64) = 6.\nIndex bits = log2(64) = 6.\nTag bits = 52-6-6 = 40.\nCheck: 40+6+6 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 64, "addr_bits": 52, "lines": 64, "offset_bits": 6, "index_bits": 6, "tag_bits": 40}, "prompt_sha1": "2cb2b43f0c785b37e11bd565baca1fae400fee08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 70 elements. Review loop `for i in range(70+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(70+1)` includes index 70, which is out of range for a length-70 sequence. Correct loop: `for i in range(70):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 70, "variant": "one_past"}, "prompt_sha1": "db3e016cb59fcb8282021766dceb2623bd4e8309", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=5 ms, C=4 ms,T=40 ms, C=4 ms,T=5 ms, C=4 ms,T=20 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/5 + 4/40 + 4/5 + 4/20 + 2/25 = 1.580000 = 158.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 5], [4, 40], [4, 5], [4, 20], [2, 25]], "utilization": 1.58}, "prompt_sha1": "045ff6adbc1121731e96bd74a586bc6fdcd53b0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 51 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 51 = 54.\nClock pulses = 54×9 = 486.\nTime = 486/400000 s = 1215.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 51, "clocks": 486, "time_s": 0.001215}, "prompt_sha1": "4ee1f27f2ba5fd08702f401f8d071d91add19552", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^10 V = 0.009765625 V = 9765.625000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 10.0, "step": 0.009765625}, "prompt_sha1": "3f5be0bd5d7ea48435f222150968fb4fd534eefb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 13 elements. Review loop `for i in range(13-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(13-1)` produces indices 0 through 11, so index 12 is skipped. Correct loop: `for i in range(13):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 13, "variant": "miss_last"}, "prompt_sha1": "1cf6f3e0a348c3daf7af323a1570c105ae40c27c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_63` for a 63-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_63 (\n input logic signed [62:0] data,\n input logic [5:0] shamt,\n output logic signed [62:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_63", "width": 63, "direction": "right", "arithmetic": true}, "prompt_sha1": "60666e129c3a65bcb575c38cd88eef137c98c131", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 120 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 120 MHz / 8 = 15.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 120000000.0, "divider": 8, "spi_hz": 15000000.0}, "prompt_sha1": "8845c04bcd321e1c1fa33351c212babfb3636b6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['P', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'P', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 1 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["P", "V", "V", "P", "P", "P", "V", "P", "P", "V", "P", "V", "P"], "value": 0, "blocked": 1}, "prompt_sha1": "bcba92d47fe8a6e07491ac0343e8ac007ed492fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x48_no_bypass` with 4 entries of 48 bits. Inputs: `clk`, `we`, `2-bit waddr`, `48-bit wdata`, `2-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [47:0] wdata,\n input logic [1:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x48_no_bypass", "entries": 4, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "e98c77c6437d3bb7bad72153e92a0b48fa2e90e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [19, 8, 29, 16, 17, 15]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [93, 44, 104, 86, 90, 83].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [19, 8, 29, 16, 17, 15], "finish": [93, 44, 104, 86, 90, 83]}, "prompt_sha1": "9150dbe5d8beaa5cc831dfc72554360134d6f7be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=180000 ohm and C=270000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=180000×270000×10^-12 s = 0.0486 s.\nf_c=1/(2πRC)=1/(2π×180000×270000×10^-12) = 3.2748 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 180000, "c_f": 2.7e-07, "tau": 0.048600000000000004, "fc": 3.274793067734471}, "prompt_sha1": "e56a1f0183cc156b4f5d60aebb83ef5329b74efc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 1.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+24 = 25.5. Period = 25.5/2000000 = 1.275e-05 s. Maximum rate = 1/period = 78431.372549 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 1.5, "conv_cycles": 24, "period": 1.275e-05, "rate": 78431.37254901961}, "prompt_sha1": "528dea9dcf48811bf5361824a1cad3d6592098cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_9696` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_9696 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_9696"}, "prompt_sha1": "8211a179cc34e56b3fe6def722167f99a58bf1cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 95%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.100×(12+0.050×50) = 3.450000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.9, "l2": 12, "l2_hit": 0.95, "mem": 50, "amat": 3.45}, "prompt_sha1": "248b8e8c93a3b5a690645c5ac759184139673a73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1460 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1460/(1460+20) = 0.986486 = 98.65%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1460, "overhead": 20, "efficiency": 0.9864864864864865}, "prompt_sha1": "e302f9f1f9cb9f5c38913779908a0115090b55b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 10111110111001100011000110001010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 17 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "10111110111001100011000110001010", "ones": 17, "parity": 1}, "prompt_sha1": "1096f705644c8c917d658a9a979f1815d02eab9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 1.2 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×1.2/(0.8×10^9) = 0.015 s = 15.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 1.2, "ghz": 0.8, "sec": 0.015}, "prompt_sha1": "a9ad9021fa2497ca0e4122d85ac3426bb3590566", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 48 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 48000000/800 = 60000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 60000 that also keeps the period count within 16 bits is 15000.\nPeriod count = 60000/15000 = 4.\nPSC register = 15000-1 = 14999.\nARR register = 4-1 = 3.\nVerification: 48000000/(15000×4) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 48000000, "target_hz": 800, "total_division": 60000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 15000, "period": 4, "psc_reg": 14999, "arr_reg": 3}, "prompt_sha1": "cb8ffe0392834fbf126e7246f75e5792fa4a7fc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [4, 10, 18]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [10, 23, 32].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [4, 10, 18], "finish": [10, 23, 32]}, "prompt_sha1": "db11c08053951651c1ee43f24d6b89ebacdd7c24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.92. Using Amdahl's law, compute the theoretical speedup on 256 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.92) + 0.92/256) = 11.962617.\nThe theoretical speedup is about 11.963×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.92, "n": 256, "result": 11.962616822429911}, "prompt_sha1": "6ff691426d753393922c5a50625df4a12c9add35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 120 MHz, prescaler divisor is 249, and period is 42197 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 120000000/(249×42197) = 11.420900 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 120000000, "prescaler": 249, "period": 42197, "hz": 11.420899846988494}, "prompt_sha1": "1140b2a3a58197c7085ef1d3249da539264e867a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 2` on one shared integer without synchronization. Assume `requests` initially equals 401. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 401; T2 reads 401; both compute 403; T1 writes 403; T2 writes 403. The observed final value is 403, but two serial increments would produce 405.\n\n```\nlock(mutex)\nrequests = requests + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "4b93b1176ed5432fa4c017eb0bb2614ececddd72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 9239 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 9239/1000000 s; frequency = 1000000/9239 = 108.236822 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 9239, "hz": 108.23682216690118}, "prompt_sha1": "8a44aae44b88c2014eece34bbfd2cea63de68999", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 18-bit left-shift register module `shiftreg_left_18`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `18-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_18 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [17:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[16:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_18", "width": 18, "direction": "left"}, "prompt_sha1": "69b286e1bf9abd8c3f0c80d0c9d177b2ee05260f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 38 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 38-13 = 25.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 38, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 25}, "prompt_sha1": "e1ebe7cdb9e8392a8a0283554b254127091edfa7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 36 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 36 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 36.0}, "prompt_sha1": "5e4b02b047bf044802f0d1f09eb9ec41eb768d6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 42 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 42 = 44.\nClock pulses = 44×9 = 396.\nTime = 396/1000000 s = 396.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 42, "clocks": 396, "time_s": 0.000396}, "prompt_sha1": "5c85ef0bdd99d2c60eb6060007cc0ebc1f781554", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.45. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.45) + 0.45/20) = 1.746725.\nThe theoretical speedup is about 1.747×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.45, "n": 20, "result": 1.7467248908296944}, "prompt_sha1": "ac008027117e0664694f8f47df9af70352b85241", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 0.5 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×0.5/(3.5×10^9) = 0.0142857143 s = 14.285714 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 0.5, "ghz": 3.5, "sec": 0.014285714285714285}, "prompt_sha1": "d700713135bc671929c59377b0981755b4ddcc58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=33000 ohm and C=47000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=33000×47000×10^-12 s = 0.001551 s.\nf_c=1/(2πRC)=1/(2π×33000×47000×10^-12) = 102.6144 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 33000, "c_f": 4.7e-08, "tau": 0.0015509999999999999, "fc": 102.6144056040589}, "prompt_sha1": "a38d97ec3e5a306d496bfe29499c62b18323670b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'P', 'V', 'V', 'P', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 10 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "P", "V", "V", "P", "P", "P", "V", "P", "V", "P", "V", "V", "P", "V", "V", "V", "V"], "value": 10, "blocked": 0}, "prompt_sha1": "8dc8323e170b96fccc276c71b59b585e2cd2e7dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 1, 0, 1], "final_state": 2}, "prompt_sha1": "94f1d008da2a49de4bf9aad48fe32d5bd5141815", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 559 elements. Review loop `for i in range(559+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(559+1)` includes index 559, which is out of range for a length-559 sequence. Correct loop: `for i in range(559):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 559, "variant": "one_past"}, "prompt_sha1": "f771771f822a1be994cd232ec1624cee9073846d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xEDD96769, set bit 43 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 43)`. Result = 0x800EDD96769.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3990447977, "bit": 43, "op": "set", "result": 8800083470185}, "prompt_sha1": "1f70dcd863757d8d30e381177777d14085d1ed1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 360000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 360000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 360000.0}, "prompt_sha1": "78b080e7c045202f65398e41510aaa740eab78d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 2888. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2888/4095 × 3 V = 2.115751 V.\nThus the estimated input is about 2.1158 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 2888, "volts": 2.115750915750916}, "prompt_sha1": "2ca177ba8413aaf067c707dcd21fcdd91b1e0e36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x12_write_bypass` with 128 entries of 12 bits. Inputs: `clk`, `we`, `7-bit waddr`, `12-bit wdata`, `7-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [11:0] wdata,\n input logic [6:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x12_write_bypass", "entries": 128, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "37e3f900a931ad1b9e2fea2a731b191bdb35cdcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(12×10^6) s = 21.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 256, "time_us": 21.333333333333336}, "prompt_sha1": "7ad8c6002f7f2894c0402a25100f522ebe0ac95b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_24` for a 24-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_24 (\n input logic [23:0] data,\n input logic [4:0] shamt,\n output logic [23:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_24", "width": 24, "direction": "right", "arithmetic": false}, "prompt_sha1": "9e96b9757125c4ae785af5be24314349b6a1d261", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.96. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.96) + 0.96/10) = 7.352941.\nThe theoretical speedup is about 7.353×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.96, "n": 10, "result": 7.352941176470586}, "prompt_sha1": "48d06001249def948c45da6b17ae4e8445ed24a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_3769` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_3769 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_3769", "width": 32}, "prompt_sha1": "c9046fa13f14c86c0e6cf9dadd77cd368cef1de6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 42-bit up/down counter `updown_42_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_42_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [41:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 42'd4398046511103) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_42_sat", "width": 42, "wrap": false}, "prompt_sha1": "40063999a515e6809e812478ead5f2960f3bde95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_4671` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_4671 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_4671", "width": 8}, "prompt_sha1": "3f977d3921c2103c9cbee8acaf5a9e6a268393e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 5 ns hit time, 97.3% hit rate, and a 200 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.973 = 0.027.\nAMAT = hit time + miss rate × miss penalty\n= 5 ns + 0.027×200 ns = 10.4000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 5.0, "hit_rate": 0.973, "penalty": 200, "result": 10.400000000000006}, "prompt_sha1": "f323ef4c85f51ed49a2fa89b98597e0a802db122", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_43_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 43 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_43_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd43;\n end else begin\n if (pulse_in)\n count <= 6'd43;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_43_retrig", "cycles": 43, "retrigger": true}, "prompt_sha1": "5dc99e1fecb5cfeb77e559c35713c15e6a058055", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_11` for a synchronous sampled input `noisy`. Update output `clean` only after observing 11 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_11 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 10) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_11", "stable_samples": 11}, "prompt_sha1": "ff15ca32c12e51a38536876d91b96136b4dbd343", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 200 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×200×10^6×1 = 1.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 200, "channels": 1, "gbps": 1.0}, "prompt_sha1": "c62848f899e8dc5c41c65519d5f27976324c3f6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×64 KiB = 3072 KiB = 3145728 bytes = 3.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 64, "reach": 3145728}, "prompt_sha1": "68f33cb8e9cbf947848c44613f364da94cdfefbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8294(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8294(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8294([1, 2]) == 1.5\nassert mean_8294([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8294"}, "prompt_sha1": "f624160ee0d53cf983a8f4baae7d48410ad6b57b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 40000 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 40000×10^6 × 300/1000 = 1.2e+10 bits = 1.5e+09 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 40000, "rtt_ms": 300, "bits": 12000000000.0, "bytes": 1500000000.0}, "prompt_sha1": "67e166f1e23212059d08ac921d2a560e1d4d0145", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xB71E5B924ADE in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: DE 4A 92 5B 1E B7.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 201341013215966, "endian": "little", "bytes": [222, 74, 146, 91, 30, 183]}, "prompt_sha1": "26f087fb55e175b0741ebc2a50e1a495bbb1a22f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 60-bit left-shift register module `shiftreg_left_60`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `60-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_60 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [59:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[58:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_60", "width": 60, "direction": "left"}, "prompt_sha1": "21a9b0bac4f3bc5ad4f8ec8a6dd67959b3ae2944", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 56 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 56×7 = 392. Time = 392/921600 = 0.000425347222 s = 0.425347 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 5, "parity": 0, "stop": 1, "frames": 56, "seconds": 0.0004253472222222222}, "prompt_sha1": "0226f7faae33c0d0c4d6c1905cb4fba3a7136457", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=56000 ohm and C=560000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=56000×560000×10^-12 s = 0.03136 s.\nf_c=1/(2πRC)=1/(2π×56000×560000×10^-12) = 5.0751 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 56000, "c_f": 5.6e-07, "tau": 0.03136, "fc": 5.0750938485936015}, "prompt_sha1": "f277d3408e31978b2aad7c706ba7da8a99ca52d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 2500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 65536. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/2500 = 33600.\nWith prescaler divisor limited to at most 65536, the largest divisor of 33600 that also keeps the period count within 16 bits is 33600.\nPeriod count = 33600/33600 = 1.\nPSC register = 33600-1 = 33599.\nARR register = 1-1 = 0.\nVerification: 84000000/(33600×1) = 2500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 2500, "total_division": 33600, "max_prescaler": 65536, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 33600, "period": 1, "psc_reg": 33599, "arr_reg": 0}, "prompt_sha1": "3c977c1fbe12cb584aeac1d7767a360136dcd70f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.25 ns hit time, 91.4% hit rate, and a 125 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.914 = 0.086.\nAMAT = hit time + miss rate × miss penalty\n= 4.25 ns + 0.086×125 ns = 15.0000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.25, "hit_rate": 0.914, "penalty": 125, "result": 14.999999999999996}, "prompt_sha1": "d0ad94c3119764c5c1a10ffe00e94c4852d0a43f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 9 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 42 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+1 = 11. Total bits = 42×11 = 462. Time = 462/38400 = 0.01203125 s = 12.031250 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 9, "parity": 0, "stop": 1, "frames": 42, "seconds": 0.01203125}, "prompt_sha1": "bd68597f1de7e79b8a29e735ab0bc02fe9a95d91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 2976. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2976/4095 × 3.3 V = 2.398242 V.\nThus the estimated input is about 2.3982 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 2976, "volts": 2.398241758241758}, "prompt_sha1": "8f8aae8fe3f19c044d0276287e34e67791d0b47c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.8 V source drives a 180 ohm resistor in series with an LED whose forward voltage is assumed to be 1.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.8-1.9 = 1.9 V.\nI = V/R = 1.9/180 A = 10.5556 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.8, "vf": 1.9, "r": 180, "current_a": 0.010555555555555556}, "prompt_sha1": "861609b3068487907e8d343282d264e00fc1eecf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_41` generating a one-clock-cycle `tick` every 41 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_41 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 40) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_41", "divide": 41}, "prompt_sha1": "ec4fd724b0f9d4c467bd04895750a5e611921a65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=47 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×10/(47+10) = 0.877193 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 47, "r2": 10, "vout": 0.8771929824561403}, "prompt_sha1": "0f40676a64d648d2bbdb98338fac065d873f1dda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m7` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 7 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m7 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd7;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m7", "width": 3, "max": 7}, "prompt_sha1": "94340b5075a42446285dd0ba1c29a797e29e9efe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 34-bit up/down counter `updown_34_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_34_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [33:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 34'd17179869183) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_34_sat", "width": 34, "wrap": false}, "prompt_sha1": "d54f9d1c5df5b7b840f68b907d0745742635d573", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_2190` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_2190 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_2190", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "72796aeeea330312196cabb0b4b8e9aa84248b59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8109(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8109(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8109([1, 2]) == 1.5\nassert mean_8109([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8109"}, "prompt_sha1": "328f241e739026761fea7e8868d7651a4958d997", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 1.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.5/2^17 V = 1.14440917969e-05 V = 11.444092 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 1.5, "step": 1.1444091796875e-05}, "prompt_sha1": "88757b4b7f4ebcb3ec927df282c2df0ca8fda44e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_34` for a synchronous sampled input `noisy`. Update output `clean` only after observing 34 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_34 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 33) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_34", "stable_samples": 34}, "prompt_sha1": "b4bdfc28e4f410c3a1b334906a9cf15d675f596b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(12×10^6) s = 5.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 64, "time_us": 5.333333333333334}, "prompt_sha1": "745b4ae60e54e1312eb65c01701e9ee08d2b29a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 128 and initial occupancy is 42. In an abstract batch, producer attempts to enqueue 8 items first, dropping any excess beyond capacity; then consumer removes up to 3 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=50, dropped=0; consumed=3; final occupancy=47.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 128, "start": 42, "prod": 8, "cons": 3, "dropped": 0, "consumed": 3, "final": 47}, "prompt_sha1": "776bad211be01fce409b09ea4381241087f04e64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 3` on one shared integer without synchronization. Assume `counter` initially equals 57. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 57; T2 reads 57; both compute 60; T1 writes 60; T2 writes 60. The observed final value is 60, but two serial increments would produce 63.\n\n```\nlock(mutex)\ncounter = counter + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "b0ebe85417ab763437ea752394da5ab74aee2128", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.40.195.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.40.195.0\nBroadcast address: 10.40.195.31\nUsable host range: 10.40.195.1 to 10.40.195.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.40.195.0/27", "usable": 30, "first": "10.40.195.1", "last": "10.40.195.30", "broadcast": "10.40.195.31"}, "prompt_sha1": "50636f3d078ebb4f3eda3d8e46f5a24d1784f729", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 29-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^29/2^10 = 2^19 = 524288 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 29, "page_exp": 10, "entries": 524288}, "prompt_sha1": "34f4982dc1afe8788e0cafc2b6958a56ae772009", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x3B, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x3B<<1)|1 = 0x77 = 01110111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 59, "rw": 1, "byte": 119}, "prompt_sha1": "76dcaba36cc8e662e4e9fb2b1917472de5beee13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_2076` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_2076 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_2076"}, "prompt_sha1": "b57a57dfbc22b97dbffc3dcb40716cbdb3a5398e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [21, 25, 16, 9]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [66, 71, 65, 39].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [21, 25, 16, 9], "finish": [66, 71, 65, 39]}, "prompt_sha1": "917b8344e9dc91ac31721e9560e1f6170fef546f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'P', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "P", "P", "V", "V", "P", "P", "V", "P", "P", "P", "P"], "value": 5, "blocked": 0}, "prompt_sha1": "85941669991fe05c29333d69a4e0dc0e78e7b513", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 250 counts per period. What compare/high-time count produces exactly 60% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.6 × 250 = 150. Verification: 150/250 = 0.6, which is 60%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 250, "duty": 60, "high": 150}, "prompt_sha1": "6b302fbeb240e36e644c4fe5e41ff8f29f997bc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 79.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+20 = 99.5. Period = 99.5/2000000 = 4.975e-05 s. Maximum rate = 1/period = 20100.502513 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 79.5, "conv_cycles": 20, "period": 4.975e-05, "rate": 20100.502512562813}, "prompt_sha1": "965977f96019e2bda4b8651c9b4a4c83daca2315", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 16-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/16 = 32768.\nOffset bits = log2(16) = 4.\nIndex bits = log2(32768) = 15.\nTag bits = 52-15-4 = 33.\nCheck: 33+15+4 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 16, "addr_bits": 52, "lines": 32768, "offset_bits": 4, "index_bits": 15, "tag_bits": 33}, "prompt_sha1": "fc2a6a9d791bba48d09e8fddc5152d2171b2d233", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 29 bits wide and the system uses 64 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 65536 bytes = 2^16 bytes.\nOffset bits = 16.\nVPN bits = 29-16 = 13.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 29, "page_bytes": 65536, "offset_bits": 16, "vpn_bits": 13}, "prompt_sha1": "aface2784e415c4abedd31d0f930de963e5dd394", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=3 ms,T=5 ms, C=3 ms,T=20 ms, C=3 ms,T=5 ms, C=5 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 3/5 + 3/20 + 3/5 + 5/25 = 1.675000 = 167.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [3, 5], [3, 20], [3, 5], [5, 25]], "utilization": 1.675}, "prompt_sha1": "55e0d1b531ff99aa19a346a78c60517b544c8cf5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=100 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×4.7/(100+4.7) = 0.404011 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 100, "r2": 4.7, "vout": 0.4040114613180516}, "prompt_sha1": "451c4b4a5496202d231fef8c9c70fd6d6d49085f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 11010110011111000101001101001111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 19 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11010110011111000101001101001111", "ones": 19, "parity": 1}, "prompt_sha1": "5094d6e6c4291b296c1b21aee640cc964ef81772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 95%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.060×(8+0.050×200) = 1.880000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.94, "l2": 8, "l2_hit": 0.95, "mem": 200, "amat": 1.8800000000000014}, "prompt_sha1": "29a37cf4a8de5a86c6063255f7298f9eb08665a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x40, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x40<<1)|1 = 0x81 = 10000001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 64, "rw": 1, "byte": 129}, "prompt_sha1": "21bd202801820b8622ef6e45cfc7ea8ed4efb316", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_3886` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_3886 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_3886", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "5b29a1c88474f6590f907895a133a8c1cbb861d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_16_lsb` for `16-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_16_lsb (\n input logic [15:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 15; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_16_lsb", "width": 16, "priority": "low"}, "prompt_sha1": "33baec722b2e175f1efd7bd5298b892590f29dae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 18-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^18 V = 1.90734863281e-05 V = 19.073486 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 18, "vref": 5.0, "step": 1.9073486328125e-05}, "prompt_sha1": "944b4269034c4ac0b1585fe1f081377f297f5b5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `samples` elements of type `double`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n total += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `buf[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n total += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "20afab077ea64d315d7ca57dad3245f72ca2efad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_24` for a 24-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_24 (\n input logic signed [23:0] data,\n input logic [4:0] shamt,\n output logic signed [23:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_24", "width": 24, "direction": "right", "arithmetic": true}, "prompt_sha1": "70011e4c5a9f97bc9e9f10a4f510838ce5eb9826", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-32 = 1468 bytes.\nRound down to an 8-byte multiple: floor((1468)/8)×8 = 1464 bytes.\nFragments required = ceil(8000/1464) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 32, "payload": 8000, "max_payload": 1464, "fragments": 6}, "prompt_sha1": "8ebc3ab90e47f0655660cf1494bdc20c5fdeca84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 25-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^25/2^15 = 2^10 = 1024 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 25, "page_exp": 15, "entries": 1024}, "prompt_sha1": "1444f4aafe9728046b44bc6fe53396ef36fad4a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6701` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6701 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6701"}, "prompt_sha1": "6a21300acee52a6d32b527d36da6b0777c6d8a50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock BUF then DESC; task_B acquires DESC then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds BUF while waiting for DESC, while task_B holds DESC while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2500acd7ffd775152d830f5ce79690b68cc4d655", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/4700=0.000531914894 A. P=V²/R=2.5²/4700=0.00132978723 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 4700, "i": 0.0005319148936170213, "p": 0.0013297872340425532}, "prompt_sha1": "edb49eb05e447abadc80dc6f487a210defeb152e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_217` generating a one-clock-cycle `tick` every 217 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_217 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 216) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_217", "divide": 217}, "prompt_sha1": "0fce73bc185ee8da1e090f281ce9ca35839cf224", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 16-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/16 = 1024.\nOffset bits = log2(16) = 4.\nIndex bits = log2(1024) = 10.\nTag bits = 36-10-4 = 22.\nCheck: 22+10+4 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 16, "addr_bits": 36, "lines": 1024, "offset_bits": 4, "index_bits": 10, "tag_bits": 22}, "prompt_sha1": "04c5e89ea5f22a0d9864f677429ff4cbbafb2870", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_28_msb` for `28-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_28_msb (\n input logic [27:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 28; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_28_msb", "width": 28, "priority": "high"}, "prompt_sha1": "41486e64bd0dc591ae64e7e4e70934db622141ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3238872060, carries 31836 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 31836+0+0 = 31836. ACK = (3238872060+31836) mod 2^32 = 3238903896.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3238872060, "payload": 31836, "syn": 0, "fin": 0, "ack": 3238903896}, "prompt_sha1": "43d230e074ed54e747fbfebe95e27e27e9316c3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.62. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.62) + 0.62/6) = 2.068966.\nThe theoretical speedup is about 2.069×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.62, "n": 6, "result": 2.0689655172413794}, "prompt_sha1": "73199b3241aa7f658aadc89be200d42e4a7978e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10001100011010010100 using generator polynomial bits 1001011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 110011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 75, "msg_bits": 20, "msg": 575124, "remainder": 51}, "prompt_sha1": "3f9c0f08c0e7434c4b9ee10f0e02539ffeb349c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 43784. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 43784/65535 × 5 V = 3.340505 V.\nThus the estimated input is about 3.3405 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 43784, "volts": 3.3405050736247803}, "prompt_sha1": "9f56b1406a21c7e1b0d0f92e86df7493bcb4c932", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.212.119.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.212.119.0\nBroadcast address: 10.212.119.15\nUsable host range: 10.212.119.1 to 10.212.119.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.212.119.0/28", "usable": 14, "first": "10.212.119.1", "last": "10.212.119.14", "broadcast": "10.212.119.15"}, "prompt_sha1": "cb0586b163314034327269caddf3a54d79bae150", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 216; x = x + 359;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 216+359 = 575. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (575) mod 2^8 = 63. So `x` stores 63. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 216, "add": 359, "result": 63}, "prompt_sha1": "e1a259cb223ab8c4f75bacacd9215332d3911c40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.5.27.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.5.27.0\nBroadcast address: 10.5.27.255\nUsable host range: 10.5.27.1 to 10.5.27.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.5.27.0/24", "usable": 254, "first": "10.5.27.1", "last": "10.5.27.254", "broadcast": "10.5.27.255"}, "prompt_sha1": "f5c7230284615334f2551f845feffc8878cbd1ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x5D. Extract the 5-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x5D >> 2) & 0x1F = 0x17 (23).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 2, "value": 93, "mask": 31, "field": 23}, "prompt_sha1": "3453230def5afcc3205540927d8ec7d2672cfd6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.5 ns hit time, 97.1% hit rate, and a 30 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.971 = 0.029.\nAMAT = hit time + miss rate × miss penalty\n= 0.5 ns + 0.029×30 ns = 1.3700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.5, "hit_rate": 0.971, "penalty": 30, "result": 1.3700000000000008}, "prompt_sha1": "c16ceca4df0c352279ebf5ac27c13dcba2de948b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 115; x = x + 501;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 115+501 = 616. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (616) mod 2^8 = 104. So `x` stores 104. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 115, "add": 501, "result": 104}, "prompt_sha1": "4a0b20ef8e17794dfdcc5adbc3b2c504eb3f9350", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 16 = 1.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 16, "spi_hz": 1000000.0}, "prompt_sha1": "eeb66776024f3bad168f00ae710efed8933150f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 12.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+14 = 26.5. Period = 26.5/40000000 = 6.625e-07 s. Maximum rate = 1/period = 1509433.962264 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 12.5, "conv_cycles": 14, "period": 6.625e-07, "rate": 1509433.9622641508}, "prompt_sha1": "6f824e263ebc697b1c6a513fb52277db1b8ba3ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=10 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×1/(10+1) = 2.181818 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 10, "r2": 1, "vout": 2.1818181818181817}, "prompt_sha1": "fa268c6fe364edbde82241f611cb00638c2d7bec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 4` on one shared integer without synchronization. Assume `jobs` initially equals 443. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 443; T2 reads 443; both compute 447; T1 writes 447; T2 writes 447. The observed final value is 447, but two serial increments would produce 451.\n\n```\nlock(mutex)\njobs = jobs + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "e55ff35263d0ae02df7520726d68a01de45dc27f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xCDD3325E, toggle bit 37 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 37)`. Result = 0x20CDD3325E.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3453170270, "bit": 37, "op": "toggle", "result": 140892123742}, "prompt_sha1": "b63d2324b130566f3af207dd3b4e08dd7efed34e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=22 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×100/(22+100) = 19.672131 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 22, "r2": 100, "vout": 19.672131147540984}, "prompt_sha1": "2564bde4877df5a677f4f4f263f8dd2cb5258663", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×200/1000/8 = 250000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 200, "bytes": 250000000.0}, "prompt_sha1": "bc7945ab9cd41eb5a341b0afd2007643450927c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=20 ms, C=1 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/20 + 1/5 = 0.250000 = 25.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 20], [1, 5]], "utilization": 0.25}, "prompt_sha1": "2abb5c53385e7cf36e4e14b0c816f275a6291af1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^17 V = 1.5625e-05 V = 15.625000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 2.048, "step": 1.5625e-05}, "prompt_sha1": "1c0883a921798fe5b39d4ba4a64ae8e665967d45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.4 V source drives a 3300 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.4-2.2 = 6.2 V.\nI = V/R = 6.2/3300 A = 1.8788 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.4, "vf": 2.2, "r": 3300, "current_a": 0.0018787878787878789}, "prompt_sha1": "e99b3531cec39896cdf2c04bd357af39dda3655e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (1024×8) = 61035.156250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 1024, "pps": 61035.15625}, "prompt_sha1": "7a8949b98945bb54ce952a2cc1d835d38c0ae002", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_7985` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_7985 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_7985", "width": 24}, "prompt_sha1": "07a6f276b5bb40fbe709495e83e42179466fb135", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_60` for a 60-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_60 (\n input logic [59:0] data,\n input logic [5:0] shamt,\n output logic [59:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_60", "width": 60, "direction": "left", "arithmetic": false}, "prompt_sha1": "26a4761b2f69d70eaf52d225e685e718e7343f85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/22 = 0.00213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 22, "tau": 0.0021363636363636363}, "prompt_sha1": "191d7eb71b942ee7db0c07b90ee18ef88d7c03fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 27 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×27)/(68+27) = 19.326316 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 27, "req": 19.326315789473682}, "prompt_sha1": "69ef33d452e491c5454a9abd99149b416d789ea7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 13.9 V source drives a 470 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 13.9-2.6 = 11.3 V.\nI = V/R = 11.3/470 A = 24.0426 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 13.9, "vf": 2.6, "r": 470, "current_a": 0.024042553191489364}, "prompt_sha1": "2818f5d9dbfa4d1c395a13a98189412694791411", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_63` generating a one-clock-cycle `tick` every 63 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_63 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 62) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_63", "divide": 63}, "prompt_sha1": "d14afaf9e89cf0cca6d14b4f41c3f57a89e0f46b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 41 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 41 = 44.\nClock pulses = 44×9 = 396.\nTime = 396/400000 s = 990.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 41, "clocks": 396, "time_s": 0.00099}, "prompt_sha1": "bb84bcbff186979e77ac091480582966611c70be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_41_lsb` for `41-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_41_lsb (\n input logic [40:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 40; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_41_lsb", "width": 41, "priority": "low"}, "prompt_sha1": "f5d9f2c9ab88bda4681103e53ae1c935aa6df84f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=4.7 nF and is stepped to 5 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=5(1-e^-4)=4.908422 V; τ=1.034e-05 s and t=4.136e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 4.700000000000001e-09, "multiple": 4, "vin": 5, "vc": 4.908421805556329}, "prompt_sha1": "4ac772b85fe4ec9d036e87273f84ffe67e8b1080", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 20%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.200 × 4 = 0.040000.\nEffective CPI = 1.1 + 0.040000 = 1.140000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.2, "penalty": 4, "result": 1.1400000000000001}, "prompt_sha1": "66199241f64471f60e0867a0779164c3bec8292b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 90%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.010×(15+0.100×150) = 2.300000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.99, "l2": 15, "l2_hit": 0.9, "mem": 150, "amat": 2.3000000000000003}, "prompt_sha1": "37986eca1a233961405b2c95d716a7b4269b415a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 150/1000 = 3e+08 bits = 3.75e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 150, "bits": 300000000.0, "bytes": 37500000.0}, "prompt_sha1": "149d4aab52d6b1e4510c53c2acc6c03310ff9dc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x87. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x87 >> 3) & 0xF = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 3, "value": 135, "mask": 15, "field": 0}, "prompt_sha1": "0684f03ffc7cb6a585359a013c14646171577731", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 256 = 0.140625 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 256, "spi_hz": 140625.0}, "prompt_sha1": "e590f83e2598182eaeaf39e84f437d3e388777c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 125 Hz satisfies it.", "output": "Nyquist minimum is 2×50 = 100 Hz. Proposed rate 125 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50, "min_fs": 100, "proposed": 125.0}, "prompt_sha1": "be4d35c0ef4c4f7b3d4519a4a87f4199a304dda9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(8×460800) = 39.062500.\nNearest integer divisor D = 39.\nActual baud = 144000000/(8×39) = 461538.462 baud.\nError = (461538.462-460800)/460800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 8, "baud": 460800, "divisor": 39, "actual": 461538.46153846156, "error_pct": 0.1602564102564151}, "prompt_sha1": "feb2535ebd9a6e95e9126d614299a6c7e4eb8757", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 60 and initial occupancy is 3. In an abstract batch, producer attempts to enqueue 136 items first, dropping any excess beyond capacity; then consumer removes up to 88 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=60, dropped=79; consumed=60; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 60, "start": 3, "prod": 136, "cons": 88, "dropped": 79, "consumed": 60, "final": 0}, "prompt_sha1": "002e64eb18063d288d14d465cf78108510685919", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2700 ohm and C=270000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2700×270000×10^-12 s = 0.000729 s.\nf_c=1/(2πRC)=1/(2π×2700×270000×10^-12) = 218.3195 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2700, "c_f": 2.7e-07, "tau": 0.000729, "fc": 218.31953784896479}, "prompt_sha1": "9ce28314669b686386df98a97aaa02ad98ecbc02", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=2 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 2/200 = 0.210000 = 21.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [2, 200]], "utilization": 0.21000000000000002}, "prompt_sha1": "fddcca7d15f0d15054c0b6014055aead268549e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w16_3446` implementing a dual-clock asynchronous FIFO with depth 64 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w16_3446 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 16,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w16_3446", "depth": 64, "width": 16, "ptr_w": 6}, "prompt_sha1": "dea0a1f3975f7a9e18a4722b6f1135f27a1cf8f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 2` on one shared integer without synchronization. Assume `counter` initially equals 371. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 371; T2 reads 371; both compute 373; T1 writes 373; T2 writes 373. The observed final value is 373, but two serial increments would produce 375.\n\n```\nlock(mutex)\ncounter = counter + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "d0091fc6a4a7096bf783bad7366aa9822d3a1e00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=5 ms, C=3 ms,T=20 ms, C=3 ms,T=5 ms, C=2 ms,T=25 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/5 + 3/20 + 3/5 + 2/25 + 2/25 = 1.710000 = 171.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 5], [3, 20], [3, 5], [2, 25], [2, 25]], "utilization": 1.71}, "prompt_sha1": "e5eaab06bcb79bea9cb29cffd695cb02f66e6d49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.198.225.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.198.225.0\nBroadcast address: 10.198.225.127\nUsable host range: 10.198.225.1 to 10.198.225.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.198.225.0/25", "usable": 126, "first": "10.198.225.1", "last": "10.198.225.126", "broadcast": "10.198.225.127"}, "prompt_sha1": "64fe439b793c295ff7be98d3b724cc1c447fb781", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1×10^6 / (64×8) = 1953.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "frame_bytes": 64, "pps": 1953.125}, "prompt_sha1": "9bb339f29b5785d458735263ac75b84d1b9ea349", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2200-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2200×8 = 17600 bits.\nSerialization delay = bits/rate = 17600/(1000×10^6) s = 1.76e-05 s = 17.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2200, "rate_mbps": 1000, "delay_s": 1.76e-05}, "prompt_sha1": "1e2594247bcd624b7779566243507a641b422ced", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x8CBA252, toggle bit 39 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 39)`. Result = 0x8008CBA252.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 147563090, "bit": 39, "op": "toggle", "result": 549903376978}, "prompt_sha1": "e1c396b473665f246487e2d919b3b86b4aabe98f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 20/1000 = 4e+06 bits = 500000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 20, "bits": 4000000.0, "bytes": 500000.0}, "prompt_sha1": "1aecb3e94a76f25f9af8984d5bbed38e1ea56ef5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x5236F3C1. Extract the 6-bit field starting at bit 12 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x5236F3C1 >> 12) & 0x3F = 0x2F (47).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 12, "value": 1379333057, "mask": 63, "field": 47}, "prompt_sha1": "29921abce5c16aa361c2ba69ce2f451c9a081d90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x48_no_bypass` with 64 entries of 48 bits. Inputs: `clk`, `we`, `6-bit waddr`, `48-bit wdata`, `6-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [47:0] wdata,\n input logic [5:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x48_no_bypass", "entries": 64, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "cb6260c154d1fcd5e288265482e98a2b3ae1cdba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 18-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^18 V = 3.81469726562e-05 V = 38.146973 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 18, "vref": 10.0, "step": 3.814697265625e-05}, "prompt_sha1": "5c77ec4125ffbb85d35e24351d40acb92b077b2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_303567` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_303567 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_303567"}, "prompt_sha1": "ed5fccb88907f947746fa9091b2093ea457b1349", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock C then DMA; task_B acquires DMA then C. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds C while waiting for DMA, while task_B holds DMA while waiting for C; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before DMA. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "16f15403a0db8395f0bba742c0bf0bf519b0bcd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_40_msb` for `40-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_40_msb (\n input logic [39:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 40; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_40_msb", "width": 40, "priority": "high"}, "prompt_sha1": "a363e8a01c803e653e2918dfb93c8d87977af742", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7142` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7142 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7142"}, "prompt_sha1": "df60df69cd2a4397ba148c4f0f4421e2ddaab0c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_7444` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_7444 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_7444"}, "prompt_sha1": "dff7ac7665f73570ae22b376a1c68d99041964e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.224.101.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.224.101.0\nBroadcast address: 10.224.101.63\nUsable host range: 10.224.101.1 to 10.224.101.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.224.101.0/26", "usable": 62, "first": "10.224.101.1", "last": "10.224.101.62", "broadcast": "10.224.101.63"}, "prompt_sha1": "c0791ba4744ceb6319c00e55142fa60c3593e78f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×24²=0.013536 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 24, "energy": 0.013536}, "prompt_sha1": "4d666500bb843f60b5bda9074e1fb1413f101cb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=22 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/4.7 = -4.680851.\nVout = A_v×Vin = -4.680851×0.5 = -2.340426 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 22, "vin": 0.5, "gain": -4.680851063829787, "vout": -2.3404255319148937}, "prompt_sha1": "36845f541390fafb97db471eb91a64e21f81d23b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_21_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 21 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_21_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd21;\n end else begin\n if (pulse_in)\n count <= 5'd21;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_21_retrig", "cycles": 21, "retrigger": true}, "prompt_sha1": "596f57eecfc7d0ba1feadd11525b34b6eb35eb3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.25 ns hit time, 94.8% hit rate, and a 80 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.948 = 0.052.\nAMAT = hit time + miss rate × miss penalty\n= 1.25 ns + 0.052×80 ns = 5.4100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.25, "hit_rate": 0.948, "penalty": 80, "result": 5.410000000000004}, "prompt_sha1": "fba5f552073cfa7bf72ebb23cf9ba49b70425f23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10010011000110111100 using generator polynomial bits 111000111. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11101101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 455, "msg_bits": 20, "msg": 602556, "remainder": 237}, "prompt_sha1": "15c497a8bf3a682598c621d2b28f12f942f7d7bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=1 nF and is stepped to 1 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1(1-e^-4)=0.981684 V; τ=2.2e-07 s and t=8.8e-07 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 1e-09, "multiple": 4, "vin": 1, "vc": 0.9816843611112658}, "prompt_sha1": "7d97a7463e43c3bd224120d8fb9b51e47f287da3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 153 elements. Review loop `for i in range(153-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(153-1)` produces indices 0 through 151, so index 152 is skipped. Correct loop: `for i in range(153):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 153, "variant": "miss_last"}, "prompt_sha1": "53c314b5d22e247ed3ccc17d3535ae83cf7bee11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×2.5²=0.0003125 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 2.5, "energy": 0.0003125}, "prompt_sha1": "b7497d17f11a0ee4198994de376572365486a996", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×1²=0.0011 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 1, "energy": 0.0010999999999999998}, "prompt_sha1": "7c4dd013bcd58b271d551d6c2def6c40e803e9a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 160 payload bytes plus 10 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 160/(160+10) = 0.941176 = 94.12%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 160, "overhead": 10, "efficiency": 0.9411764705882353}, "prompt_sha1": "63c8302663af886d79196abd3a371a14e328e157", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [30, 23, 22]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [75, 68, 70].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [30, 23, 22], "finish": [75, 68, 70]}, "prompt_sha1": "e78d3eecec6eb170a24ee38b1ba90ea19badfdf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 822 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×822/(240×10^6) = 3.425e-05 = 0.003425%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 10, "cycles": 822, "load": 3.425e-05}, "prompt_sha1": "2d2b26f46efa0df81c1e62a5046a226ec7d57f4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/32 = 8192.\nOffset bits = log2(32) = 5.\nIndex bits = log2(8192) = 13.\nTag bits = 52-13-5 = 34.\nCheck: 34+13+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 32, "addr_bits": 52, "lines": 8192, "offset_bits": 5, "index_bits": 13, "tag_bits": 34}, "prompt_sha1": "a048d02133f00d5516de0f7a4c8cf930abeb2c15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/47000=7.0212766e-05 A. P=V²/R=3.3²/47000=0.000231702128 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 47000, "i": 7.02127659574468e-05, "p": 0.00023170212765957445}, "prompt_sha1": "c09181f48f8c7ec07f5a7f7de5eeacfda13ef2af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/32 = 2048.\nOffset bits = log2(32) = 5.\nIndex bits = log2(2048) = 11.\nTag bits = 52-11-5 = 36.\nCheck: 36+11+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 32, "addr_bits": 52, "lines": 2048, "offset_bits": 5, "index_bits": 11, "tag_bits": 36}, "prompt_sha1": "89513a0c84ae1f15459cb44f08db07d94c6c58d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 000000110100001111000000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 7 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "000000110100001111000000", "ones": 7, "parity": 1}, "prompt_sha1": "9b647c04a1efaf059d085fe533ade085632ee6fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 12000 counts per period. What compare/high-time count produces exactly 80% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.8 × 12000 = 9600. Verification: 9600/12000 = 0.8, which is 80%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 12000, "duty": 80, "high": 9600}, "prompt_sha1": "6c4e3f10586f72b5149d6d16b618c748a6c5aa04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_122` generating a one-clock-cycle `tick` every 122 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_122 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 121) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_122", "divide": 122}, "prompt_sha1": "f06d9b4bd0b77350ab0df62ca22d3e1551237f47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 914. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 914/1023 × 3 V = 2.680352 V.\nThus the estimated input is about 2.6804 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 914, "volts": 2.6803519061583576}, "prompt_sha1": "f9714e9c41c8dd129bab8a18b3fcb5f48bbd6802", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_54_lsb` for `54-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_54_lsb (\n input logic [53:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 53; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_54_lsb", "width": 54, "priority": "low"}, "prompt_sha1": "69ef7e2f75f42c32cf7030a33c8ee67612a8e586", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 30-bit virtual address space with 2048 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^30/2^11 = 2^19 = 524288 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 30, "page_exp": 11, "entries": 524288}, "prompt_sha1": "993996e387635cddcf96aa70d5defc73a13ea52a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 384 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 384/(384+28) = 0.932039 = 93.20%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 384, "overhead": 28, "efficiency": 0.9320388349514563}, "prompt_sha1": "03f4a0386926fcd908f3eb5fab4406becb52a589", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 718 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 718/10000000 s; frequency = 10000000/718 = 13927.576602 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 718, "hz": 13927.57660167131}, "prompt_sha1": "a929a41ae539662b1e2b3147b6fc873e7dd7eefa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967265; x = x + 412;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967265+412 = 4294967677. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967677) mod 2^32 = 381. So `x` stores 381. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967265, "add": 412, "result": 381}, "prompt_sha1": "3dad6f936eb311c09d6cad7142e880da9f45ab34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=2.2 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/4.7 = -0.468085.\nVout = A_v×Vin = -0.468085×0.1 = -0.046809 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 2.2, "vin": 0.1, "gain": -0.46808510638297873, "vout": -0.04680851063829788}, "prompt_sha1": "c5eb530d78e92f9f78416f995debe4745b5b7c23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/47 = 0.00212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 47, "tau": 0.002127659574468085}, "prompt_sha1": "2ef8326a351d2cb91786ba4bfa87fefbc41466ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_2210` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_2210 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_2210", "width": 12}, "prompt_sha1": "8385a664c8b65383bc3ad49711c4085e7489f207", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 1, 0, 0, 1], "final_state": 1}, "prompt_sha1": "b4174b0900c11b8a46d75a209a79c1646afb55cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_6860` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_6860 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_6860"}, "prompt_sha1": "3f99da9e099c0972d31c58f85ebba27f314aa850", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 63-bit right-shift register module `shiftreg_right_63`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `63-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_63 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [62:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[62:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_63", "width": 63, "direction": "right"}, "prompt_sha1": "78168d07a30eb2486f61226d31d1bbf5116f4148", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w16_9136` implementing a dual-clock asynchronous FIFO with depth 128 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w16_9136 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 16,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w16_9136", "depth": 128, "width": 16, "ptr_w": 7}, "prompt_sha1": "40a9afbee1eedc74bf7171a446363490754ca74e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 39-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^39/2^16 = 2^23 = 8388608 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 39, "page_exp": 16, "entries": 8388608}, "prompt_sha1": "7f16ae24bc35c9635aeab80991c19e96aa750686", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 29 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 29 = 31.\nClock pulses = 31×9 = 279.\nTime = 279/1000000 s = 279.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 29, "clocks": 279, "time_s": 0.000279}, "prompt_sha1": "2ec2b316eab79147bffb93407d95db6dc86208b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=22 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×4.7/(22+4.7) = 0.580899 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 22, "r2": 4.7, "vout": 0.5808988764044943}, "prompt_sha1": "6b405eef7db94c454895dedfd8f6f7c91be04dfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 98.4% hit rate, and a 75 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.984 = 0.016.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.016×75 ns = 2.9500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.984, "penalty": 75, "result": 2.950000000000001}, "prompt_sha1": "8c75af0f60f45a27bb2a60177df3f7281d2cc7d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 20%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.200 × 12 = 0.600000.\nEffective CPI = 1.2 + 0.600000 = 1.800000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.2, "penalty": 12, "result": 1.8}, "prompt_sha1": "51fc1009eecbaab354a6ad9114955be3b2ff2643", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_860342` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_860342 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_860342"}, "prompt_sha1": "5a06d13274d7ac02130a5a4cc30ced651e5e078c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m202` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 202 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m202 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd202;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m202", "width": 8, "max": 202}, "prompt_sha1": "85b173983e47c7c40ade1a0c9fa38b54fa52c4f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551580; x = x + 337;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551580+337 = 18446744073709551917. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551917) mod 2^64 = 301. So `x` stores 301. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551580, "add": 337, "result": 301}, "prompt_sha1": "e7443636925ce7ed9deb1f0b8c676e947cf2c536", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.7 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 2.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.7-2.4 = 14.3 V.\nI = V/R = 14.3/5600 A = 2.5536 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.7, "vf": 2.4, "r": 5600, "current_a": 0.0025535714285714285}, "prompt_sha1": "86d869c69ac850726cf1ae11a5be1f1537edabed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=390000 ohm and C=82000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=390000×82000×10^-12 s = 0.03198 s.\nf_c=1/(2πRC)=1/(2π×390000×82000×10^-12) = 4.9767 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 390000, "c_f": 8.199999999999999e-08, "tau": 0.031979999999999995, "fc": 4.9767024106283735}, "prompt_sha1": "7b80642954b91eb9765b3a2a96de7b6e9177a94d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 52154. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 52154/65535 × 3.3 V = 2.626203 V.\nThus the estimated input is about 2.6262 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 52154, "volts": 2.6262027924010067}, "prompt_sha1": "e94604f2b644c0d77c038b3798d2d620e263bca0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50000 Mbit/s and RTT 0.1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50000×10^6 × 0.1/1000 = 5e+06 bits = 625000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50000, "rtt_ms": 0.1, "bits": 5000000.0, "bytes": 625000.0}, "prompt_sha1": "e9339b3113c9a14cd15b0790af5d96ef4db1cb87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5911` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5911 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5911"}, "prompt_sha1": "a7f25915c8beedab2d92767fc142ce4603e3f25a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/100000=1.8e-05 A. P=V²/R=1.8²/100000=3.24e-05 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 100000, "i": 1.8e-05, "p": 3.24e-05}, "prompt_sha1": "56d7010508333ee10fec15c2398b29dc69bc1c47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock BUS then B; consumer acquires B then BUS. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds BUS while waiting for B, while consumer holds B while waiting for BUS; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before BUS. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "b61cfc7ddf818e9430f758aa34086d408962c4c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 256-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/256 = 32.\nOffset bits = log2(256) = 8.\nIndex bits = log2(32) = 5.\nTag bits = 48-5-8 = 35.\nCheck: 35+5+8 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 256, "addr_bits": 48, "lines": 32, "offset_bits": 8, "index_bits": 5, "tag_bits": 35}, "prompt_sha1": "418ea14dff9bb931e6909c764ff0a61c812aaf55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w31_signed` comparing two 31-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w31_signed (\n input logic signed [30:0] a,\n input logic signed [30:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w31_signed", "width": 31, "signed": true}, "prompt_sha1": "d4e6fdc842d9d08e0e08f6634f6b59a8dd061f32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+20) = 0.985915 = 98.59%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 20, "efficiency": 0.9859154929577465}, "prompt_sha1": "6fc6df0f7a50850cf63eab6c1224e577407b1bf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x4B, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x4B<<1)|1 = 0x97 = 10010111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 75, "rw": 1, "byte": 151}, "prompt_sha1": "4225a5de29699306c3cf516fc3cb9071e646a3e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 845, and period is 2319 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(845×2319) = 4.082560 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 845, "period": 2319, "hz": 4.082559560716591}, "prompt_sha1": "7499d2a75fea9b23084f1d61582172d76e2841f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_111` for a synchronous sampled input `noisy`. Update output `clean` only after observing 111 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_111 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 110) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_111", "stable_samples": 111}, "prompt_sha1": "0f87430785b214e65066bdfd834e55f873bd779d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['P', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'P', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["P", "V", "V", "V", "P", "V", "P", "P", "V", "V", "V", "P", "P", "P", "V", "V"], "value": 5, "blocked": 0}, "prompt_sha1": "4098d71b2cc684fc61e3995964a0fac1dcfcb6c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_86` for a synchronous sampled input `noisy`. Update output `clean` only after observing 86 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_86 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 85) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_86", "stable_samples": 86}, "prompt_sha1": "c958ac786534b14dff49aa5d0f78bc07cd2e1d69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65409; x = x + 599;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65409+599 = 66008. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (66008) mod 2^16 = 472. So `x` stores 472. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65409, "add": 599, "result": 472}, "prompt_sha1": "cb7053ef0057bea5fe31fc2816264af6ad716532", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×100²=5 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 100, "energy": 5.0}, "prompt_sha1": "ce03501706d051a7e5f0c9a1a738b14bd10568c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_63` for a 63-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_63 (\n input logic [62:0] data,\n input logic [5:0] shamt,\n output logic [62:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_63", "width": 63, "direction": "left", "arithmetic": false}, "prompt_sha1": "e2d16f49e054cd920cdee558fd9428274cbbe275", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 79.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+24 = 103.5. Period = 103.5/20000000 = 5.175e-06 s. Maximum rate = 1/period = 193236.714976 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 79.5, "conv_cycles": 24, "period": 5.175e-06, "rate": 193236.71497584542}, "prompt_sha1": "8e11687dfc0fc8a346e3f9b466fa538debb2e5e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5450(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5450(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5450([1, 2]) == 1.5\nassert mean_5450([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5450"}, "prompt_sha1": "b51e4f82cb7cdc174eac46bdf7df0df6918a691c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=10 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/1 = -10.000000.\nVout = A_v×Vin = -10.000000×0.1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 10, "vin": 0.1, "gain": -10.0, "vout": -1.0}, "prompt_sha1": "3e38f12c7da2f074bec9f81be260518748598433", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=2.2 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/1 = -2.200000.\nVout = A_v×Vin = -2.200000×0.05 = -0.110000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 2.2, "vin": 0.05, "gain": -2.2, "vout": -0.11000000000000001}, "prompt_sha1": "327df8d6225c76872fde2b6de7318240528b8f24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "V", "P", "V", "P", "V", "P", "V", "V", "V", "P", "P", "P", "V", "V", "P", "V", "V"], "value": 7, "blocked": 0}, "prompt_sha1": "d5b8635ab858730f9f23aaa5f96f25fe1c6fe31e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_7_24_2` with RED, GREEN, YELLOW states. Hold RED for 7 clock cycles, GREEN for 24, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_7_24_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 6) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 23) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_7_24_2", "red": 7, "green": 24, "yellow": 2}, "prompt_sha1": "4d679be2dd2aa3b301c188699347006268e79271", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 1 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×8×10^6 = 8000000 B/s. Time = 16384/8000000 = 0.002048 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 1, "rate_mhz": 8, "sec": 0.002048}, "prompt_sha1": "ad9896f584e958df4714c54de9d6d5cf0d81af5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_9390` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_9390 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_9390", "width": 4}, "prompt_sha1": "a62c9bd8ff21c9d25f665c742cdbec9981550a09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/470=0.0191489362 A. P=V²/R=9²/470=0.172340426 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 470, "i": 0.019148936170212766, "p": 0.1723404255319149}, "prompt_sha1": "15d0374a16c5610b5f05c0e9af43c4c861e589e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNTNNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 1, 0, 0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "ff644207ae3f9cb40fd8e5f32e8801dcf23fa5eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w8_6247` implementing a dual-clock asynchronous FIFO with depth 32 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w8_6247 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 8,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w8_6247", "depth": 32, "width": 8, "ptr_w": 5}, "prompt_sha1": "c310860daa967221f02206952467c2030b670d01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4697 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4697/(4697+40+8) = 0.989884 = 98.99%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4697, "iphdr": 40, "eff": 0.9898840885142255}, "prompt_sha1": "daa89a4d198976ac1ac3f0e98b449cddac9331af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 90. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 90; T2 reads 90; both compute 91; T1 writes 91; T2 writes 91. The observed final value is 91, but two serial increments would produce 92.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "60f4ab8c849c6466bed9a59da6d15052d7cad525", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_57` for a synchronous sampled input `noisy`. Update output `clean` only after observing 57 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_57 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 56) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_57", "stable_samples": 57}, "prompt_sha1": "f9c5ffab627122b140af885434dc280560ffc991", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3644` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3644 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3644"}, "prompt_sha1": "0d5821f699a8f9ccd2c4ee69851664c0ff0e9f04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_110_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 110 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_110_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd110;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_110_ignore", "cycles": 110, "retrigger": false}, "prompt_sha1": "d701d8a684a78eac2d2d2fdc543435480fbe3690", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 975, and period is 43386 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(975×43386) = 0.283679 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 975, "period": 43386, "hz": 0.2836788896808258}, "prompt_sha1": "b129464c90756ff4ba6852a91f832d55913e2208", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 16-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^16 V = 5.03540039062e-05 V = 50.354004 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 16, "vref": 3.3, "step": 5.035400390625e-05}, "prompt_sha1": "ca4f045a5a4cc64bdd42c87d2c0fbc6774129a68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w55_unsigned` comparing two 55-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w55_unsigned (\n input logic [54:0] a,\n input logic [54:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w55_unsigned", "width": 55, "signed": false}, "prompt_sha1": "07edaeda6a17b5366eec6b729bd69edeb837bbba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (4096×8) = 152.587891 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 4096, "pps": 152.587890625}, "prompt_sha1": "c23ece68fe1d2eafa555904a01a37e7f5fc5ff82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(40×10^6) s = 6.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 256, "time_us": 6.3999999999999995}, "prompt_sha1": "705333bd9948502cb8bdaa4f4442f9acee2b4527", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 1010001100010111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1010001100010111", "ones": 8, "parity": 0}, "prompt_sha1": "d95ec8cfe886426048005647205330245686eec4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-24 = 1256 bytes.\nRound down to an 8-byte multiple: floor((1256)/8)×8 = 1256 bytes.\nFragments required = ceil(2000/1256) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 24, "payload": 2000, "max_payload": 1256, "fragments": 2}, "prompt_sha1": "4e6c8715423f070794eecda47833a3d970f6222c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×0.1/1000/8 = 12500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 0.1, "bytes": 12500.0}, "prompt_sha1": "20e3a15e24470cd3bf0578a23a3349381d4c1e37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-52 = 1188 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 52, "mss": 1188}, "prompt_sha1": "2c2061e97410c528cd64d17eb29a8a3415124c8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 2.5 V reference and returns code 38929. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 38929/65535 × 2.5 V = 1.485046 V.\nThus the estimated input is about 1.4850 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 2.5, "code": 38929, "volts": 1.4850461585412376}, "prompt_sha1": "5803dff81cbeb17c3844b385bb255699cc7970eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [1, 2, 2, 18, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 6, 7, 39, 37].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [1, 2, 2, 18, 16], "finish": [1, 6, 7, 39, 37]}, "prompt_sha1": "616236df78767726073471500617ffd6efb2e29f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 80%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.020×(5+0.200×120) = 1.080000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.98, "l2": 5, "l2_hit": 0.8, "mem": 120, "amat": 1.0800000000000005}, "prompt_sha1": "0473c1c807dfc75200f5186df96d0033c9f3388e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x47, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x47<<1)|1 = 0x8F = 10001111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 71, "rw": 1, "byte": 143}, "prompt_sha1": "d11d6965d6527e6eea4916e3da4639712749019b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 483 elements. Review loop `for i in range(483-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(483-1)` produces indices 0 through 481, so index 482 is skipped. Correct loop: `for i in range(483):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 483, "variant": "miss_last"}, "prompt_sha1": "d6ce30e889f9d164636c35d95400122109fad70f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_5717` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_5717 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_5717"}, "prompt_sha1": "0af4331179de9bd0571775f6d8faf3a0c81dd13d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_6290` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_6290 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_6290", "width": 10}, "prompt_sha1": "f6adea03a9ca4193791d5b61890bd2203612f0c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-20 = 980 bytes.\nRound down to an 8-byte multiple: floor((980)/8)×8 = 976 bytes.\nFragments required = ceil(8000/976) = 9.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 20, "payload": 8000, "max_payload": 976, "fragments": 9}, "prompt_sha1": "e4da600f1758a8aa4c8d9db552efd5640b2c6a4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_7673` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_7673 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_7673", "width": 8}, "prompt_sha1": "ef57e3084519a2cc3786b046498d1a3baa3c27cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 80%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.100×(20+0.200×80) = 5.100000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.9, "l2": 20, "l2_hit": 0.8, "mem": 80, "amat": 5.1}, "prompt_sha1": "b67f05ddc188960c402af3a7e937beec8dcd7a93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x68, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x68<<1)|0 = 0xD0 = 11010000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 104, "rw": 0, "byte": 208}, "prompt_sha1": "5557013e7a43d9cba6cd7c7dde93ef2b994078e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 200 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 200000000/5000 = 40000.\nWith prescaler divisor limited to at most 32, the largest divisor of 40000 that also keeps the period count within 16 bits is 32.\nPeriod count = 40000/32 = 1250.\nPSC register = 32-1 = 31.\nARR register = 1250-1 = 1249.\nVerification: 200000000/(32×1250) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 200000000, "target_hz": 5000, "total_division": 40000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32, "period": 1250, "psc_reg": 31, "arr_reg": 1249}, "prompt_sha1": "e0c7b0a0cc7221c7800688d6a1c9ecd09692c743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 48 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 48-14 = 34.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 48, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 34}, "prompt_sha1": "38924ced29a1d9aa6fa26c72044041fa3f338d6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×9²=0.00019035 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 9, "energy": 0.00019035}, "prompt_sha1": "48163b81e9d4650a30a526c7ec6677783d47848f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3 ns hit time, 85.9% hit rate, and a 85 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.859 = 0.141.\nAMAT = hit time + miss rate × miss penalty\n= 3 ns + 0.141×85 ns = 14.9850 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.0, "hit_rate": 0.859, "penalty": 85, "result": 14.985000000000001}, "prompt_sha1": "44c77622e0f39c18c6d36a2389de0e437841a85e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 44 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 44 = 46.\nClock pulses = 46×9 = 414.\nTime = 414/400000 s = 1035.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 44, "clocks": 414, "time_s": 0.001035}, "prompt_sha1": "d2353237b74d1132957bee1b53b2699a9897f871", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [17, 10, 13, 10, 25, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [82, 52, 71, 56, 99, 101].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [17, 10, 13, 10, 25, 26], "finish": [82, 52, 71, 56, 99, 101]}, "prompt_sha1": "00beca1c8152a4eabbb66ada4b3cc4f67c5f11e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 64-bit right-shift register module `shiftreg_right_64`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `64-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_64 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [63:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[63:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_64", "width": 64, "direction": "right"}, "prompt_sha1": "cf0dfb15ccf617e6862be13c396297f0be14850e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 128-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/128 = 8192.\nSets = 8192/4 = 2048.\nOffset bits = log2(128) = 7; index bits = log2(2048) = 11; tag bits = 52-7-11 = 34.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 128, "ways": 4, "addr_bits": 52, "lines": 8192, "sets": 2048, "offset": 7, "index": 11, "tag": 34}, "prompt_sha1": "70243e365b91c50e02cba70adaf01a076c99c6cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 00011001101100100101110010011100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 15 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00011001101100100101110010011100", "ones": 15, "parity": 1}, "prompt_sha1": "ab7db126d4e770942ee9bf5d78cf27542e310915", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_214` generating a one-clock-cycle `tick` every 214 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_214 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 213) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_214", "divide": 214}, "prompt_sha1": "a7316ae6278cd41ebeca2b686248dd95703c19d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w64_nocin` implementing a 64-bit unsigned adder with inputs `a`, `b` and outputs `64-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w64_nocin (\n input logic [63:0] a,\n input logic [63:0] b,\n output logic [63:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w64_nocin", "width": 64, "cin": false}, "prompt_sha1": "cc998060a6ca88e21a4dbec90b636e47e387b35f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 500 Mbit/s and RTT 0.1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 500×10^6 × 0.1/1000 = 50000 bits = 6250 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 500, "rtt_ms": 0.1, "bits": 50000.0, "bytes": 6250.0}, "prompt_sha1": "841e91b5519046eb623b0011870db21050ad313b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 20000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 20000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 20000}, "prompt_sha1": "8f551fa448b76f8483f66d5fe3f688dc626df636", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 3` on one shared integer without synchronization. Assume `jobs` initially equals 216. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 216; T2 reads 216; both compute 219; T1 writes 219; T2 writes 219. The observed final value is 219, but two serial increments would produce 222.\n\n```\nlock(mutex)\njobs = jobs + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "30ae5f64da810e6ff9912c4fd14f4ff565fe9888", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xECE24116 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: EC E2 41 16.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 3974250774, "endian": "big", "bytes": [236, 226, 65, 22]}, "prompt_sha1": "0fc74ecbef2357b830ec7e7b67ac37a9ee51ee86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.60. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.60) + 0.60/2) = 1.428571.\nThe theoretical speedup is about 1.429×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.6, "n": 2, "result": 1.4285714285714286}, "prompt_sha1": "783a78d1a479f1c9d5b4b8059ae936aff6ec45e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTTTTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 1, 1, 1, 0, 0], "final_state": 1}, "prompt_sha1": "63cd6304728b007016791dc4fc54142a40ed36e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 346 and tail index 271, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (346-271) mod 1024 = 75. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 346, "tail": 271, "occupancy": 75}, "prompt_sha1": "0b442f695c9a91430b37f09bac73455a0a18fe4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_18` for a 18-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_18 (\n input logic [17:0] data,\n input logic [4:0] shamt,\n output logic [17:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_18", "width": 18, "direction": "left", "arithmetic": false}, "prompt_sha1": "5c209b853e5a4389bbd2b2ef25d804151f485929", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2511 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2511/(2511+20+8) = 0.988972 = 98.90%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2511, "iphdr": 20, "eff": 0.9889720362347381}, "prompt_sha1": "0b8db65b8018d452d23842b1a99fd44f9f305cdb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(16×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 128, "time_us": 8.0}, "prompt_sha1": "66c270d34a1a20d32d94e8d8aefc7966583a5845", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 160.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+16 = 176.5. Period = 176.5/16000000 = 1.103125e-05 s. Maximum rate = 1/period = 90651.558074 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 160.5, "conv_cycles": 16, "period": 1.103125e-05, "rate": 90651.55807365439}, "prompt_sha1": "3ddaac80c2f038a6c002275f3ab9ddfe82cdd917", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x87CD. Extract the 2-bit field starting at bit 10 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0x87CD >> 10) & 0x3 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 2, "lsb": 10, "value": 34765, "mask": 3, "field": 1}, "prompt_sha1": "41e0a778a1bbea47d3407cf4e1d1fe86b4ae9fb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8833-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8833×8 = 70664 bits.\nSerialization delay = bits/rate = 70664/(5000×10^6) s = 1.41328e-05 s = 14.132800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8833, "rate_mbps": 5000, "delay_s": 1.41328e-05}, "prompt_sha1": "dd8e7d279b1754d33159f65ca8c9ce0e77071576", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.180.44.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.180.44.0\nBroadcast address: 10.180.44.127\nUsable host range: 10.180.44.1 to 10.180.44.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.180.44.0/25", "usable": 126, "first": "10.180.44.1", "last": "10.180.44.126", "broadcast": "10.180.44.127"}, "prompt_sha1": "15fb85900263d9cd521fd384f4548c61261acaba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10000 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/10000=0.00018 A. P=V²/R=1.8²/10000=0.000324 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 10000, "i": 0.00018, "p": 0.000324}, "prompt_sha1": "c521f696065e45f890d87270cff64d4a06be2ef0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.64. Using Amdahl's law, compute the theoretical speedup on 5 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.64) + 0.64/5) = 2.049180.\nThe theoretical speedup is about 2.049×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.64, "n": 5, "result": 2.0491803278688523}, "prompt_sha1": "34dad152f30e3dc726d80cf6da02f43a900569f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1233 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "6fc915e40fa79dc98a16f6476bc0b1c722b363c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 887, and period is 20288 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(887×20288) = 1.333670 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 887, "period": 20288, "hz": 1.3336700109183117}, "prompt_sha1": "21bca63aa254938c51e20148c4f48d94f33a833e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 360 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 360 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 360.0}, "prompt_sha1": "d8ba1b5d6fe8815a43b5990f98aa96607bb5a053", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 96%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 85%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.040×(10+0.150×120) = 2.120000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.96, "l2": 10, "l2_hit": 0.85, "mem": 120, "amat": 2.120000000000001}, "prompt_sha1": "615f7273fc02db2329aa2a8fe205b0203fb5a2f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 11-bit left-shift register module `shiftreg_left_11`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `11-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_11 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [10:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[9:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_11", "width": 11, "direction": "left"}, "prompt_sha1": "d6961708f17c64ef18e494f3b60a7d769a4760ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_5247` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_5247 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_5247", "width": 12}, "prompt_sha1": "d149d2be72ed27865b9d131a412c4f60d7bb21eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 9000 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-40-52 = 8908 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 40, "tcphdr": 52, "mss": 8908}, "prompt_sha1": "840bd83f23c44b69e0e3e357e4b5f8b0dd66c34c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 45 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 45 = 48.\nClock pulses = 48×9 = 432.\nTime = 432/400000 s = 1080.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 45, "clocks": 432, "time_s": 0.00108}, "prompt_sha1": "246f0e6b39af725c5a767286f4d8d1c19948aa1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4432(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4432(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4432([1, 2]) == 1.5\nassert mean_4432([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4432"}, "prompt_sha1": "15591c3b71cba42f943c215d49b71629bc17d1f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5761-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5761×8 = 46088 bits.\nSerialization delay = bits/rate = 46088/(10000×10^6) s = 4.6088e-06 s = 4.608800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5761, "rate_mbps": 10000, "delay_s": 4.6088e-06}, "prompt_sha1": "dc039d4edfe1f61dc42d4251d2372619c316e3e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 1 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×50×10^6 = 50000000 B/s. Time = 128/50000000 = 2.56e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 1, "rate_mhz": 50, "sec": 2.56e-06}, "prompt_sha1": "6a4a44f84542ced191196806ba5c65af883438e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 100 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×100×10^6×4 = 0.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 100, "channels": 4, "gbps": 0.8}, "prompt_sha1": "497e69cc91625307c91eb9d47ba952b9818440a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x28. Extract the 4-bit field starting at bit 0 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x28 >> 0) & 0xF = 0x8 (8).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 0, "value": 40, "mask": 15, "field": 8}, "prompt_sha1": "45665526f5e3033c7cb1dde8b03588f6a8e9118b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=40 ms, C=1 ms,T=100 ms, C=3 ms,T=25 ms, C=1 ms,T=5 ms, C=4 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/40 + 1/100 + 3/25 + 1/5 + 4/25 = 0.590000 = 59.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 40], [1, 100], [3, 25], [1, 5], [4, 25]], "utilization": 0.59}, "prompt_sha1": "ae0251fd68aed88677baf196f7828dbda6751993", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 1203 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×1203/(32×10^6) = 0.018796875 = 1.879688%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 500, "cycles": 1203, "load": 0.018796875}, "prompt_sha1": "9c007a0d74002b8db7f6e77cb6052edb03677d47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_41` for a synchronous sampled input `noisy`. Update output `clean` only after observing 41 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_41 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 40) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_41", "stable_samples": 41}, "prompt_sha1": "fc53e287c46e785a0b022e483ac65bb13bee2a1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 12.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.125 × 10000 = 1250. Verification: 1250/10000 = 0.125, which is 12.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 12.5, "high": 1250}, "prompt_sha1": "03fe03a9649ff539d6d6cdeaa69d76f8c43d871e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=40 ms, C=4 ms,T=25 ms, C=1 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/40 + 4/25 + 1/20 = 0.235000 = 23.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 40], [4, 25], [1, 20]], "utilization": 0.23500000000000001}, "prompt_sha1": "2d2e01de03185530a14a15f87adc94ca94f6344f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.86. Using Amdahl's law, compute the theoretical speedup on 12 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.86) + 0.86/12) = 4.724409.\nThe theoretical speedup is about 4.724×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.86, "n": 12, "result": 4.724409448818897}, "prompt_sha1": "ec2f2016b0947e984f28d18aec0a6b35ad728324", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (9000×8) = 138888.888889 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 9000, "pps": 138888.88888888888}, "prompt_sha1": "7210d8e0664de5d4753709682e6dd5c5cd03110f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3.3 V reference and returns code 229. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 229/255 × 3.3 V = 2.963529 V.\nThus the estimated input is about 2.9635 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.3, "code": 229, "volts": 2.9635294117647057}, "prompt_sha1": "5eaef7cebd4741c8d17c7a8593458ee4a0432496", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 128 = 0.281250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 128, "spi_hz": 281250.0}, "prompt_sha1": "c022a248909d34fd712fd598d9453a5b1d143d66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 26 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 26-14 = 12.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 26, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 12}, "prompt_sha1": "30179b82d5667dbacaa940cf4738e7ccdb4e5fcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_5154` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_5154 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_5154"}, "prompt_sha1": "5b4133abf0890f73142800f077b8b29baef4f18d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=820000 ohm and C=560000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=820000×560000×10^-12 s = 0.4592 s.\nf_c=1/(2πRC)=1/(2π×820000×560000×10^-12) = 0.3466 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 820000, "c_f": 5.6e-07, "tau": 0.45920000000000005, "fc": 0.34659177502590444}, "prompt_sha1": "627ce438ae68c75a73b0c8c1fd532de3bc01e0e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 2 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 2/1000 = 4000 bits = 500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 2, "bits": 4000.0, "bytes": 500.0}, "prompt_sha1": "6bf480ab48cfb64e1fe4728a7ef5ec2adf31f5bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 0.5/1000 = 1.25e+07 bits = 1.5625e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 0.5, "bits": 12500000.0, "bytes": 1562500.0}, "prompt_sha1": "63fd6b475b74634cb70f0c11cc65772edc19e8a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock DESC then BUF; consumer acquires BUF then DESC. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds DESC while waiting for BUF, while consumer holds BUF while waiting for DESC; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "e945d266a371ee031787704799731d30831add93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (256×8) = 976.562500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 256, "pps": 976.5625}, "prompt_sha1": "3b2af6d935bbf89f5e0357abd06ed83df56628fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 47-bit up/down counter `updown_47_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_47_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [46:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 47'd140737488355327) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_47_sat", "width": 47, "wrap": false}, "prompt_sha1": "986a425becc6d4a2cb2aefaea3ae71701020e0eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10000 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/10000=0.00025 A. P=V²/R=2.5²/10000=0.000625 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 10000, "i": 0.00025, "p": 0.000625}, "prompt_sha1": "c3db7892e519038d84754526bb846e91829a10dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/22=0.227272727 A. P=V²/R=5²/22=1.13636364 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 22, "i": 0.22727272727272727, "p": 1.1363636363636365}, "prompt_sha1": "b5e3019ffe3e9f7ef32a2dc89a22fc33e7b5539b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8850(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8850(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8850([1, 2]) == 1.5\nassert mean_8850([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8850"}, "prompt_sha1": "ab312665a07783637ca31c4601e99c38017c7d55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=330000 ohm and C=220000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=330000×220000×10^-12 s = 0.0726 s.\nf_c=1/(2πRC)=1/(2π×330000×220000×10^-12) = 2.1922 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 330000, "c_f": 2.1999999999999998e-07, "tau": 0.0726, "fc": 2.192216846995804}, "prompt_sha1": "b9a8ba7746fb7229919d075a11274d896f22795a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w43_nocin` implementing a 43-bit unsigned adder with inputs `a`, `b` and outputs `43-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w43_nocin (\n input logic [42:0] a,\n input logic [42:0] b,\n output logic [42:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w43_nocin", "width": 43, "cin": false}, "prompt_sha1": "ef185871d48d5ac8507ac7d86975f07ae21c752f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 2000 bytes, IP header 20 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-20-40 = 1940 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 20, "tcphdr": 40, "mss": 1940}, "prompt_sha1": "e6cc6c81eb13880abfc80238235ab7fe36274125", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 300 elements. Review loop `for i in range(300+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(300+1)` includes index 300, which is out of range for a length-300 sequence. Correct loop: `for i in range(300):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 300, "variant": "one_past"}, "prompt_sha1": "64fecd26b60af74a793e90d39d7e55cbfa3eb290", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-40 = 1460 bytes.\nRound down to an 8-byte multiple: floor((1460)/8)×8 = 1456 bytes.\nFragments required = ceil(10000/1456) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 40, "payload": 10000, "max_payload": 1456, "fragments": 7}, "prompt_sha1": "74882da9d03fe4d786eaaf34fc27a8f11df9e609", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2500 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2500×10^6 × 300/1000 = 7.5e+08 bits = 9.375e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2500, "rtt_ms": 300, "bits": 750000000.0, "bytes": 93750000.0}, "prompt_sha1": "7d51ceb523f9311d221e2cb40721378f6a6759f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 4` on one shared integer without synchronization. Assume `requests` initially equals 330. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 330; T2 reads 330; both compute 334; T1 writes 334; T2 writes 334. The observed final value is 334, but two serial increments would produce 338.\n\n```\nlock(mutex)\nrequests = requests + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "2c1b8777ce346f13e5c216df12f88e07446a47c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 320 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 320/(320+8) = 0.975610 = 97.56%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 320, "overhead": 8, "efficiency": 0.975609756097561}, "prompt_sha1": "49ce07ab70fb60d602887a17088991a6e9cafe01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 32-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/32 = 32768.\nSets = 32768/4 = 8192.\nOffset bits = log2(32) = 5; index bits = log2(8192) = 13; tag bits = 52-5-13 = 34.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 32, "ways": 4, "addr_bits": 52, "lines": 32768, "sets": 8192, "offset": 5, "index": 13, "tag": 34}, "prompt_sha1": "db6ad158a7a517f2b3f4d62e7bcec72e32d276a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `samples` elements of type `float`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n sum += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `a[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n sum += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "1cab0ba9571d1bf27b507b5ac1fcabd2e21307a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 104 and initial occupancy is 31. In an abstract batch, producer attempts to enqueue 3 items first, dropping any excess beyond capacity; then consumer removes up to 1 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=34, dropped=0; consumed=1; final occupancy=33.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 104, "start": 31, "prod": 3, "cons": 1, "dropped": 0, "consumed": 1, "final": 33}, "prompt_sha1": "4cbc5e6f4e7a494a626a261654af7fa75c820522", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 35 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 35×8 = 280. Time = 280/4800 = 0.0583333333 s = 58.333333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 6, "parity": 0, "stop": 1, "frames": 35, "seconds": 0.058333333333333334}, "prompt_sha1": "c32a7411a747e94a8ce2662d806c205235128644", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-40 = 3960 bytes.\nRound down to an 8-byte multiple: floor((3960)/8)×8 = 3960 bytes.\nFragments required = ceil(2000/3960) = 1.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 40, "payload": 2000, "max_payload": 3960, "fragments": 1}, "prompt_sha1": "e6d5c142832676ab8262c0b18189a2a1992f6ce0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `items` elements of type `double`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n acc += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `words[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n acc += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "4965ab392073037c9e4b31febe036a97ccc7eb30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8503 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8503/(8503+20+8) = 0.996718 = 99.67%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8503, "iphdr": 20, "eff": 0.9967178525378033}, "prompt_sha1": "1a9d07c450212305d16f62367919dc73663175dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^19 V = 9.53674316406e-06 V = 9.536743 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 5.0, "step": 9.5367431640625e-06}, "prompt_sha1": "d5d58ace9c8687603d7b13899dba863e7cc5fec1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_53` for a 53-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_53 (\n input logic [52:0] data,\n input logic [5:0] shamt,\n output logic [52:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_53", "width": 53, "direction": "left", "arithmetic": false}, "prompt_sha1": "96189e046b565e644063ea633f7580e2d2e47dbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×56)/(680+56) = 51.739130 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 56, "req": 51.73913043478261}, "prompt_sha1": "77e517a5b4d1ec775d3f24770965516fba228a50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.25 ns hit time, 86.7% hit rate, and a 175 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.867 = 0.133.\nAMAT = hit time + miss rate × miss penalty\n= 1.25 ns + 0.133×175 ns = 24.5250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.25, "hit_rate": 0.867, "penalty": 175, "result": 24.525000000000002}, "prompt_sha1": "3917ed094aaa65d27e1c90744db9789e03bb178f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_6` for a 6-bit signed input `data`, `3-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_6 (\n input logic signed [5:0] data,\n input logic [2:0] shamt,\n output logic signed [5:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_6", "width": 6, "direction": "right", "arithmetic": true}, "prompt_sha1": "38f16844d693fbc137b9f5fee6f1ed02683d76a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 20 and initial occupancy is 17. In an abstract batch, producer attempts to enqueue 7 items first, dropping any excess beyond capacity; then consumer removes up to 163 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=20, dropped=4; consumed=20; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 20, "start": 17, "prod": 7, "cons": 163, "dropped": 4, "consumed": 20, "final": 0}, "prompt_sha1": "d81e5f9e710d48a6de85b9cb1bc49f2240909c72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/330=0.01 A. P=V²/R=3.3²/330=0.033 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 330, "i": 0.01, "p": 0.032999999999999995}, "prompt_sha1": "e76bbf13b0a53032a2e49530e849521f760fdbfa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [17, 10, 18, 15]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [58, 38, 60, 57].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [17, 10, 18, 15], "finish": [58, 38, 60, 57]}, "prompt_sha1": "3f6ab6381d8b559a2d9f64bb83e714736a271052", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=100 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/100 + 2/25 = 0.100000 = 10.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 100], [2, 25]], "utilization": 0.1}, "prompt_sha1": "0473911dd83107fdcbdfb49529cf018173d42aa8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `size` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n sum += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `items[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n sum += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "586bbc3e0b8bf6a9328e57a2c4299743727e1eb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_8463` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_8463 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_8463"}, "prompt_sha1": "e578b08811bcddf1fdec3ebde46d9382c4d8615a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_74` generating a one-clock-cycle `tick` every 74 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_74 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 73) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_74", "divide": 74}, "prompt_sha1": "f731eee091431cdaacd8b2f13e52ad6c438d529a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 123 and initial occupancy is 54. In an abstract batch, producer attempts to enqueue 13 items first, dropping any excess beyond capacity; then consumer removes up to 55 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=67, dropped=0; consumed=55; final occupancy=12.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 123, "start": 54, "prod": 13, "cons": 55, "dropped": 0, "consumed": 55, "final": 12}, "prompt_sha1": "8fa2501acd4f19b6ee1f8a8968a649a8cbd492ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE47877A775C9 in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E4 78 77 A7 75 C9.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 251206054671817, "endian": "big", "bytes": [228, 120, 119, 167, 117, 201]}, "prompt_sha1": "08664c0b11d50d7bc9ffa0bd73a21bc55ae28733", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 5000 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 5000×10^6 × 200/1000 = 1e+09 bits = 1.25e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 5000, "rtt_ms": 200, "bits": 1000000000.0, "bytes": 125000000.0}, "prompt_sha1": "09452235ed29ea8f045978e8fd64c04ac78e8db7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 216 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 216000000/400 = 540000.\nWith prescaler divisor limited to at most 16, the largest divisor of 540000 that also keeps the period count within 16 bits is 16.\nPeriod count = 540000/16 = 33750.\nPSC register = 16-1 = 15.\nARR register = 33750-1 = 33749.\nVerification: 216000000/(16×33750) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 216000000, "target_hz": 400, "total_division": 540000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 33750, "psc_reg": 15, "arr_reg": 33749}, "prompt_sha1": "d3572db396b3e032853ba6fd5a26228f9556b7f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 490 elements. Review loop `for i in range(490+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(490+1)` includes index 490, which is out of range for a length-490 sequence. Correct loop: `for i in range(490):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 490, "variant": "one_past"}, "prompt_sha1": "bf11c8186b9f8c03237d9f1053b3d50dddf17926", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_4` for a synchronous sampled input `noisy`. Update output `clean` only after observing 4 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_4 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [1:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 3) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_4", "stable_samples": 4}, "prompt_sha1": "f2791b1553f1913ad8f50b9e4b0cbeadd26c7824", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/470 = 0.00212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 470, "tau": 0.002127659574468085}, "prompt_sha1": "515dfdfbe33defb430416a54794872e92be54764", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×512 KiB = 262144 KiB = 268435456 bytes = 256.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 512, "reach": 268435456}, "prompt_sha1": "659c4937533b97f401b4deb159d5453047b91002", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 100 Mbit/s and RTT 0.2 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 100×10^6 × 0.2/1000 = 20000 bits = 2500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 100, "rtt_ms": 0.2, "bits": 20000.0, "bytes": 2500.0}, "prompt_sha1": "d66b1f4dddb580a4aa66fbf1f3436796b679ae71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 128 KiB cache with 128-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "6d9d5c2ac305226c13abc0236bfffe2b3caea24e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 8 and tail index 13, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (8-13) mod 16 = 11. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 8, "tail": 13, "occupancy": 11}, "prompt_sha1": "64237e1f63059f04cdfd04212eb2f5602679515b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.76. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.76) + 0.76/64) = 3.970223.\nThe theoretical speedup is about 3.970×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.76, "n": 64, "result": 3.9702233250620345}, "prompt_sha1": "63a5ce3b939d52f789779a05f96344d1b6867904", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7718` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7718 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7718"}, "prompt_sha1": "57b3a1c90183fd3c107940544fe29debcc3dfdf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w35_nocin` implementing a 35-bit unsigned adder with inputs `a`, `b` and outputs `35-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w35_nocin (\n input logic [34:0] a,\n input logic [34:0] b,\n output logic [34:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w35_nocin", "width": 35, "cin": false}, "prompt_sha1": "74a6742f66179fd9c8c05e927b587a55b70f6743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_40` for a synchronous sampled input `noisy`. Update output `clean` only after observing 40 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_40 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 39) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_40", "stable_samples": 40}, "prompt_sha1": "bc50c86b994aa39f2786e2dbe413ccd35f5906ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 460 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 460/(460+20+8) = 0.942623 = 94.26%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 460, "iphdr": 20, "eff": 0.9426229508196722}, "prompt_sha1": "83c918eecba3e6c642d1709268105a75f622875e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 89, and period is 1948 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(89×1948) = 69.215329 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 89, "period": 1948, "hz": 69.2153288881711}, "prompt_sha1": "df69f3e1c8794ad483d0305ff41335c78c5755e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 240 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 240 MHz / 32 = 7.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 240000000.0, "divider": 32, "spi_hz": 7500000.0}, "prompt_sha1": "325abd17126143831e5511c3e3850bf79df744fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 3.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+8 = 11.5. Period = 11.5/20000000 = 5.75e-07 s. Maximum rate = 1/period = 1739130.434783 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 3.5, "conv_cycles": 8, "period": 5.75e-07, "rate": 1739130.4347826086}, "prompt_sha1": "fdf936e0c3fbc6548b78f809db4e4123de79e1fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 300 counts per period. What compare/high-time count produces exactly 5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.05 × 300 = 15. Verification: 15/300 = 0.05, which is 5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 300, "duty": 5, "high": 15}, "prompt_sha1": "4c2992e4a9d2a15e8654d3d62807e3e556da49f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x623093415059EEB9 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: B9 EE 59 50 41 93 30 62.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 7075316923329277625, "endian": "little", "bytes": [185, 238, 89, 80, 65, 147, 48, 98]}, "prompt_sha1": "7c9f6ef84fa74d8feec4d9f954eacecdb2d85b53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×2/1000/8 = 500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 2, "bytes": 500.0}, "prompt_sha1": "0006fb99314aceb5e1b9ea2e1fda412957bd6ed9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_14` for a synchronous sampled input `noisy`. Update output `clean` only after observing 14 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_14 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 13) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_14", "stable_samples": 14}, "prompt_sha1": "92149bfaeb53177b304093a96e62b113b042dd84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 256-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/256 = 128.\nOffset bits = log2(256) = 8.\nIndex bits = log2(128) = 7.\nTag bits = 52-7-8 = 37.\nCheck: 37+7+8 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 256, "addr_bits": 52, "lines": 128, "offset_bits": 8, "index_bits": 7, "tag_bits": 37}, "prompt_sha1": "eb67264e259bdab14d385261cf8b9fa83334f0b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-28 = 1252 bytes.\nRound down to an 8-byte multiple: floor((1252)/8)×8 = 1248 bytes.\nFragments required = ceil(8000/1248) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 28, "payload": 8000, "max_payload": 1248, "fragments": 7}, "prompt_sha1": "7a940c4c1bbeaf5fc16c0af054ce83a78fbd358f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_6305` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_6305 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_6305"}, "prompt_sha1": "6ce480c2af14f4e59cee9186dbefc4c3a2214654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/47=0.255319149 A. P=V²/R=12²/47=3.06382979 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 47, "i": 0.2553191489361702, "p": 3.0638297872340425}, "prompt_sha1": "94e96f8e3117608b438a80b87f4b3ce4e56ec3ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 777, and period is 23063 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(777×23063) = 8.928596 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 777, "period": 23063, "hz": 8.928595842700686}, "prompt_sha1": "6f0dae386cf9827b931e44ff9c668e5b2b4d04a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 92.8% hit rate, and a 145 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.928 = 0.072.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.072×145 ns = 12.4400 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.928, "penalty": 145, "result": 12.439999999999992}, "prompt_sha1": "b292c013493f5c4e6feb2823daacc3075f919640", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×9²=8.91e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 9, "energy": 8.91e-05}, "prompt_sha1": "5d8462055a20b6be049c4164d89c85cc11fdd305", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 200000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 200000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 200000}, "prompt_sha1": "b361bd661f11a9b75843176d069dedefea495b2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/1000=0.0018 A. P=V²/R=1.8²/1000=0.00324 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 1000, "i": 0.0018, "p": 0.0032400000000000003}, "prompt_sha1": "f5162bc3e195223bf4bdb760f5d2190a7e0d0700", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_35_lsb` for `35-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_35_lsb (\n input logic [34:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 34; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_35_lsb", "width": 35, "priority": "low"}, "prompt_sha1": "bb3daf14ffd47ff4b141786ebcc997e175efef50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1400 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-40-40 = 1320 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 40, "tcphdr": 40, "mss": 1320}, "prompt_sha1": "d6443cae347637d228b15375b017acbfad108b7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 64 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 64 MHz / 4 = 16.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 64000000.0, "divider": 4, "spi_hz": 16000000.0}, "prompt_sha1": "12e8e5efede6b18148a0ca24650aacf5a441534f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `words` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n total += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `samples[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n total += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "2596cb53dfc08e3d5131599f64e6fef1ef828650", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1011001011011 using generator polynomial bits 11011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 27, "msg_bits": 13, "msg": 5723, "remainder": 6}, "prompt_sha1": "4f4b22e4943466147c3df41a1ce98ddb615c8a73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_132` generating a one-clock-cycle `tick` every 132 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_132 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 131) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_132", "divide": 132}, "prompt_sha1": "e77042d76be8e9348aa575a3237e3ad7eccde582", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2572113742, carries 6269 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 6269+1+0 = 6270. ACK = (2572113742+6270) mod 2^32 = 2572120012.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2572113742, "payload": 6269, "syn": 1, "fin": 0, "ack": 2572120012}, "prompt_sha1": "cba7c858e402cd706d32fdb2812fd0c9fb316d1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 590. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 590/1023 × 3 V = 1.730205 V.\nThus the estimated input is about 1.7302 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 590, "volts": 1.7302052785923756}, "prompt_sha1": "bffb39a95a3a5d0f88d1b83c06a6baa83e70efbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(8×10^6) s = 32.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 256, "time_us": 32.0}, "prompt_sha1": "05883b20859dc97a4094a624f2a3bb551f6db804", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 5600 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×5600×10^6×4 = 716.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 5600, "channels": 4, "gbps": 716.8}, "prompt_sha1": "322f1c904cae75c4953ec08754d5889b25f29477", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 32-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/32 = 8192.\nOffset bits = log2(32) = 5.\nIndex bits = log2(8192) = 13.\nTag bits = 48-13-5 = 30.\nCheck: 30+13+5 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 32, "addr_bits": 48, "lines": 8192, "offset_bits": 5, "index_bits": 13, "tag_bits": 30}, "prompt_sha1": "07269fd728c828bbe7baba4cf06ef3b8df70437b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 40 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-40 = 1200 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 40, "mss": 1200}, "prompt_sha1": "00838b883da6d80d7aeface74a1182ad95227aa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=220 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/1 = -220.000000.\nVout = A_v×Vin = -220.000000×0.25 = -55.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 220, "vin": 0.25, "gain": -220.0, "vout": -55.0}, "prompt_sha1": "9b7f74eba0a71c239d89a9b0d3bfcc17ab2fc400", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/330=0.00606060606 A. P=V²/R=2²/330=0.0121212121 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 330, "i": 0.006060606060606061, "p": 0.012121212121212121}, "prompt_sha1": "db1283cfd09a5d1c4bf047945ba16d585d9fb6c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 300000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 300000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 300000.0}, "prompt_sha1": "8af8b48c212bffac164928d04d11fda2e3ffd729", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/100000=5e-05 A. P=V²/R=5²/100000=0.00025 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 100000, "i": 5e-05, "p": 0.00025}, "prompt_sha1": "58c9842ca4e01c4533a45168d432617fd54d002f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.59.218.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.59.218.0\nBroadcast address: 10.59.218.63\nUsable host range: 10.59.218.1 to 10.59.218.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.59.218.0/26", "usable": 62, "first": "10.59.218.1", "last": "10.59.218.62", "broadcast": "10.59.218.63"}, "prompt_sha1": "4ab7fef4fec59c1e27eacdb2e10f65a0acddfbf1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock C then L2; task_B acquires L2 then C. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds C while waiting for L2, while task_B holds L2 while waiting for C; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "881e75ce64a1117b8288c869d35f6496b2484b3a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 2 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×2/(3.5×10^9) = 0.285714286 s = 285.714286 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 2.0, "ghz": 3.5, "sec": 0.2857142857142857}, "prompt_sha1": "ff16192bc328b5ee560183c32abbdcc9bdfb179d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×82)/(100+82) = 45.054945 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 82, "req": 45.05494505494506}, "prompt_sha1": "d1a41de201294325e367b998bbe3870553b25072", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 15-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^15 V = 3.0517578125e-05 V = 30.517578 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 15, "vref": 1.0, "step": 3.0517578125e-05}, "prompt_sha1": "ba8839f135c51bed369eb25e154315cfe083183e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `len` elements of type `float`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n sum += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `data[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n sum += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "55a12921f1a61aa85daf0aa050c8775c8ca40496", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1011100010 using generator polynomial bits 11001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 25, "msg_bits": 10, "msg": 738, "remainder": 15}, "prompt_sha1": "7a6b18735168724bba4b17739539099b273b557d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 16-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^16 V = 2.74658203125e-05 V = 27.465820 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 16, "vref": 1.8, "step": 2.74658203125e-05}, "prompt_sha1": "1bf83744ab649e0afc4130e93b5ad297098b9cf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 32-bit up/down counter `updown_32_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_32_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [31:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_32_wrap", "width": 32, "wrap": true}, "prompt_sha1": "8dd2e6b48536daea28b924c96bbaf83264d4fb92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/100 = 4.7e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 100, "tau": 4.7000000000000004e-05}, "prompt_sha1": "56b9ba596dc5ce2573335572941c7b2de4ce5bb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x58. Extract the 6-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x58 >> 1) & 0x3F = 0x2C (44).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 6, "lsb": 1, "value": 88, "mask": 63, "field": 44}, "prompt_sha1": "9b546875f444188bcb4d0fe35e2aa6aad7f68d4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_2418` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_2418 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_2418", "width": 5}, "prompt_sha1": "ff79d049b9aee306af651b59be8d90de2c0cab18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x88B31E8B, clear bit 22 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 22)`. Result = 0x88B31E8B.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 2293440139, "bit": 22, "op": "clear", "result": 2293440139}, "prompt_sha1": "a949736bf4c2c8a60f2bb0bd6ae95e2632d2dab4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 57-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^57/2^13 = 2^44 = 17592186044416 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 57, "page_exp": 13, "entries": 17592186044416}, "prompt_sha1": "db160a8209035ac69addd147e537f0281c5a614b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 4` on one shared integer without synchronization. Assume `credits` initially equals 275. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 275; T2 reads 275; both compute 279; T1 writes 279; T2 writes 279. The observed final value is 279, but two serial increments would produce 283.\n\n```\nlock(mutex)\ncredits = credits + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "4a02e6129dd208d8b5a93240a7af174d3cab3520", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_822039` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_822039 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_822039"}, "prompt_sha1": "827a2099c3ea3d1908a0017331ac124a0a36656a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.25 ns hit time, 95.6% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.956 = 0.044.\nAMAT = hit time + miss rate × miss penalty\n= 4.25 ns + 0.044×190 ns = 12.6100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.25, "hit_rate": 0.956, "penalty": 190, "result": 12.610000000000007}, "prompt_sha1": "2bcfa7f5140f26f23e5d6215c7803c8085f4fc28", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x7127598F. Extract the 3-bit field starting at bit 12 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0x7127598F >> 12) & 0x7 = 0x5 (5).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 12, "value": 1898404239, "mask": 7, "field": 5}, "prompt_sha1": "897ce8a67e135c737560b7f73b581bb8b2745f43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=22 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/22 = -1.000000.\nVout = A_v×Vin = -1.000000×1 = -1.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 22, "vin": 1.0, "gain": -1.0, "vout": -1.0}, "prompt_sha1": "0052a61cb5701220b0eb94bd9847d1d42d0eefda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8466 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8466/(8466+40+8) = 0.994362 = 99.44%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8466, "iphdr": 40, "eff": 0.9943622269203665}, "prompt_sha1": "c1474ecfc89213278cf36e6edf91df0a0aa54dc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-28 = 3972 bytes.\nRound down to an 8-byte multiple: floor((3972)/8)×8 = 3968 bytes.\nFragments required = ceil(4000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 28, "payload": 4000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "f04b39043ab4162dc1ff13249105451e7187984b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w45_cin` implementing a 45-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `45-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w45_cin (\n input logic [44:0] a,\n input logic [44:0] b,\n input logic cin,\n output logic [44:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w45_cin", "width": 45, "cin": true}, "prompt_sha1": "7953d335754f6b42911e56c65fce3ff2fb4438c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [1, 5, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 9, 26].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [1, 5, 20], "finish": [1, 9, 26]}, "prompt_sha1": "33e46afc800b0f6ed2e2ca2742a00a4be356434e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 256-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/256 = 1024.\nOffset bits = log2(256) = 8.\nIndex bits = log2(1024) = 10.\nTag bits = 52-10-8 = 34.\nCheck: 34+10+8 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 256, "addr_bits": 52, "lines": 1024, "offset_bits": 8, "index_bits": 10, "tag_bits": 34}, "prompt_sha1": "a0c16ca51689baf1802b99561ec37ce00adbea35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_39_msb` for `39-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_39_msb (\n input logic [38:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 39; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_39_msb", "width": 39, "priority": "high"}, "prompt_sha1": "079d2d0ae8e19b439573c914b345ad59cb19dd3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 64-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/64 = 2048.\nOffset bits = log2(64) = 6.\nIndex bits = log2(2048) = 11.\nTag bits = 64-11-6 = 47.\nCheck: 47+11+6 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 64, "addr_bits": 64, "lines": 2048, "offset_bits": 6, "index_bits": 11, "tag_bits": 47}, "prompt_sha1": "1868d4881a1b7095827c093b98057f8938827279", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 480 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 480 = 144. Verification: 144/480 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 480, "duty": 30, "high": 144}, "prompt_sha1": "c598d31f31fa89244a21283fad1d74ad7450fc94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.91. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.91) + 0.91/2) = 1.834862.\nThe theoretical speedup is about 1.835×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.91, "n": 2, "result": 1.8348623853211012}, "prompt_sha1": "9e80f9375fe25bee3a8ea71d7cc29786d7e009ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xEBAF in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: AF EB.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 60335, "endian": "little", "bytes": [175, 235]}, "prompt_sha1": "a4453591137f62b3b161947ffcb0d9ca5c25daa8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×1/1000/8 = 3125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 1, "bytes": 3125000.0}, "prompt_sha1": "e8eacb6a4bbf625d8be1bb5114fbcb55920203ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_9_msb` for `9-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_9_msb (\n input logic [8:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 9; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_9_msb", "width": 9, "priority": "high"}, "prompt_sha1": "0dacf7ea13a97aef9c77387b27c9a6903ee76fc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/1 = 0.0047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 1, "tau": 0.0047}, "prompt_sha1": "cbbf39814e5dfd563577a3f4edb45814deabf624", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 40 bits wide and the system uses 2 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2048 bytes = 2^11 bytes.\nOffset bits = 11.\nVPN bits = 40-11 = 29.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 40, "page_bytes": 2048, "offset_bits": 11, "vpn_bits": 29}, "prompt_sha1": "626396978902c8e2152bfdd3252cc005144cd6dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 4` on one shared integer without synchronization. Assume `events` initially equals 386. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 386; T2 reads 386; both compute 390; T1 writes 390; T2 writes 390. The observed final value is 390, but two serial increments would produce 394.\n\n```\nlock(mutex)\nevents = events + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "14bb2896d5e088c0e4a63b5b657887aa6afcfa56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x63937EA, toggle bit 18 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 18)`. Result = 0x63D37EA.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 104413162, "bit": 18, "op": "toggle", "result": 104675306}, "prompt_sha1": "c7f8598bf05975e47dc3376abc61ec282a2998df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [14, 21, 14, 27]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [50, 69, 56, 76].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [14, 21, 14, 27], "finish": [50, 69, 56, 76]}, "prompt_sha1": "df091f6643486f2a6dfe866bbc8f0cc2632d9f14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x64, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x64<<1)|0 = 0xC8 = 11001000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 100, "rw": 0, "byte": 200}, "prompt_sha1": "a2d020c424550b3c1ba1deaf6f55e4be8cad3a94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2047168766, carries 1561 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 1561+1+1 = 1563. ACK = (2047168766+1563) mod 2^32 = 2047170329.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2047168766, "payload": 1561, "syn": 1, "fin": 1, "ack": 2047170329}, "prompt_sha1": "a197a91fe044b7bf1f6605c6a32f8fba831e71e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 11-bit up/down counter `updown_11_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_11_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [10:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_11_wrap", "width": 11, "wrap": true}, "prompt_sha1": "277140af297c8a1276b44a69406e3b671db7375c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 8 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×40×10^6 = 320000000 B/s. Time = 8192/320000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 8, "rate_mhz": 40, "sec": 2.56e-05}, "prompt_sha1": "a6fa2eeb7211db28b577d722ff1753f64ca74619", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_102` for a synchronous sampled input `noisy`. Update output `clean` only after observing 102 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_102 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 101) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_102", "stable_samples": 102}, "prompt_sha1": "df18b18a192d53a47023cf7bb4baf3f49e5e1a71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 52 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 52 = 55.\nClock pulses = 55×9 = 495.\nTime = 495/400000 s = 1237.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 52, "clocks": 495, "time_s": 0.0012375}, "prompt_sha1": "0400984393ea1aa5633dafc9ff9c1a70c3cf8e4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/100 = 2.2e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 100, "tau": 2.2000000000000003e-05}, "prompt_sha1": "290318064fc83d2f8e2c7c32849dec0446ab7c23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=22 nF and is stepped to 2.5 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=2.5(1-e^-5)=2.483155 V; τ=2.2e-05 s and t=0.00011 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 2.2000000000000002e-08, "multiple": 5, "vin": 2.5, "vc": 2.4831551325022865}, "prompt_sha1": "7627577ee1df959a6724c67550e5c9d90ad0f5c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 2000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×2000×10^6×8 = 512.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 2000, "channels": 8, "gbps": 512.0}, "prompt_sha1": "fcb5d7dd2fe25bfc7dd580587d6ba776f257841b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 1600 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/1600 = 90000.\nWith prescaler divisor limited to at most 256, the largest divisor of 90000 that also keeps the period count within 16 bits is 250.\nPeriod count = 90000/250 = 360.\nPSC register = 250-1 = 249.\nARR register = 360-1 = 359.\nVerification: 144000000/(250×360) = 1600 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 1600, "total_division": 90000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 360, "psc_reg": 249, "arr_reg": 359}, "prompt_sha1": "1a5efad44f9216378cd4a3a82cb856aa4bd54d4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_128` for a synchronous sampled input `noisy`. Update output `clean` only after observing 128 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_128 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 127) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_128", "stable_samples": 128}, "prompt_sha1": "394a34a78b19fffe334899ac40ab710ac5a70a67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_9637` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_9637 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_9637"}, "prompt_sha1": "4563880e3794ed3604a1480921e213de9706f0e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x3D25FC in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 3D 25 FC.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 4007420, "endian": "big", "bytes": [61, 37, 252]}, "prompt_sha1": "21e368cb63f349549414b121f204684e8f4d6aa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x7F5283 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 83 52 7F.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 8344195, "endian": "little", "bytes": [131, 82, 127]}, "prompt_sha1": "39c7a679f6763b7e76253390c60ee1cf4228157e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2725` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2725 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2725"}, "prompt_sha1": "97bfa8eb8e41059587d46c0bd97259f21d1599aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 16000 counts per period. What compare/high-time count produces exactly 75% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.75 × 16000 = 12000. Verification: 12000/16000 = 0.75, which is 75%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 16000, "duty": 75, "high": 12000}, "prompt_sha1": "4da6e67ac27de3bc358d74413ded311aad94145a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6596-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6596×8 = 52768 bits.\nSerialization delay = bits/rate = 52768/(1000×10^6) s = 5.2768e-05 s = 52.768000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6596, "rate_mbps": 1000, "delay_s": 5.2768e-05}, "prompt_sha1": "4197db09987c497849e0a5b2cca5637da98e6b2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^11 V = 0.00087890625 V = 878.906250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 1.8, "step": 0.00087890625}, "prompt_sha1": "15e14e01e4dadacee14ef55926467558548178b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x62, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x62<<1)|1 = 0xC5 = 11000101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 98, "rw": 1, "byte": 197}, "prompt_sha1": "fec494784bf63e4bb66653f185795891abed28e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 482-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 482×8 = 3856 bits.\nSerialization delay = bits/rate = 3856/(5000×10^6) s = 7.712e-07 s = 0.771200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 482, "rate_mbps": 5000, "delay_s": 7.712e-07}, "prompt_sha1": "90880ef3a42ac519a5b729d975894e9b69223ea5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×2/1000/8 = 1250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 2, "bytes": 1250000.0}, "prompt_sha1": "c3466f97c67033fd562cfe991a841d65689dd6cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 7 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 56 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+1 = 10. Total bits = 56×10 = 560. Time = 560/115200 = 0.00486111111 s = 4.861111 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 7, "parity": 1, "stop": 1, "frames": 56, "seconds": 0.004861111111111111}, "prompt_sha1": "e6a5d86dc7d75afee80cb6c42a46418dd994ae81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5587-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5587×8 = 44696 bits.\nSerialization delay = bits/rate = 44696/(25000×10^6) s = 1.78784e-06 s = 1.787840 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5587, "rate_mbps": 25000, "delay_s": 1.78784e-06}, "prompt_sha1": "f832e57b82786ced73677b60f8e357189c372d20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 108, and period is 17152 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(108×17152) = 4.318684 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 108, "period": 17152, "hz": 4.318684355997789}, "prompt_sha1": "85b9d964b2f8bf20758fe492c98dda1d03f6c982", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_32_8_13` with RED, GREEN, YELLOW states. Hold RED for 32 clock cycles, GREEN for 8, and YELLOW for 13; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_32_8_13 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 31) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 7) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 12) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_32_8_13", "red": 32, "green": 8, "yellow": 13}, "prompt_sha1": "dc40280accb3a13e08c683ffe6bde2d4d38a2cca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 33-bit right-shift register module `shiftreg_right_33`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `33-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_33 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [32:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[32:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_33", "width": 33, "direction": "right"}, "prompt_sha1": "10074f46d35a2129a2777b924211089cf727f4e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5720` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5720 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5720"}, "prompt_sha1": "0681aefacf51d484c5de1687c43c71c7b3002bc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 0.75 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×0.75/(0.5×10^9) = 0.75 s = 750.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 0.75, "ghz": 0.5, "sec": 0.75}, "prompt_sha1": "f936b5e2853f378a4feb17f9839773a9ba98f862", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [17, 6, 2]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [25, 14, 6].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [17, 6, 2], "finish": [25, 14, 6]}, "prompt_sha1": "e36d6fd66dd7166cb2ae5b00b3442b5bd664628b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_5_45_10` with RED, GREEN, YELLOW states. Hold RED for 5 clock cycles, GREEN for 45, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_5_45_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 4) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 44) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_5_45_10", "red": 5, "green": 45, "yellow": 10}, "prompt_sha1": "1e15c72a1f20edf94ac7a21f9bc2c51893e017e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 40 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 40 MHz / 64 = 0.625000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 40000000.0, "divider": 64, "spi_hz": 625000.0}, "prompt_sha1": "f144df6ad834b799523abfc84a3075c3aa5c514b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 8` on one shared integer without synchronization. Assume `events` initially equals 71. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 71; T2 reads 71; both compute 79; T1 writes 79; T2 writes 79. The observed final value is 79, but two serial increments would produce 87.\n\n```\nlock(mutex)\nevents = events + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "38dbe173a600dbd8faba82c8ca47a63a59819422", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_202` generating a one-clock-cycle `tick` every 202 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_202 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 201) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_202", "divide": 202}, "prompt_sha1": "a547c85eccaf7e0d81abbc7c3c7d7c579a12bab7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/470=0.0255319149 A. P=V²/R=12²/470=0.306382979 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 470, "i": 0.02553191489361702, "p": 0.30638297872340425}, "prompt_sha1": "c6370c84dbf58f803c3e2724efeb8e0880595b19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 32-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/32 = 4096.\nOffset bits = log2(32) = 5.\nIndex bits = log2(4096) = 12.\nTag bits = 36-12-5 = 19.\nCheck: 19+12+5 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 32, "addr_bits": 36, "lines": 4096, "offset_bits": 5, "index_bits": 12, "tag_bits": 19}, "prompt_sha1": "f1b31dd7c6876ca7ff00cd605e39468358995995", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 63 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 63 = 65.\nClock pulses = 65×9 = 585.\nTime = 585/1000000 s = 585.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 63, "clocks": 585, "time_s": 0.000585}, "prompt_sha1": "7b3191e26b0713fb7df60e8b696ccc8a304d7f50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock B then QUEUE; T2 acquires QUEUE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds B while waiting for QUEUE, while T2 holds QUEUE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "f52495c270f8799c2d5fd83ccaaa1a32447ce521", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `samples` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `buf[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "3cb1b1bcd57f727fcb813f084320b6835995a4f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4026` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4026 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4026"}, "prompt_sha1": "d5aaeec3109b231ac228573ab5868194dfdeb3da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2936(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2936(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2936([1, 2]) == 1.5\nassert mean_2936([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2936"}, "prompt_sha1": "eb06b1c9ca9ce9bc61dcba386c9ab59722726691", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 8%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.080 × 5 = 0.080000.\nEffective CPI = 1.2 + 0.080000 = 1.280000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.08, "penalty": 5, "result": 1.28}, "prompt_sha1": "c9b1a4b61fb7fc0babe5ff9a9688b807b356cc6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 26 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 26×11 = 286. Time = 286/921600 = 0.000310329861 s = 0.310330 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 7, "parity": 1, "stop": 2, "frames": 26, "seconds": 0.0003103298611111111}, "prompt_sha1": "a94672058bb383fa6711f521e01b6597fd47c4b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 110100110010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110100110010", "ones": 6, "parity": 0}, "prompt_sha1": "468bff89c15749b0e810a6915c4299cf1097f516", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=100 nF and is stepped to 2.5 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=2.5(1-e^-2)=2.161662 V; τ=4.7e-05 s and t=9.4e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1.0000000000000001e-07, "multiple": 2, "vin": 2.5, "vc": 2.161661791908468}, "prompt_sha1": "9440beb63619c25602b7f150bc7f406df1f06d9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w56_unsigned` comparing two 56-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w56_unsigned (\n input logic [55:0] a,\n input logic [55:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w56_unsigned", "width": 56, "signed": false}, "prompt_sha1": "b5cb1dc1ad1269a3abf7fb7d6eafa9811fec3e7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_127_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 127 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_127_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd127;\n end else begin\n if (pulse_in)\n count <= 7'd127;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_127_retrig", "cycles": 127, "retrigger": true}, "prompt_sha1": "1993677a5b9a5f22cf1d4d9b6c49f2842f5fd1b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_45` for a 45-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_45 (\n input logic [44:0] data,\n input logic [5:0] shamt,\n output logic [44:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_45", "width": 45, "direction": "left", "arithmetic": false}, "prompt_sha1": "26d1abe3fa5e0023a6fa30ce3739a5b334cf8547", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (512×8) = 4882.812500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 512, "pps": 4882.8125}, "prompt_sha1": "9529ee97c0e6697c4ba40558df0d10966f6345f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 480 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 480 = 336. Verification: 336/480 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 480, "duty": 70, "high": 336}, "prompt_sha1": "4665abec3a8dcb3bfef6ec915f84ad9e463c787f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.76. Using Amdahl's law, compute the theoretical speedup on 5 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.76) + 0.76/5) = 2.551020.\nThe theoretical speedup is about 2.551×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.76, "n": 5, "result": 2.5510204081632653}, "prompt_sha1": "b8c52bb52b130ee9fb7bd65456f157e0a7216de2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 5 = 0.112500.\nEffective CPI = 1.2 + 0.112500 = 1.312500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.15, "penalty": 5, "result": 1.3125}, "prompt_sha1": "2cc6b3634381cce584ae81b069f4884ae10dbae5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=25 ms, C=2 ms,T=40 ms, C=2 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/25 + 2/40 + 2/100 = 0.190000 = 19.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 25], [2, 40], [2, 100]], "utilization": 0.19}, "prompt_sha1": "f721b038f6aa94b989c06b58f8cb655fc8fdab0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 18 elements. Review loop `for i in range(18+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(18+1)` includes index 18, which is out of range for a length-18 sequence. Correct loop: `for i in range(18):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 18, "variant": "one_past"}, "prompt_sha1": "1f3745fa8c28a7efe2b09483695f6d434cc5b6c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22000 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/22000=0.00109090909 A. P=V²/R=24²/22000=0.0261818182 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 22000, "i": 0.001090909090909091, "p": 0.02618181818181818}, "prompt_sha1": "484b037883927b76643f272493b142a0726ec0d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 800 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 1876 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×1876/(800×10^6) = 0.011725 = 1.172500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 800, "irq_hz": 5000, "cycles": 1876, "load": 0.011725}, "prompt_sha1": "ba4b492812085bbffb02bd864a1e7dd3e0766ec1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `len` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `buf[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "17f6f2fa6ab48590a3dc0cb926a57cc7da4e86df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.53. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.53) + 0.53/192) = 2.115236.\nThe theoretical speedup is about 2.115×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.53, "n": 192, "result": 2.1152363115566817}, "prompt_sha1": "ada47bb729e3d5fe57f8fac43718bf79798ddf85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 1600 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×1600×10^6×3 = 24.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 1600, "channels": 3, "gbps": 24.0}, "prompt_sha1": "239019350136188d3a232b7b98f523be42ab61a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 256 KiB direct-mapped data cache with 32-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 256 KiB = 262144 bytes.\nLines = 262144/32 = 8192.\nOffset bits = log2(32) = 5.\nIndex bits = log2(8192) = 13.\nTag bits = 40-13-5 = 22.\nCheck: 22+13+5 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 262144, "line": 32, "addr_bits": 40, "lines": 8192, "offset_bits": 5, "index_bits": 13, "tag_bits": 22}, "prompt_sha1": "e4cb4079b84637ae83b1b253d8c9cf8e8847f422", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=120000 ohm and C=47000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=120000×47000×10^-12 s = 0.00564 s.\nf_c=1/(2πRC)=1/(2π×120000×47000×10^-12) = 28.2190 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 120000, "c_f": 4.7e-08, "tau": 0.00564, "fc": 28.218961541116197}, "prompt_sha1": "240f74d33bd6a06fd0d0ab2af3a06599feec4e61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 11 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["P", "P", "V", "P", "P", "V", "V", "V", "P", "P", "V", "P", "P", "V", "V", "V", "V", "V", "P", "V"], "value": 11, "blocked": 0}, "prompt_sha1": "4a67e31c806bcb783ab3f86d36270003b57525ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=10 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×2.2/(10+2.2) = 0.901639 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 10, "r2": 2.2, "vout": 0.9016393442622951}, "prompt_sha1": "81ef32218c4cc50238127302f6328044f6990e36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 220 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00022×9²=0.00891 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00021999999999999998, "v": 9, "energy": 0.00891}, "prompt_sha1": "4e0ee4e6528f001f5464f8818743474f51bb46ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551551; x = x + 139;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551551+139 = 18446744073709551690. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551690) mod 2^64 = 74. So `x` stores 74. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551551, "add": 139, "result": 74}, "prompt_sha1": "ee574119480f7dc6623c74984481c3d29d5e7cce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 128-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/128 = 8.\nOffset bits = log2(128) = 7.\nIndex bits = log2(8) = 3.\nTag bits = 24-3-7 = 14.\nCheck: 14+3+7 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 128, "addr_bits": 24, "lines": 8, "offset_bits": 7, "index_bits": 3, "tag_bits": 14}, "prompt_sha1": "abd9241eb94d00ce2c2ea45c568c1da751b6da4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_1936` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_1936 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_1936"}, "prompt_sha1": "172db89f2085580877cf7ffb4f700fb37e50b58b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1111111111111010100001 using generator polynomial bits 110101. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 01100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 53, "msg_bits": 22, "msg": 4193953, "remainder": 12}, "prompt_sha1": "c2f5b1dc677eb21c50ec950b5f9e8942c433e35e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 48 MHz and must generate an exact 10000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 48000000/10000 = 4800.\nWith prescaler divisor limited to at most 64, the largest divisor of 4800 that also keeps the period count within 16 bits is 64.\nPeriod count = 4800/64 = 75.\nPSC register = 64-1 = 63.\nARR register = 75-1 = 74.\nVerification: 48000000/(64×75) = 10000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 48000000, "target_hz": 10000, "total_division": 4800, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 75, "psc_reg": 63, "arr_reg": 74}, "prompt_sha1": "32331d12589afe1017afa214f0008c6d54817b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 49 and initial occupancy is 10. In an abstract batch, producer attempts to enqueue 181 items first, dropping any excess beyond capacity; then consumer removes up to 3 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=49, dropped=142; consumed=3; final occupancy=46.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 49, "start": 10, "prod": 181, "cons": 3, "dropped": 142, "consumed": 3, "final": 46}, "prompt_sha1": "94c40cedc95d97fc1818437a42bf91f21a12c3d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-20 = 1260 bytes.\nRound down to an 8-byte multiple: floor((1260)/8)×8 = 1256 bytes.\nFragments required = ceil(3000/1256) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 20, "payload": 3000, "max_payload": 1256, "fragments": 3}, "prompt_sha1": "b2e5b2da7751e26ec20b9599ab465dceeb70a76d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 50 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 50/1000 = 1.25e+09 bits = 1.5625e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 50, "bits": 1250000000.0, "bytes": 156250000.0}, "prompt_sha1": "4052975761b97bc16a3c36ce5185a17c35652d14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 43 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 43×11 = 473. Time = 473/2400 = 0.197083333 s = 197.083333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 8, "parity": 0, "stop": 2, "frames": 43, "seconds": 0.19708333333333333}, "prompt_sha1": "64fa919ef5675d074644d6c463b06572002c70d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_125` generating a one-clock-cycle `tick` every 125 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_125 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 124) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_125", "divide": 125}, "prompt_sha1": "c09790692f824df6e12861b0530a8d174715cad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.57. Using Amdahl's law, compute the theoretical speedup on 2 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.57) + 0.57/2) = 1.398601.\nThe theoretical speedup is about 1.399×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.57, "n": 2, "result": 1.3986013986013985}, "prompt_sha1": "a177765296154581200563262068fd557805718c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 384 payload bytes plus 80 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 384/(384+80) = 0.827586 = 82.76%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 384, "overhead": 80, "efficiency": 0.8275862068965517}, "prompt_sha1": "75bbcac132c45dbc72941d5c55df5934746a4cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×1.8²=3.564e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 1.8, "energy": 3.5640000000000004e-05}, "prompt_sha1": "63bbffa5f2e7b5e51d1624b40c62a79c78dcbddc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_10` for a 10-bit unsigned input `data`, `4-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_10 (\n input logic [9:0] data,\n input logic [3:0] shamt,\n output logic [9:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_10", "width": 10, "direction": "right", "arithmetic": false}, "prompt_sha1": "b7905938fef134a617803e4f287307cfc8dee5f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 45% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.45 × 80 = 36. Verification: 36/80 = 0.45, which is 45%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 45, "high": 36}, "prompt_sha1": "f40b817c13b6cccbe8a699c331b111f1c6583a9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['V', 'V', 'P', 'V', 'P', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'P', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["V", "V", "P", "V", "P", "P", "P", "V", "V", "V", "P", "V", "P", "P", "P", "P", "V", "V", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "252b0ef39a52db1de5cf2b8ea78efcb273be3dc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_3_2_7` with RED, GREEN, YELLOW states. Hold RED for 3 clock cycles, GREEN for 2, and YELLOW for 7; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_3_2_7 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [2:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 2) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 1) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 6) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_3_2_7", "red": 3, "green": 2, "yellow": 7}, "prompt_sha1": "1f118b607292ae833ecde63918b2e0df1499a6fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=100 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×4.7/(100+4.7) = 0.538682 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 100, "r2": 4.7, "vout": 0.5386819484240688}, "prompt_sha1": "38f48d268bb4aeb2f55b28e4190f1d0f76177441", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 192 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 192 = 48. Verification: 48/192 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 192, "duty": 25, "high": 48}, "prompt_sha1": "a68fd5c956b34de292af1aa407fea6fa512567e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.76. Using Amdahl's law, compute the theoretical speedup on 256 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.76) + 0.76/256) = 4.115756.\nThe theoretical speedup is about 4.116×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.76, "n": 256, "result": 4.115755627009647}, "prompt_sha1": "6c04169e5ed235b4e3c14e86fbc01217edd91663", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 2113 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×2113/(240×10^6) = 0.00880416667 = 0.880417%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 1000, "cycles": 2113, "load": 0.008804166666666667}, "prompt_sha1": "4cd055af0cfee804965e0e59421fba6e703a0064", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.78.211.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.78.211.0\nBroadcast address: 10.78.211.31\nUsable host range: 10.78.211.1 to 10.78.211.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.78.211.0/27", "usable": 30, "first": "10.78.211.1", "last": "10.78.211.30", "broadcast": "10.78.211.31"}, "prompt_sha1": "17258497df4bc64033787c4a5fb9848ef17c7393", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 55% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.55 × 80 = 44. Verification: 44/80 = 0.55, which is 55%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 55, "high": 44}, "prompt_sha1": "0601cdb7dd229947e316f4e0b68a528025cebef3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 8-way set-associative cache uses 128-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/128 = 64.\nSets = 64/8 = 8.\nOffset bits = log2(128) = 7; index bits = log2(8) = 3; tag bits = 64-7-3 = 54.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 128, "ways": 8, "addr_bits": 64, "lines": 64, "sets": 8, "offset": 7, "index": 3, "tag": 54}, "prompt_sha1": "87ce3dde9669fbf6ae9a211c061643fcc78445fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x35, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x35<<1)|1 = 0x6B = 01101011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 53, "rw": 1, "byte": 107}, "prompt_sha1": "e4dd5b433232053aaf98d2d3edf74e263f544be3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTTTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 1, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "d7c5e5ae79e0f7e72c5cce56b5d9488567bc8d84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.187.95.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.187.95.0\nBroadcast address: 10.187.95.63\nUsable host range: 10.187.95.1 to 10.187.95.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.187.95.0/26", "usable": 62, "first": "10.187.95.1", "last": "10.187.95.62", "broadcast": "10.187.95.63"}, "prompt_sha1": "4c01b10d147a2f16711258955edb1feef470489c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2746401634, carries 5846 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5846+1+0 = 5847. ACK = (2746401634+5847) mod 2^32 = 2746407481.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2746401634, "payload": 5846, "syn": 1, "fin": 0, "ack": 2746407481}, "prompt_sha1": "3e48cbfbbf9b7289046fdc1b4c06add95eb16563", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/10 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 10, "tau": 0.01}, "prompt_sha1": "16ca8c782bbf68e516ec7750cef7688eee9a4e09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'P', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "P", "V", "V", "V", "P"], "value": 5, "blocked": 0}, "prompt_sha1": "71ad6833540730b991282e07f4199f30b5f7cd85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_56` for a synchronous sampled input `noisy`. Update output `clean` only after observing 56 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_56 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 55) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_56", "stable_samples": 56}, "prompt_sha1": "75fced1e24dd031efea8ba6dc0f8ad90183868ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m84` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 84 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m84 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd84;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m84", "width": 7, "max": 84}, "prompt_sha1": "a8c1bc6d79f5e151a2cde7c8b2c403fa5ff8ba6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 40 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 40-21 = 19.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 40, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 19}, "prompt_sha1": "093405eb3bd6e4a82e347943aa6f701b53fb40a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=47 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/22 = -2.136364.\nVout = A_v×Vin = -2.136364×0.25 = -0.534091 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 47, "vin": 0.25, "gain": -2.1363636363636362, "vout": -0.5340909090909091}, "prompt_sha1": "9961ce77233b8f065dadf955bbb70a71cd9ca008", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 97%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.100×(10+0.030×40) = 2.320000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.9, "l2": 10, "l2_hit": 0.97, "mem": 40, "amat": 2.32}, "prompt_sha1": "5c1fbdcac3dc888e50ae4c0abc5ea6ab1fad29f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8904 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8904/(8904+20+8) = 0.996865 = 99.69%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8904, "iphdr": 20, "eff": 0.9968652037617555}, "prompt_sha1": "245691816f836899510aff5c870fcde7b4be7353", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_53_msb` for `53-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_53_msb (\n input logic [52:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 53; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_53_msb", "width": 53, "priority": "high"}, "prompt_sha1": "5a2ace3f8aacfd444cea51d4bc4c632ad7515af4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 128-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/128 = 256.\nOffset bits = log2(128) = 7.\nIndex bits = log2(256) = 8.\nTag bits = 32-8-7 = 17.\nCheck: 17+8+7 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 128, "addr_bits": 32, "lines": 256, "offset_bits": 7, "index_bits": 8, "tag_bits": 17}, "prompt_sha1": "19a4bdde812975be762d1fac5be06f0476be5a46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 3200 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×3200×10^6×6 = 19.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 3200, "channels": 6, "gbps": 19.2}, "prompt_sha1": "323a75b721d8ed885c1fe4ae723c85bd7b03b8e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_11_6_9` with RED, GREEN, YELLOW states. Hold RED for 11 clock cycles, GREEN for 6, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_11_6_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 10) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 5) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_11_6_9", "red": 11, "green": 6, "yellow": 9}, "prompt_sha1": "3d6df475f9ae2256b3bea3354042890a17d70540", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 37101 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 37101/10000 s; frequency = 10000/37101 = 0.269535 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 37101, "hz": 0.26953451389450417}, "prompt_sha1": "11b9adbd520fd9dcfa32e7c40bfeb4425faf939d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=47 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×2.2/(47+2.2) = 0.223577 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 47, "r2": 2.2, "vout": 0.22357723577235772}, "prompt_sha1": "af20a922a70e29831aa6b143dd9955b1a928c8a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×150/1000/8 = 187500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 150, "bytes": 187500000.0}, "prompt_sha1": "e769bf5a52b8d6281f90e4acab48300339ffb493", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x8_no_bypass` with 16 entries of 8 bits. Inputs: `clk`, `we`, `4-bit waddr`, `8-bit wdata`, `4-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [7:0] wdata,\n input logic [3:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x8_no_bypass", "entries": 16, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "4890837f59599491c9eebb3de1cf66eab1c048eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5407-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5407×8 = 43256 bits.\nSerialization delay = bits/rate = 43256/(25000×10^6) s = 1.73024e-06 s = 1.730240 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5407, "rate_mbps": 25000, "delay_s": 1.73024e-06}, "prompt_sha1": "b82140583318119c50b75e3b31feac9872668463", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=8200 ohm and C=6800 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=8200×6800×10^-12 s = 5.576e-05 s.\nf_c=1/(2πRC)=1/(2π×8200×6800×10^-12) = 2854.2852 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 8200, "c_f": 6.8e-09, "tau": 5.5759999999999995e-05, "fc": 2854.2852060956843}, "prompt_sha1": "d24195d2b5b07673c40d571037f6a650409399a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=2.2 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/47 = -0.046809.\nVout = A_v×Vin = -0.046809×1 = -0.046809 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 2.2, "vin": 1.0, "gain": -0.04680851063829788, "vout": -0.04680851063829788}, "prompt_sha1": "c870002ea72cff301432911e436a223fe111a91d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 85%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.050×(3+0.150×60) = 1.400000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.95, "l2": 3, "l2_hit": 0.85, "mem": 60, "amat": 1.4000000000000008}, "prompt_sha1": "fc9991c5b4d9fd27c2954070388ea0c96f9e1362", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 673 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×673/(24×10^6) = 0.0140208333 = 1.402083%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 500, "cycles": 673, "load": 0.014020833333333333}, "prompt_sha1": "911fb66c4699595fd00332f248df8c5c0b340888", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 90.6% hit rate, and a 175 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.906 = 0.094.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.094×175 ns = 20.9500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.906, "penalty": 175, "result": 20.949999999999996}, "prompt_sha1": "f59311cc319f07e7bac8296672010ec75466a5ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 1.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+12 = 13.5. Period = 13.5/64000000 = 2.109375e-07 s. Maximum rate = 1/period = 4740740.740741 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 1.5, "conv_cycles": 12, "period": 2.109375e-07, "rate": 4740740.740740741}, "prompt_sha1": "8e3fb6c8de047b42133dfde0b4bd7525c0c12563", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5822-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5822×8 = 46576 bits.\nSerialization delay = bits/rate = 46576/(2500×10^6) s = 1.86304e-05 s = 18.630400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5822, "rate_mbps": 2500, "delay_s": 1.86304e-05}, "prompt_sha1": "af08ba2f7eacb841f053f38c3ba732030e3f61b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 2-way set-associative cache uses 256-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/256 = 2048.\nSets = 2048/2 = 1024.\nOffset bits = log2(256) = 8; index bits = log2(1024) = 10; tag bits = 52-8-10 = 34.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 256, "ways": 2, "addr_bits": 52, "lines": 2048, "sets": 1024, "offset": 8, "index": 10, "tag": 34}, "prompt_sha1": "5facd267d0f663b94a904a1bd2a3d9f5297b7875", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 8-way set-associative cache uses 32-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/32 = 4096.\nSets = 4096/8 = 512.\nOffset bits = log2(32) = 5; index bits = log2(512) = 9; tag bits = 32-5-9 = 18.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 32, "ways": 8, "addr_bits": 32, "lines": 4096, "sets": 512, "offset": 5, "index": 9, "tag": 18}, "prompt_sha1": "736f205e720ac0d9625e5838f356959808487fa5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×12²=0.0072 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 12, "energy": 0.0072}, "prompt_sha1": "28e019577da85755249072e7e2fb6634fc1ab260", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8436` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8436 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8436"}, "prompt_sha1": "d79af82062f3c7a395b8853bbfc1f006a229a4ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×2048 KiB = 196608 KiB = 201326592 bytes = 192.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 2048, "reach": 201326592}, "prompt_sha1": "cf80cfd6d4f08ff922e458c45d89aed84b8a3794", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 51 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 51-20 = 31.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 51, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 31}, "prompt_sha1": "e203aa5da2bcc624e9135909542da209693fbdab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 48 MHz. Sampling consumes 2.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+12 = 14.5. Period = 14.5/48000000 = 3.02083333e-07 s. Maximum rate = 1/period = 3310344.827586 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 48000000.0, "sample_cycles": 2.5, "conv_cycles": 12, "period": 3.0208333333333334e-07, "rate": 3310344.827586207}, "prompt_sha1": "80cc36d0197c2bcee2f50ad6ea9866cc6370afe0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x9E547A7D41C3 in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C3 41 7D 7A 54 9E.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 174085669470659, "endian": "little", "bytes": [195, 65, 125, 122, 84, 158]}, "prompt_sha1": "998ed5240ffd03ddec775520767955c9c041ae31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=100 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/22 = -4.545455.\nVout = A_v×Vin = -4.545455×0.2 = -0.909091 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 100, "vin": 0.2, "gain": -4.545454545454546, "vout": -0.9090909090909092}, "prompt_sha1": "9145728af915ee2b9eb0b513ae348bae4a29f1d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `samples` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `table[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "224dc92eec2ba8328f96fd3e3ac74ad2bdf8acd5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2747-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2747×8 = 21976 bits.\nSerialization delay = bits/rate = 21976/(10×10^6) s = 0.0021976 s = 2197.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2747, "rate_mbps": 10, "delay_s": 0.0021976}, "prompt_sha1": "1b09482ebaa6099b1362897fbaceda5a011fbd2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (2000×8) = 125.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 2000, "pps": 125.0}, "prompt_sha1": "caed8367936cd0f1e1bac75153b02e2d62857449", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x2F7922B02B in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 2F 79 22 B0 2B.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 203895779371, "endian": "big", "bytes": [47, 121, 34, 176, 43]}, "prompt_sha1": "49ee3cf7104cab13229203ffc4f670eb3c3f24fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xB8A076 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: B8 A0 76.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 12099702, "endian": "big", "bytes": [184, 160, 118]}, "prompt_sha1": "75535122601add9cc2ff9fa1cc8435b6af841e25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 2 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×10×10^6 = 20000000 B/s. Time = 1048576/20000000 = 0.0524288 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 2, "rate_mhz": 10, "sec": 0.0524288}, "prompt_sha1": "d7e73140f24150f405e750d333eb3d17dfbec565", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=10 nF and is stepped to 9 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=9(1-e^-0.5)=3.541224 V; τ=0.0001 s and t=5e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 1e-08, "multiple": 0.5, "vin": 9, "vc": 3.5412240625862994}, "prompt_sha1": "313b7e879b03829c8ea92330857e6a53ea98d401", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock B then BUF; T2 acquires BUF then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds B while waiting for BUF, while T2 holds BUF while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before BUF. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "60bb028c64590c36e9e9f48b850bb61d8790f2f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2377(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2377(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2377([1, 2]) == 1.5\nassert mean_2377([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2377"}, "prompt_sha1": "8db16165bd20275921deb0a8d459ed9a5f4d099a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=4.7 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×22/(4.7+22) = 4.119850 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 4.7, "r2": 22, "vout": 4.119850187265918}, "prompt_sha1": "ee626eda8259c608d1d842b52f80f8cd19a4ce23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11011100111001000000111 using generator polynomial bits 1111. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 15, "msg_bits": 23, "msg": 7238151, "remainder": 5}, "prompt_sha1": "687580f38d4dcd55b6e8798191981a89fd3693f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 57 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 57-20 = 37.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 57, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 37}, "prompt_sha1": "04c0c8809a4f3600186f866e506105449e0f9ff5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w16_8738` implementing a dual-clock asynchronous FIFO with depth 128 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w16_8738 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 16,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w16_8738", "depth": 128, "width": 16, "ptr_w": 7}, "prompt_sha1": "da301ad69e5d015529d8a559c0867e05fed748d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_3471` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_3471 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_3471"}, "prompt_sha1": "08697dfead06531c828e411665b5af1c7fb374bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_8903` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_8903 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_8903", "width": 3}, "prompt_sha1": "03551fe5b54b7f4ae24ba3819748bf3a4760fee3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m30956` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 30956 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m30956 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd30956;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m30956", "width": 15, "max": 30956}, "prompt_sha1": "84071f404e315758ff94929a83467ba919ccdf56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1293 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "99611ff250769b04ef905606e33ebd7975c3fb9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 16 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 16×13 = 208. Time = 208/1000000 = 0.000208 s = 0.208000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 9, "parity": 1, "stop": 2, "frames": 16, "seconds": 0.000208}, "prompt_sha1": "bba21379e0a807824d023625121be33c46f48283", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 108 and initial occupancy is 105. In an abstract batch, producer attempts to enqueue 78 items first, dropping any excess beyond capacity; then consumer removes up to 80 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=108, dropped=75; consumed=80; final occupancy=28.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 108, "start": 105, "prod": 78, "cons": 80, "dropped": 75, "consumed": 80, "final": 28}, "prompt_sha1": "d6e632cf2da0cf626b82c0374b63067533a20097", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=1 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×47/(1+47) = 11.750000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 1, "r2": 47, "vout": 11.75}, "prompt_sha1": "ca8561c97ebd0bdcadb84c62ba5794d7d53eac6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(5×10^6) s = 1.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 8, "time_us": 1.5999999999999999}, "prompt_sha1": "98c3ee51808588058ba65113d82051497218e9d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_33` for a 33-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_33 (\n input logic [32:0] data,\n input logic [5:0] shamt,\n output logic [32:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_33", "width": 33, "direction": "left", "arithmetic": false}, "prompt_sha1": "2fbd5d05ec8efabfd5aaf8fde9763e5198d98d5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 16 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 16000000/8000 = 2000.\nWith prescaler divisor limited to at most 128, the largest divisor of 2000 that also keeps the period count within 16 bits is 125.\nPeriod count = 2000/125 = 16.\nPSC register = 125-1 = 124.\nARR register = 16-1 = 15.\nVerification: 16000000/(125×16) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 16000000, "target_hz": 8000, "total_division": 2000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 16, "psc_reg": 124, "arr_reg": 15}, "prompt_sha1": "e9890c17ee1bd70550531983e37f04b99b6db8b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 51 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 51 = 53.\nClock pulses = 53×9 = 477.\nTime = 477/100000 s = 4770.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 51, "clocks": 477, "time_s": 0.00477}, "prompt_sha1": "13864509debff2f98e7ec8db2ba11793068ff601", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 2 = 18.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 2, "spi_hz": 18000000.0}, "prompt_sha1": "15c1ac0f65d18b7a5cd35cb61bf7b1d5a0452933", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 800 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×800×10^6×8 = 204.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 800, "channels": 8, "gbps": 204.8}, "prompt_sha1": "b273898ca43dc94e5bf7b659524464fa37b3d3cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_2188` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_2188 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_2188", "width": 32}, "prompt_sha1": "2777632b3bbd5b28227fc822a8983eaabf4f216e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 604, and period is 35086 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(604×35086) = 7.550039 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 604, "period": 35086, "hz": 7.550038826074663}, "prompt_sha1": "0f4e1c9d1ec7946fce54051130826153191efdd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `n` elements of type `float`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `table[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "64b62f793d02991cc3552cb250eb7e74349eb0e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 1600 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/1600 = 15625.\nWith prescaler divisor limited to at most 8192, the largest divisor of 15625 that also keeps the period count within 16 bits is 3125.\nPeriod count = 15625/3125 = 5.\nPSC register = 3125-1 = 3124.\nARR register = 5-1 = 4.\nVerification: 25000000/(3125×5) = 1600 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 1600, "total_division": 15625, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 3125, "period": 5, "psc_reg": 3124, "arr_reg": 4}, "prompt_sha1": "7b519d3f3b4e894f19c4f030656189da2b15edcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4623 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4623/(4623+40+8) = 0.989724 = 98.97%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4623, "iphdr": 40, "eff": 0.989723827874117}, "prompt_sha1": "304cb66840dae189a64a73490a0032b70b716c8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 1 MHz, prescaler divisor is 53, and period is 21102 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 1000000/(53×21102) = 0.894130 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 1000000, "prescaler": 53, "period": 21102, "hz": 0.8941296809924124}, "prompt_sha1": "a14f9f71f1fe5ccb7bf1d11da620492998bb41a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock BUF then L1; task_B acquires L1 then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds BUF while waiting for L1, while task_B holds L1 while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2f37b5b6c529dd7955af27d74fb76704038fdadc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×16 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 16, "reach": 8388608}, "prompt_sha1": "fab17c82ace7be5e2a4845b946a2f641fed1339c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 21-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^21 V = 5.96046447754e-07 V = 0.596046 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 21, "vref": 1.25, "step": 5.960464477539062e-07}, "prompt_sha1": "6540542324648e3d71693c407c1ab3c3515d6429", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-24 = 552 bytes.\nRound down to an 8-byte multiple: floor((552)/8)×8 = 552 bytes.\nFragments required = ceil(5000/552) = 10.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 24, "payload": 5000, "max_payload": 552, "fragments": 10}, "prompt_sha1": "d5bc8758f392bbd3a71fc70473e0425651d40d5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 111110000010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "111110000010", "ones": 6, "parity": 0}, "prompt_sha1": "ead9611b25d2b8eccd8897c839be90db515b6945", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_122` for a synchronous sampled input `noisy`. Update output `clean` only after observing 122 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_122 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 121) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_122", "stable_samples": 122}, "prompt_sha1": "eb9d4cb9e7c6af7e4ceda25b11617bf521617299", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/1000=0.001 A. P=V²/R=1²/1000=0.001 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 1000, "i": 0.001, "p": 0.001}, "prompt_sha1": "d6e4060c65ce19208b2c179804e9186aca9da700", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2000 Hz satisfies it.", "output": "Nyquist minimum is 2×500 = 1000 Hz. Proposed rate 2000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500, "min_fs": 1000, "proposed": 2000}, "prompt_sha1": "86ab6cb1d25e99add8583391affa7077b82645f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [29, 29, 11, 28]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [80, 89, 61, 97].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [29, 29, 11, 28], "finish": [80, 89, 61, 97]}, "prompt_sha1": "6d0ac093e96f0e32ca7cec895c7eefe465bbe2e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 32 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 32 MHz / 16 = 2.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 32000000.0, "divider": 16, "spi_hz": 2000000.0}, "prompt_sha1": "7067a1fcafcf5d89c8800c0d30cf05604b400142", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 700, and period is 9874 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(700×9874) = 10.416968 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 700, "period": 9874, "hz": 10.416968083567232}, "prompt_sha1": "5cbc391c1544baf94bcd4dd590a5358b1b2a0b51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 44 elements. Review loop `for i in range(44+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(44+1)` includes index 44, which is out of range for a length-44 sequence. Correct loop: `for i in range(44):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 44, "variant": "one_past"}, "prompt_sha1": "f04fd5b7b7886b7142b0439d4b042070db53a884", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w55_nocin` implementing a 55-bit unsigned adder with inputs `a`, `b` and outputs `55-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w55_nocin (\n input logic [54:0] a,\n input logic [54:0] b,\n output logic [54:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w55_nocin", "width": 55, "cin": false}, "prompt_sha1": "a17abd44acf5c40d0e2a32282f5fd548f507c110", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9062` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9062 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9062"}, "prompt_sha1": "b6de8a4627f2534583dbecf82a80cc743e54ab9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 2-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/256 = 4096.\nSets = 4096/2 = 2048.\nOffset bits = log2(256) = 8; index bits = log2(2048) = 11; tag bits = 32-8-11 = 13.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 256, "ways": 2, "addr_bits": 32, "lines": 4096, "sets": 2048, "offset": 8, "index": 11, "tag": 13}, "prompt_sha1": "c3292dd81e18e6f1887b8de1b166fe2d010247fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3.3 V reference and returns code 116. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 116/255 × 3.3 V = 1.501176 V.\nThus the estimated input is about 1.5012 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.3, "code": 116, "volts": 1.5011764705882351}, "prompt_sha1": "0e75af062cbcfb8f614af264ef0d126cc9d5b151", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 46-bit right-shift register module `shiftreg_right_46`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `46-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_46 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [45:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[45:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_46", "width": 46, "direction": "right"}, "prompt_sha1": "1d1d80c4fcc8ccfe1dfeaf3c1e3ed8b272e74431", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2700 ohm and C=6800 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2700×6800×10^-12 s = 1.836e-05 s.\nf_c=1/(2πRC)=1/(2π×2700×6800×10^-12) = 8668.5699 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2700, "c_f": 6.8e-09, "tau": 1.836e-05, "fc": 8668.569885179484}, "prompt_sha1": "137c96781eb05ece6967b12b2ecf161d484030e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8500` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8500 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8500"}, "prompt_sha1": "b2eaa313ed1a1cd4ac472516ddb6581c83395477", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0101110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0101110", "ones": 4, "parity": 0}, "prompt_sha1": "e9105d2413e31487a34bc9ad04201d49bbddfaa7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 80%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.060×(15+0.200×100) = 3.100000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.94, "l2": 15, "l2_hit": 0.8, "mem": 100, "amat": 3.100000000000002}, "prompt_sha1": "e9df3ac3ed15314872e31aa29d023dd0f180117b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xCB. Extract the 4-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xCB >> 1) & 0xF = 0x5 (5).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 1, "value": 203, "mask": 15, "field": 5}, "prompt_sha1": "f3f253326b4be55bf39b90214196ca8eb48c98d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 29-bit right-shift register module `shiftreg_right_29`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `29-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_29 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [28:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[28:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_29", "width": 29, "direction": "right"}, "prompt_sha1": "a89684f8caf9ccdf4dcb1473a989c0f3e7df1538", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01110010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01110010", "ones": 4, "parity": 0}, "prompt_sha1": "26c896df54465d70c818256a9d77a70c6d5dd1b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4135743821, carries 20558 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 20558+0+1 = 20559. ACK = (4135743821+20559) mod 2^32 = 4135764380.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4135743821, "payload": 20558, "syn": 0, "fin": 1, "ack": 4135764380}, "prompt_sha1": "f9ffcb75698dd8fe2287a7dfe7101d94969200e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1000 Mbit/s and RTT 5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1000×10^6 × 5/1000 = 5e+06 bits = 625000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1000, "rtt_ms": 5, "bits": 5000000.0, "bytes": 625000.0}, "prompt_sha1": "8a66b608f2cef0869dc402383eb51323da245e6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 1, 0, 1, 1], "final_state": 3}, "prompt_sha1": "53e7a2ca679f3bd9151f03cf0caf2cb433ffe544", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_13_msb` for `13-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_13_msb (\n input logic [12:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 13; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_13_msb", "width": 13, "priority": "high"}, "prompt_sha1": "dfaa983c06c8521f866064b381ee63d072077a3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 330 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 330/(330+20+8) = 0.921788 = 92.18%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 330, "iphdr": 20, "eff": 0.9217877094972067}, "prompt_sha1": "74ab101c87071d56a69ec7d4c17a7bf5912037c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 100 MHz CPU services an interrupt at 100 Hz. Each ISR consumes 1104 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 100×1104/(100×10^6) = 0.001104 = 0.110400%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 100, "irq_hz": 100, "cycles": 1104, "load": 0.001104}, "prompt_sha1": "d2b19119ce858c3c7af8b6e0d8715875967a8c5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 2000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 10000 Hz satisfies it.", "output": "Nyquist minimum is 2×2000 = 4000 Hz. Proposed rate 10000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 2000, "min_fs": 4000, "proposed": 10000}, "prompt_sha1": "0d7847f36be2f63805d9456c8c1f4ba98ae1321f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_5_11_17` with RED, GREEN, YELLOW states. Hold RED for 5 clock cycles, GREEN for 11, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_5_11_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 4) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 10) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_5_11_17", "red": 5, "green": 11, "yellow": 17}, "prompt_sha1": "ec1d12eeaefca8cdee7726cbeea2e5a806fe3f66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 3 and tail index 1, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (3-1) mod 8 = 2. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 3, "tail": 1, "occupancy": 2}, "prompt_sha1": "e78b4d907ae290b982aad7222033a08da025777a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=220 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/47 = -4.680851.\nVout = A_v×Vin = -4.680851×0.25 = -1.170213 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 220, "vin": 0.25, "gain": -4.680851063829787, "vout": -1.1702127659574468}, "prompt_sha1": "bda2874c5c03c59c03417b8df94ea3e377fd4033", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x0022E1B758 in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 58 B7 E1 22 00.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 585217880, "endian": "little", "bytes": [88, 183, 225, 34, 0]}, "prompt_sha1": "92da9dfb117c10f84faf2a1c0fc407c4ee2105c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 3 = 0.036000.\nEffective CPI = 1 + 0.036000 = 1.036000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.08, "penalty": 3, "result": 1.036}, "prompt_sha1": "ec23b2f22e4c4d213059076bfe3712caa0a8a40f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xFE7A. Extract the 4-bit field starting at bit 9 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xFE7A >> 9) & 0xF = 0xF (15).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 4, "lsb": 9, "value": 65146, "mask": 15, "field": 15}, "prompt_sha1": "731a62b28a992d074e5581d62fd643673a38f0dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 3` on one shared integer without synchronization. Assume `counter` initially equals 320. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 320; T2 reads 320; both compute 323; T1 writes 323; T2 writes 323. The observed final value is 323, but two serial increments would produce 326.\n\n```\nlock(mutex)\ncounter = counter + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "17756cbabbf40f249679a12230f67deda7393ef2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 44246932, carries 49324 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 49324+0+1 = 49325. ACK = (44246932+49325) mod 2^32 = 44296257.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 44246932, "payload": 49324, "syn": 0, "fin": 1, "ack": 44296257}, "prompt_sha1": "3b0d2d2e985cd8c08cae46db89e62a30444bc3b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=4700 nF and is stepped to 3.3 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=3.3(1-e^-4)=3.239558 V; τ=0.001034 s and t=0.004136 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 4.7e-06, "multiple": 4, "vin": 3.3, "vc": 3.239558391667177}, "prompt_sha1": "94c8c35989c91197a0782c34eb3efc9dd235ff77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7442-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7442×8 = 59536 bits.\nSerialization delay = bits/rate = 59536/(5000×10^6) s = 1.19072e-05 s = 11.907200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7442, "rate_mbps": 5000, "delay_s": 1.19072e-05}, "prompt_sha1": "53894e21f529380c8aa14cdc9ef75c6a92d2d1cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 4` on one shared integer without synchronization. Assume `events` initially equals 141. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 141; T2 reads 141; both compute 145; T1 writes 145; T2 writes 145. The observed final value is 145, but two serial increments would produce 149.\n\n```\nlock(mutex)\nevents = events + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "f7e34c28f4748ce51c24a05be6ca56045012be19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 500 million instructions at average CPI 4 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 500×10^6×4/(2×10^9) = 1 s = 1000.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 500, "cpi": 4.0, "ghz": 2.0, "sec": 1.0}, "prompt_sha1": "5c40027e5b9427a42d9f943dc726f974fff534d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['P', 'P', 'P', 'P', 'P', 'V', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["P", "P", "P", "P", "P", "V", "P", "P", "P"], "value": 2, "blocked": 0}, "prompt_sha1": "03fc75856ae17bcac21ba50d63b4d9ae9f6513e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 378 and tail index 156, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (378-156) mod 512 = 222. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 378, "tail": 156, "occupancy": 222}, "prompt_sha1": "bc7af1c2ab75f2615ca1c2853045fb75bd70febb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 2.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+16 = 18.5. Period = 18.5/12000000 = 1.54166667e-06 s. Maximum rate = 1/period = 648648.648649 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 2.5, "conv_cycles": 16, "period": 1.5416666666666666e-06, "rate": 648648.6486486486}, "prompt_sha1": "feb1c4e018fc4b49aaf7918290e054fe246b8c50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 70%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.060×(10+0.300×150) = 4.100000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.94, "l2": 10, "l2_hit": 0.7, "mem": 150, "amat": 4.100000000000003}, "prompt_sha1": "e95e1b818fbe00a809ccc6989efbf6cf30fe3078", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [28, 22, 23, 2, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [79, 71, 74, 9, 18].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [28, 22, 23, 2, 4], "finish": [79, 71, 74, 9, 18]}, "prompt_sha1": "d5f11599fdb061cfff2f7153316b462601acca89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 80 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 80000000/8000 = 10000.\nWith prescaler divisor limited to at most 128, the largest divisor of 10000 that also keeps the period count within 16 bits is 125.\nPeriod count = 10000/125 = 80.\nPSC register = 125-1 = 124.\nARR register = 80-1 = 79.\nVerification: 80000000/(125×80) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 80000000, "target_hz": 8000, "total_division": 10000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 80, "psc_reg": 124, "arr_reg": 79}, "prompt_sha1": "22b20240f5fe3f2d23115a555354a45e7a5674ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50000 Mbit/s and RTT 60 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50000×10^6 × 60/1000 = 3e+09 bits = 3.75e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50000, "rtt_ms": 60, "bits": 3000000000.0, "bytes": 375000000.0}, "prompt_sha1": "e0e27956583f858c4f7f3428a0601cc00dc6eff4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 202 and tail index 155, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (202-155) mod 256 = 47. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 202, "tail": 155, "occupancy": 47}, "prompt_sha1": "9735b0698c79f8f7b7782880bbb231aec8136382", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-32 = 544 bytes.\nRound down to an 8-byte multiple: floor((544)/8)×8 = 544 bytes.\nFragments required = ceil(6000/544) = 12.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 32, "payload": 6000, "max_payload": 544, "fragments": 12}, "prompt_sha1": "f51fff8d720ed46f0733d3a3c4f2eb83f2e8e0b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 128 = 0.562500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 128, "spi_hz": 562500.0}, "prompt_sha1": "cee478ff42992e1012ae1084c492b85e7a031066", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 100 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×100×10^6×3 = 1.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 100, "channels": 3, "gbps": 1.2}, "prompt_sha1": "9d665480fa6391d335e85370111d8a21cc0f9f43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 37611 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 37611/50000000 s; frequency = 50000000/37611 = 1329.398314 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 37611, "hz": 1329.3983143229375}, "prompt_sha1": "1ccd94a9a7cc6aea4be7d9b9edb786f3376098fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 98 and tail index 96, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (98-96) mod 512 = 2. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 98, "tail": 96, "occupancy": 2}, "prompt_sha1": "36100c5cf6cb24c38680163e82c345148116de75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(4×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 32, "time_us": 8.0}, "prompt_sha1": "63b578b373c0bb85c790c6ad8ecd808e2dfa4975", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/100 = 1e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 100, "tau": 1e-06}, "prompt_sha1": "ed435c723cc00e63857a74b3744f0d4f0eaae057", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 12 and initial occupancy is 0. In an abstract batch, producer attempts to enqueue 50 items first, dropping any excess beyond capacity; then consumer removes up to 53 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=12, dropped=38; consumed=12; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 12, "start": 0, "prod": 50, "cons": 53, "dropped": 38, "consumed": 12, "final": 0}, "prompt_sha1": "44fd57f2e4d7d5919c6489a4ce82dec5dafcb27a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2506281784, carries 1492 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 1492+0+1 = 1493. ACK = (2506281784+1493) mod 2^32 = 2506283277.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2506281784, "payload": 1492, "syn": 0, "fin": 1, "ack": 2506283277}, "prompt_sha1": "409e706ba6ef439d71a3d41300d52ffcd8bf8f8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551432; x = x + 613;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551432+613 = 18446744073709552045. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552045) mod 2^64 = 429. So `x` stores 429. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551432, "add": 613, "result": 429}, "prompt_sha1": "c742a802ba06f779f91869d3c34a1ece01b2b84d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-32 = 3968 bytes.\nRound down to an 8-byte multiple: floor((3968)/8)×8 = 3968 bytes.\nFragments required = ceil(4000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 32, "payload": 4000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "2506b1704b3c66b39310afe579786b83d389c737", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 2-bit right-shift register module `shiftreg_right_2`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `2-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_2 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [1:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[1:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_2", "width": 2, "direction": "right"}, "prompt_sha1": "096d8adae1d85b06cd80a53398546af93c5316ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 200 counts per period. What compare/high-time count produces exactly 75% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.75 × 200 = 150. Verification: 150/200 = 0.75, which is 75%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 200, "duty": 75, "high": 150}, "prompt_sha1": "05aa2728a9432af38c73428b0153c6e6300d0864", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=47 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×4.7/(47+4.7) = 0.818182 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 47, "r2": 4.7, "vout": 0.8181818181818182}, "prompt_sha1": "520c1d911229d0c2ecaaeb7df1e0657324d3c8f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 17 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 17×9 = 153. Time = 153/19200 = 0.00796875 s = 7.968750 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 5, "parity": 1, "stop": 2, "frames": 17, "seconds": 0.00796875}, "prompt_sha1": "fda9327e8c46d746f5681d24c27a9e3bb3475c4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-28 = 1252 bytes.\nRound down to an 8-byte multiple: floor((1252)/8)×8 = 1248 bytes.\nFragments required = ceil(6000/1248) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 28, "payload": 6000, "max_payload": 1248, "fragments": 5}, "prompt_sha1": "4949c683c694e051882188a8d70c56ebe8e3fe00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xA8, toggle bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 6)`. Result = 0xE8.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 168, "bit": 6, "op": "toggle", "result": 232}, "prompt_sha1": "44a062fa352882d8d5f0a3ce6ba83114a4bb069c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(12×10^6) s = 170.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 2048, "time_us": 170.66666666666669}, "prompt_sha1": "4a94c61e83b23a5d551ea44baabb793ce5330d72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock CACHE then DMA; task_B acquires DMA then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds CACHE while waiting for DMA, while task_B holds DMA while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before DMA. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "a285ba2fac042bb98e123589396bf752cc971ded", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 103 and initial occupancy is 42. In an abstract batch, producer attempts to enqueue 98 items first, dropping any excess beyond capacity; then consumer removes up to 89 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=103, dropped=37; consumed=89; final occupancy=14.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 103, "start": 42, "prod": 98, "cons": 89, "dropped": 37, "consumed": 89, "final": 14}, "prompt_sha1": "09dcbcea57bb9072c1bc6ead18fbfbcf5e5347c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 2.5 V reference and returns code 3953. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 3953/4095 × 2.5 V = 2.413309 V.\nThus the estimated input is about 2.4133 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 2.5, "code": 3953, "volts": 2.413308913308913}, "prompt_sha1": "d310778d0c87eeb1708eb892b8256551e264563b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 42-bit left-shift register module `shiftreg_left_42`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `42-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_42 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [41:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[40:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_42", "width": 42, "direction": "left"}, "prompt_sha1": "387e45e8cd77f97a77282fb0ad9fcc96472813ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xC5EFC99A in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C5 EF C9 9A.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 3320826266, "endian": "big", "bytes": [197, 239, 201, 154]}, "prompt_sha1": "55b21c112994a84792cec9d260e6d0ddcb9ef6fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 7-bit right-shift register module `shiftreg_right_7`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `7-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_7 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [6:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[6:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_7", "width": 7, "direction": "right"}, "prompt_sha1": "af9c519489c9af3f93fa746636ce218d96beb01d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w4_nocin` implementing a 4-bit unsigned adder with inputs `a`, `b` and outputs `4-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w4_nocin (\n input logic [3:0] a,\n input logic [3:0] b,\n output logic [3:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w4_nocin", "width": 4, "cin": false}, "prompt_sha1": "40b94e40b82ec58952e4849e9a74a4e63ebb5ae9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5149` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5149 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5149"}, "prompt_sha1": "93a3e501ac5914da54caa5983773264315e1466c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.100.135.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.100.135.0\nBroadcast address: 10.100.135.255\nUsable host range: 10.100.135.1 to 10.100.135.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.100.135.0/24", "usable": 254, "first": "10.100.135.1", "last": "10.100.135.254", "broadcast": "10.100.135.255"}, "prompt_sha1": "3bab849d6132d270eb40f5a75dfec659db0c7a4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.61. Using Amdahl's law, compute the theoretical speedup on 4 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.61) + 0.61/4) = 1.843318.\nThe theoretical speedup is about 1.843×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.61, "n": 4, "result": 1.8433179723502304}, "prompt_sha1": "a38aeb4abeadd83edf128ff4cb82e5797664ae86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `entries` elements of type `float`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `samples[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "cdbc5a8aebaa4482a3ced535a9de7375d8b237c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(32×10^6) s = 32.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 1024, "time_us": 32.0}, "prompt_sha1": "678383176103ceca169a61933fb9e38170143a69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_5500` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_5500 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_5500", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "f9aca97d7236bb4c29041b85c28a1c2681c5542d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 36 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 36000000/200 = 180000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 180000 that also keeps the period count within 16 bits is 2000.\nPeriod count = 180000/2000 = 90.\nPSC register = 2000-1 = 1999.\nARR register = 90-1 = 89.\nVerification: 36000000/(2000×90) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 36000000, "target_hz": 200, "total_division": 180000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 2000, "period": 90, "psc_reg": 1999, "arr_reg": 89}, "prompt_sha1": "7bd8ce2f3d05b0ca8e1ef4b2a0c6318cf7b96085", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `completed = completed + 3` on one shared integer without synchronization. Assume `completed` initially equals 329. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 329; T2 reads 329; both compute 332; T1 writes 332; T2 writes 332. The observed final value is 332, but two serial increments would produce 335.\n\n```\nlock(mutex)\ncompleted = completed + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "417437018e1121afa237b3b6e307647615e3ee76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 10%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.100 × 3 = 0.060000.\nEffective CPI = 1.2 + 0.060000 = 1.260000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.1, "penalty": 3, "result": 1.26}, "prompt_sha1": "cf1ff75ebd560071e370c9ca2227b1d9c3adde3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 90.0% hit rate, and a 140 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.900 = 0.100.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.100×140 ns = 15.5000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.9, "penalty": 140, "result": 15.499999999999996}, "prompt_sha1": "6c62fc38d2e44746315a5527cac4a8dab857b51e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w32_9730` implementing a dual-clock asynchronous FIFO with depth 4 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w32_9730 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 32,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w32_9730", "depth": 4, "width": 32, "ptr_w": 2}, "prompt_sha1": "7a41ca7ad6b40939ec59ed03bf3f9488c0f73b07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 7` on one shared integer without synchronization. Assume `items` initially equals 471. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 471; T2 reads 471; both compute 478; T1 writes 478; T2 writes 478. The observed final value is 478, but two serial increments would produce 485.\n\n```\nlock(mutex)\nitems = items + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "0d2c187a930c70bb461594b9ff0c3b4a7c643866", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(4×28800) = 138.888889.\nNearest integer divisor D = 139.\nActual baud = 16000000/(4×139) = 28776.978 baud.\nError = (28776.978-28800)/28800×100% = -0.0799%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 4, "baud": 28800, "divisor": 139, "actual": 28776.978417266186, "error_pct": -0.07993605115907738}, "prompt_sha1": "9a312eb4527278c135f6625cc4821acee542dfef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/22=0.0909090909 A. P=V²/R=2²/22=0.181818182 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 22, "i": 0.09090909090909091, "p": 0.18181818181818182}, "prompt_sha1": "72445dba251116734a0c44c6812ffa8df949802c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'P', 'V', 'P', 'V', 'V', 'P', 'V', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "P", "V", "P", "V", "V", "P", "V", "P", "P", "V", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "6694890c6829346d10323b5ac65f4dd365bd4920", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w23_signed` comparing two 23-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w23_signed (\n input logic signed [22:0] a,\n input logic signed [22:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w23_signed", "width": 23, "signed": true}, "prompt_sha1": "f8f403915e936c864e364d12daa2c09d431eb073", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w4_m9` with clk, asynchronous active-low rst_n, active-high enable, and output logic [3:0] count. On reset count=0. When enabled it increments until 9 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w4_m9 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [3:0] count\n);\n localparam logic [3:0] LIMIT = 4'd9;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w4_m9", "width": 4, "max": 9}, "prompt_sha1": "b293aa6d7877dc0c85b39ac0e69645d39eb0f457", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=4.7 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×2.2/(4.7+2.2) = 1.052174 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 4.7, "r2": 2.2, "vout": 1.0521739130434782}, "prompt_sha1": "2e6effea9a16dc25669d1075be2b43e90447d708", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3206292990, carries 7979 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 7979+0+0 = 7979. ACK = (3206292990+7979) mod 2^32 = 3206300969.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3206292990, "payload": 7979, "syn": 0, "fin": 0, "ack": 3206300969}, "prompt_sha1": "3441e6c6f80f697be36b9ff62e7310d8190f503e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 44 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+44) = 0.969529 = 96.95%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 44, "efficiency": 0.9695290858725761}, "prompt_sha1": "450de0fc605e0d0472fa306f7ee4e64955cb03e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 38 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 38 = 40.\nClock pulses = 40×9 = 360.\nTime = 360/1000000 s = 360.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 38, "clocks": 360, "time_s": 0.00036}, "prompt_sha1": "d640359f615005535fe8d3d231ce5743d15b08d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 4000 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×4000×10^6×3 = 72.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 4000, "channels": 3, "gbps": 72.0}, "prompt_sha1": "20a735dfa03c2ab59ca5c30c6ad6e047d97e90d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock RX then DESC; consumer acquires DESC then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds RX while waiting for DESC, while consumer holds DESC while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "43a9f70896a46f2dbf831dc859cb6cf7d6ff8a3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1044 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "77613521d6eab5e559b5bef950bc9dc5100b9397", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 573 and tail index 411, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (573-411) mod 1024 = 162. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 573, "tail": 411, "occupancy": 162}, "prompt_sha1": "72dcdfab373a349c051d79695505a493611a5625", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 2 = 12.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 2, "spi_hz": 12000000.0}, "prompt_sha1": "ced92a6d574c4fc94923af1520d3919dd71940a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 640.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+16 = 656.5. Period = 656.5/16000000 = 4.103125e-05 s. Maximum rate = 1/period = 24371.667936 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 640.5, "conv_cycles": 16, "period": 4.103125e-05, "rate": 24371.667936024372}, "prompt_sha1": "719a731cfe1f5207d86e3e5693e805c27b450c67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x20, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x20<<1)|1 = 0x41 = 01000001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 32, "rw": 1, "byte": 65}, "prompt_sha1": "b244a47ae2a749385a0c017e610879593f3dcfa0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 8 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×1×10^6 = 8000000 B/s. Time = 512/8000000 = 6.4e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 8, "rate_mhz": 1, "sec": 6.4e-05}, "prompt_sha1": "10697a0d383e1ec2b980f43081c0f2e80508ecc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 21 and initial occupancy is 9. In an abstract batch, producer attempts to enqueue 74 items first, dropping any excess beyond capacity; then consumer removes up to 60 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=21, dropped=62; consumed=21; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 21, "start": 9, "prod": 74, "cons": 60, "dropped": 62, "consumed": 21, "final": 0}, "prompt_sha1": "bc64880e2811c3538809263a21ce999ae300757e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock RX then STATE; consumer acquires STATE then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds RX while waiting for STATE, while consumer holds STATE while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire RX before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "56fc6778cf50d6b0e4435f44a1b08815212b67d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_100` for a synchronous sampled input `noisy`. Update output `clean` only after observing 100 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_100 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 99) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_100", "stable_samples": 100}, "prompt_sha1": "d7f3c9b892ec1d3c6fb86dd982caac0eeecb39fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 12000 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 12000/(12000+28) = 0.997672 = 99.77%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 12000, "overhead": 28, "efficiency": 0.9976720984369803}, "prompt_sha1": "c4d83e2652992ca777e692d455c91bed97ac8eda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 1` on one shared integer without synchronization. Assume `credits` initially equals 110. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 110; T2 reads 110; both compute 111; T1 writes 111; T2 writes 111. The observed final value is 111, but two serial increments would produce 112.\n\n```\nlock(mutex)\ncredits = credits + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "04822eaa5987d7ba2cdf1da767ab38d6d0f847c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_6_8355` converting a 6-bit binary input `bin` to 6-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_6_8355 (\n input logic [5:0] bin,\n output logic [5:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_6_8355", "width": 6}, "prompt_sha1": "c3e70749f3d811af9c56f27ce5b65465194ec3a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×1.8²=1.62e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 1.8, "energy": 1.62e-06}, "prompt_sha1": "361c5cbe5864f473734ae613c24ae95d3313119c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=4.7 nF and is stepped to 9 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=9(1-e^-4)=8.835159 V; τ=2.209e-06 s and t=8.836e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 4.700000000000001e-09, "multiple": 4, "vin": 9, "vc": 8.835159250001393}, "prompt_sha1": "e2f6438d90a75c67d2c86130d83b1bd86b86c164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 65 and initial occupancy is 3. In an abstract batch, producer attempts to enqueue 157 items first, dropping any excess beyond capacity; then consumer removes up to 72 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=65, dropped=95; consumed=65; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 65, "start": 3, "prod": 157, "cons": 72, "dropped": 95, "consumed": 65, "final": 0}, "prompt_sha1": "39916d0b3f5d53e5d8baf6fc2555a513417e9ab1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 444 and tail index 700, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (444-700) mod 1024 = 768. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 444, "tail": 700, "occupancy": 768}, "prompt_sha1": "2cee960db9c1f9e26c1f6390c14d2522dbf5d80d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xCB5DDC79. Extract the 6-bit field starting at bit 9 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xCB5DDC79 >> 9) & 0x3F = 0x2E (46).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 9, "value": 3411926137, "mask": 63, "field": 46}, "prompt_sha1": "e750e39060e4c04eb5d01eca86eea16edb912cd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8869-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8869×8 = 70952 bits.\nSerialization delay = bits/rate = 70952/(10×10^6) s = 0.0070952 s = 7095.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8869, "rate_mbps": 10, "delay_s": 0.0070952}, "prompt_sha1": "eab0c756fec743f8e43777ad315e223234734b91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 412 elements. Review loop `for i in range(412+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(412+1)` includes index 412, which is out of range for a length-412 sequence. Correct loop: `for i in range(412):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 412, "variant": "one_past"}, "prompt_sha1": "1a1292368022acab4b001f8292d5d58a7d581cdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/32 = 32.\nOffset bits = log2(32) = 5.\nIndex bits = log2(32) = 5.\nTag bits = 52-5-5 = 42.\nCheck: 42+5+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 32, "addr_bits": 52, "lines": 32, "offset_bits": 5, "index_bits": 5, "tag_bits": 42}, "prompt_sha1": "97ee7f4756bf9fbdc82488fbd99d768b9d1e3dbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3022977679, carries 62199 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 62199+0+0 = 62199. ACK = (3022977679+62199) mod 2^32 = 3023039878.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3022977679, "payload": 62199, "syn": 0, "fin": 0, "ack": 3023039878}, "prompt_sha1": "4b5f44254e5ff0f43a9f902ac72aa7348119dbfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 16-way set-associative cache uses 256-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/256 = 128.\nSets = 128/16 = 8.\nOffset bits = log2(256) = 8; index bits = log2(8) = 3; tag bits = 40-8-3 = 29.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 256, "ways": 16, "addr_bits": 40, "lines": 128, "sets": 8, "offset": 8, "index": 3, "tag": 29}, "prompt_sha1": "c2b7fd32853fa7bdd11357c751b6c55c60029d53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 49104. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 49104/65535 × 3.3 V = 2.472621 V.\nThus the estimated input is about 2.4726 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 49104, "volts": 2.4726207370107574}, "prompt_sha1": "0d6f326cb001f775972b7c2a84466244064f7f96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 877 elements. Review loop `for i in range(877-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(877-1)` produces indices 0 through 875, so index 876 is skipped. Correct loop: `for i in range(877):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 877, "variant": "miss_last"}, "prompt_sha1": "81f35a17434216eda440bdb2fd27d3d4481a3149", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_3299` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_3299 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_3299", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "84d8ef6349ac7fa0318dd1e97c34ccd768a70e95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m5692` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 5692 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m5692 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd5692;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m5692", "width": 13, "max": 5692}, "prompt_sha1": "6d45348cb01bedff9dfb93b0e95f59128393d757", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_2777` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_2777 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_2777", "width": 4}, "prompt_sha1": "dc0c2cf291ecc012497c832a2ae5d70d5a94f725", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551567; x = x + 377;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551567+377 = 18446744073709551944. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551944) mod 2^64 = 328. So `x` stores 328. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551567, "add": 377, "result": 328}, "prompt_sha1": "85fd90e09a3fba91cea6a78f976bf30d93c3d8cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1179` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1179 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1179 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1179;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1179", "width": 11, "max": 1179}, "prompt_sha1": "6d9ce6e945a06cfdac9024b1a4b767283b807ae0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 125 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 65536. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/125 = 672000.\nWith prescaler divisor limited to at most 65536, the largest divisor of 672000 that also keeps the period count within 16 bits is 56000.\nPeriod count = 672000/56000 = 12.\nPSC register = 56000-1 = 55999.\nARR register = 12-1 = 11.\nVerification: 84000000/(56000×12) = 125 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 125, "total_division": 672000, "max_prescaler": 65536, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 56000, "period": 12, "psc_reg": 55999, "arr_reg": 11}, "prompt_sha1": "e367099bda3b25f59a00dde5b16aabc1e3be8036", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [17, 6, 18]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [39, 18, 41].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [17, 6, 18], "finish": [39, 18, 41]}, "prompt_sha1": "83f8623bc5e530eef4b9fea6793e02bc3d893ea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 110101010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110101010", "ones": 5, "parity": 1}, "prompt_sha1": "ec0044260f2a38b795fbebe15fd81ddb4cc25ad9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=200 ms, C=5 ms,T=50 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/200 + 5/50 + 3/25 = 0.240000 = 24.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 200], [5, 50], [3, 25]], "utilization": 0.24}, "prompt_sha1": "3ead469403c3475a39de4f7ea5bd4bea8e222e10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w41_signed` comparing two 41-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w41_signed (\n input logic signed [40:0] a,\n input logic signed [40:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w41_signed", "width": 41, "signed": true}, "prompt_sha1": "e93026d87298f91fc3d010f9c218534eae0406b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65385; x = x + 551;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65385+551 = 65936. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65936) mod 2^16 = 400. So `x` stores 400. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65385, "add": 551, "result": 400}, "prompt_sha1": "042e001e323c8b4a00da4fad6f998b65aba7a701", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x66EF12C9 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 66 EF 12 C9.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 1726943945, "endian": "big", "bytes": [102, 239, 18, 201]}, "prompt_sha1": "1f530420fcbbe1fa6e779b7c7bb6c39c74a5a266", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 30844 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 30844/10000000 s; frequency = 10000000/30844 = 324.212164 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 30844, "hz": 324.2121644404098}, "prompt_sha1": "f3fc9c72ef9d6d067b2b12f06698459a5581e4ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_8683` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_8683 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_8683"}, "prompt_sha1": "7858cf07c904b245bf8b3457b3e13a0f023b3b04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 12 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 14400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 12000000/(8×14400) = 104.166667.\nNearest integer divisor D = 104.\nActual baud = 12000000/(8×104) = 14423.077 baud.\nError = (14423.077-14400)/14400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 12000000, "oversample": 8, "baud": 14400, "divisor": 104, "actual": 14423.076923076924, "error_pct": 0.1602564102564151}, "prompt_sha1": "331defa704304f36438a4f1abd456370092d9793", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 110000000100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110000000100", "ones": 3, "parity": 1}, "prompt_sha1": "d9e20910cf02535dd10df36fc747119c5f411e6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 12 = 0.024000.\nEffective CPI = 1 + 0.024000 = 1.024000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.02, "penalty": 12, "result": 1.024}, "prompt_sha1": "8fd7c879aa5b29d08e0dacbe9efda8b5316a9370", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_58` generating a one-clock-cycle `tick` every 58 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_58 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 57) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_58", "divide": 58}, "prompt_sha1": "f3763bc59d4fa84f5c9750ef7b81bc7d81833e2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 1, 0, 1, 1], "final_state": 3}, "prompt_sha1": "74f544540b5c78ec50ef4050fd8804a8a49de863", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4739-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4739×8 = 37912 bits.\nSerialization delay = bits/rate = 37912/(25000×10^6) s = 1.51648e-06 s = 1.516480 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4739, "rate_mbps": 25000, "delay_s": 1.51648e-06}, "prompt_sha1": "1a6d1c2de5af9f48bfe27b3f1a944f3b64831c0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 7` on one shared integer without synchronization. Assume `packets` initially equals 332. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 332; T2 reads 332; both compute 339; T1 writes 339; T2 writes 339. The observed final value is 339, but two serial increments would produce 346.\n\n```\nlock(mutex)\npackets = packets + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "3a464413a494b90f35482a4fe54afc5a8458d031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1010110100001101010 using generator polynomial bits 1101. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 13, "msg_bits": 19, "msg": 354410, "remainder": 5}, "prompt_sha1": "43a1b4a82b95445575a25f9fa83487a0e2209a96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x1AF, toggle bit 0 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 0)`. Result = 0x1AE.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 431, "bit": 0, "op": "toggle", "result": 430}, "prompt_sha1": "3ee9c4515c6bd60b836afb855a2dfaed048fa0a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.39.26.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.39.26.0\nBroadcast address: 10.39.26.3\nUsable host range: 10.39.26.1 to 10.39.26.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.39.26.0/30", "usable": 2, "first": "10.39.26.1", "last": "10.39.26.2", "broadcast": "10.39.26.3"}, "prompt_sha1": "d1d01feefd15074760ebf958955741cdda7407d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_721627` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_721627 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_721627"}, "prompt_sha1": "53b32017b17ce9fec2cf3f4398df29e397062d65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×128 KiB = 6144 KiB = 6291456 bytes = 6.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 128, "reach": 6291456}, "prompt_sha1": "2b984f9acfd9f35b0e3a07e92ab1ecc6b431db82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 128-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/128 = 4096.\nOffset bits = log2(128) = 7.\nIndex bits = log2(4096) = 12.\nTag bits = 36-12-7 = 17.\nCheck: 17+12+7 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 128, "addr_bits": 36, "lines": 4096, "offset_bits": 7, "index_bits": 12, "tag_bits": 17}, "prompt_sha1": "d80b78e4cc98f165fe2c4098b43696cacf277af9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xAFD8D59C. Extract the 3-bit field starting at bit 23 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0xAFD8D59C >> 23) & 0x7 = 0x7 (7).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 23, "value": 2950223260, "mask": 7, "field": 7}, "prompt_sha1": "585cdf123fb2c229aa4c05c85382c0576f4c4a84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=4.7 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×4.7/(4.7+4.7) = 6.000000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 4.7, "r2": 4.7, "vout": 6.0}, "prompt_sha1": "e42403dfef34428edee1a18e3e49297c292f8da7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 5` on one shared integer without synchronization. Assume `packets` initially equals 132. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 132; T2 reads 132; both compute 137; T1 writes 137; T2 writes 137. The observed final value is 137, but two serial increments would produce 142.\n\n```\nlock(mutex)\npackets = packets + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "74df28642fd9e32fec4df58cec8d9452dd23779d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 512 KiB direct-mapped data cache with 128-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 512 KiB = 524288 bytes.\nLines = 524288/128 = 4096.\nOffset bits = log2(128) = 7.\nIndex bits = log2(4096) = 12.\nTag bits = 64-12-7 = 45.\nCheck: 45+12+7 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 524288, "line": 128, "addr_bits": 64, "lines": 4096, "offset_bits": 7, "index_bits": 12, "tag_bits": 45}, "prompt_sha1": "8985197ee27eb16927fed8b81fe1fe4145683cb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x16_no_bypass` with 32 entries of 16 bits. Inputs: `clk`, `we`, `5-bit waddr`, `16-bit wdata`, `5-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [15:0] wdata,\n input logic [4:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x16_no_bypass", "entries": 32, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "1225b0d47a638350d25db53504fdffbbfee9f64a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 16-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/16 = 4096.\nOffset bits = log2(16) = 4.\nIndex bits = log2(4096) = 12.\nTag bits = 28-12-4 = 12.\nCheck: 12+12+4 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 16, "addr_bits": 28, "lines": 4096, "offset_bits": 4, "index_bits": 12, "tag_bits": 12}, "prompt_sha1": "7b5949f716032a93f83fcd3d7ed3bbd2f1f7c707", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 436 and tail index 416, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (436-416) mod 512 = 20. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 436, "tail": 416, "occupancy": 20}, "prompt_sha1": "54497183da3704e9b828c1d9d3c93350040363e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6287(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6287(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6287([1, 2]) == 1.5\nassert mean_6287([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6287"}, "prompt_sha1": "c1be9e462a6e871a34f43e1d00814caae2cb196c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3667 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3667/(3667+20+8) = 0.992422 = 99.24%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3667, "iphdr": 20, "eff": 0.9924221921515561}, "prompt_sha1": "a1d693f941f646a268c17d44e5b2abd18cde5e11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 994 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 994/(994+40+8) = 0.953935 = 95.39%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 994, "iphdr": 40, "eff": 0.9539347408829175}, "prompt_sha1": "c21b5c25adc32dcb15c629d9443e39189642cf17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 865 elements. Review loop `for i in range(865-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(865-1)` produces indices 0 through 863, so index 864 is skipped. Correct loop: `for i in range(865):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 865, "variant": "miss_last"}, "prompt_sha1": "07d917122730c4afd4f0a6c4cd07d3aded44536f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 2-way set-associative cache uses 256-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/256 = 32.\nSets = 32/2 = 16.\nOffset bits = log2(256) = 8; index bits = log2(16) = 4; tag bits = 57-8-4 = 45.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 256, "ways": 2, "addr_bits": 57, "lines": 32, "sets": 16, "offset": 8, "index": 4, "tag": 45}, "prompt_sha1": "af520f880e9f5488e79b04ac996ce12ab30a8837", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 12000 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 12000 = 1800. Verification: 1800/12000 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 12000, "duty": 15, "high": 1800}, "prompt_sha1": "2dc6939ae765cd2ea165ef110797146a5a2b70fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=220 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/100 = -2.200000.\nVout = A_v×Vin = -2.200000×0.5 = -1.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 220, "vin": 0.5, "gain": -2.2, "vout": -1.1}, "prompt_sha1": "a1c4130587824099159ca7e7f464f1c36f9b914a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=100 ms, C=4 ms,T=40 ms, C=1 ms,T=25 ms, C=1 ms,T=25 ms, C=3 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/100 + 4/40 + 1/25 + 1/25 + 3/100 = 0.230000 = 23.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 100], [4, 40], [1, 25], [1, 25], [3, 100]], "utilization": 0.23}, "prompt_sha1": "afc30e4ff43dfe791596bd875121701f25b59e1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8843(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8843(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8843([1, 2]) == 1.5\nassert mean_8843([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8843"}, "prompt_sha1": "eb23afcc86dfefd82859fdc055d3ebc17270ea96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 12 = 0.030000.\nEffective CPI = 1.1 + 0.030000 = 1.130000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.05, "penalty": 12, "result": 1.1300000000000001}, "prompt_sha1": "ba05e9cc9df349c4daa0866c92484906da29c608", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=47 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=4.7e-06 s and t=4.7e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 4.7000000000000004e-08, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "bfad004687141ee38a7b976e76e3449421ac27ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_194` generating a one-clock-cycle `tick` every 194 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_194 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 193) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_194", "divide": 194}, "prompt_sha1": "c4b66a1460cb1a11cfb90b21f7cfd9c2508c94d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 2.5 V reference and returns code 1109. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 1109/65535 × 2.5 V = 0.042306 V.\nThus the estimated input is about 0.0423 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 2.5, "code": 1109, "volts": 0.042305638208590825}, "prompt_sha1": "18147083532a7eb03bc5b4c6c3ec8dad2a2a4eb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(16×28800) = 13.020833.\nNearest integer divisor D = 13.\nActual baud = 6000000/(16×13) = 28846.154 baud.\nError = (28846.154-28800)/28800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 16, "baud": 28800, "divisor": 13, "actual": 28846.153846153848, "error_pct": 0.1602564102564151}, "prompt_sha1": "c0fad7faac13af98d49d5d33aadc984f994551b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(10×10^6) s = 2.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 24, "time_us": 2.4}, "prompt_sha1": "285b110e978477c5346dd21100a068f50400946f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=47 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/100 = -0.470000.\nVout = A_v×Vin = -0.470000×0.05 = -0.023500 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 47, "vin": 0.05, "gain": -0.47, "vout": -0.0235}, "prompt_sha1": "b38d499146ea592482e1898ef9944f79df80614a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 32214 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 32214/5000000 s; frequency = 5000000/32214 = 155.212020 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 32214, "hz": 155.21201961879927}, "prompt_sha1": "f67b6bfe174888b8f783f7562bfa83b206c8031b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1500 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-40-32 = 1428 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 40, "tcphdr": 32, "mss": 1428}, "prompt_sha1": "8b60b294a48451a8d0abe705b18cabf2eb56479c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_54` generating a one-clock-cycle `tick` every 54 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_54 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 53) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_54", "divide": 54}, "prompt_sha1": "6e332746679e87f7cf9dcd3fe0af7d79f4035fce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 913 and tail index 882, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (913-882) mod 1024 = 31. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 913, "tail": 882, "occupancy": 31}, "prompt_sha1": "6895f6e66b730c406ebfded8e573c8ae641e5625", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xFF91. Extract the 6-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xFF91 >> 4) & 0x3F = 0x39 (57).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 4, "value": 65425, "mask": 63, "field": 57}, "prompt_sha1": "a702c2b70910b6ab65815e251030c9048fbeb458", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 32 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 32×9 = 288. Time = 288/9600 = 0.03 s = 30.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 5, "parity": 1, "stop": 2, "frames": 32, "seconds": 0.03}, "prompt_sha1": "09842041dcf1a04d6744944ea26ca6866c6606fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w18_nocin` implementing a 18-bit unsigned adder with inputs `a`, `b` and outputs `18-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w18_nocin (\n input logic [17:0] a,\n input logic [17:0] b,\n output logic [17:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w18_nocin", "width": 18, "cin": false}, "prompt_sha1": "9129cb83458743e0959299f3641110709a663270", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 800 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×800×10^6×1 = 1.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 800, "channels": 1, "gbps": 1.6}, "prompt_sha1": "c70a03315a60293bf57139f0aa3ab9e43b3f9dd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m45655` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 45655 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m45655 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd45655;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m45655", "width": 16, "max": 45655}, "prompt_sha1": "4b0c6fa99dbca9aa028772e4313c1d0882b7c998", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=33000 ohm and C=4700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=33000×4700×10^-12 s = 0.0001551 s.\nf_c=1/(2πRC)=1/(2π×33000×4700×10^-12) = 1026.1441 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 33000, "c_f": 4.7e-09, "tau": 0.0001551, "fc": 1026.1440560405888}, "prompt_sha1": "bd47681b83a097ad3d3b2e2235fbd0b0ba640877", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w39_signed` comparing two 39-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w39_signed (\n input logic signed [38:0] a,\n input logic signed [38:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w39_signed", "width": 39, "signed": true}, "prompt_sha1": "3a908425f4cd53bbb89017d2ea8c1bc0df886a4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w54_unsigned` comparing two 54-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w54_unsigned (\n input logic [53:0] a,\n input logic [53:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w54_unsigned", "width": 54, "signed": false}, "prompt_sha1": "ae279d5e89884faec612fe20902c3edbb4864adb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 800 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 800 = 240. Verification: 240/800 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 800, "duty": 30, "high": 240}, "prompt_sha1": "943fa55183df3ba413b71c8f3b278c3845ef08e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 31-bit right-shift register module `shiftreg_right_31`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `31-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_31 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [30:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[30:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_31", "width": 31, "direction": "right"}, "prompt_sha1": "14087fc60d6a174ed58944f93e99fc05a009565b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10×10^6 / (9000×8) = 138.888889 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "frame_bytes": 9000, "pps": 138.88888888888889}, "prompt_sha1": "c100c9a54852d86802422c952b7e3ff4355c0e97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1296 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1296-40-28 = 1228 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1296, "iphdr": 40, "tcphdr": 28, "mss": 1228}, "prompt_sha1": "96ab9596d1572e6ef6544a07142fb05a73f2aaae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "4c3f5cf86af67d4e665603187090bad636d40d5b", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "d3f3c294ba00142a28c839763e250096909db73d946200019260119d50c7911e", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 5144, "original_row_sha256": "6f79e36bf573cfd390a5e5a5e8af3dfda40ba4623011fde9f80098127347e551", "version": "v1.0.0-rc1"}}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×256 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 256, "reach": 8388608}, "prompt_sha1": "fe0dd94390109c1bad983eb0b36ed2e7bb1c94c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 56 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+56) = 0.961538 = 96.15%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 56, "efficiency": 0.9615384615384616}, "prompt_sha1": "bb59a40b094f370dafdfb0bbee9fe639464d3180", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1450 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-40-24 = 1386 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 40, "tcphdr": 24, "mss": 1386}, "prompt_sha1": "5506974674fbaf07d666398fe441ee1ed52cea54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w20_nocin` implementing a 20-bit unsigned adder with inputs `a`, `b` and outputs `20-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w20_nocin (\n input logic [19:0] a,\n input logic [19:0] b,\n output logic [19:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w20_nocin", "width": 20, "cin": false}, "prompt_sha1": "4dc358bf3cb86556b77662c5ff320c791f9d53c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^23 V = 2.44140625e-07 V = 0.244141 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 2.048, "step": 2.44140625e-07}, "prompt_sha1": "ebed995fb353694b607466dfd5170ad242b0a41b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 18.8 V source drives a 4700 ohm resistor in series with an LED whose forward voltage is assumed to be 3.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 18.8-3.2 = 15.6 V.\nI = V/R = 15.6/4700 A = 3.3191 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 18.8, "vf": 3.2, "r": 4700, "current_a": 0.003319148936170213}, "prompt_sha1": "528d1215a001ed217bad55bcff945ad773a468f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x364A in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 4A 36.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 13898, "endian": "little", "bytes": [74, 54]}, "prompt_sha1": "eb649ca7899411e8b5fcc91c440f18e434be9e5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4528` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4528 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4528"}, "prompt_sha1": "bb36a642a464c65ced0ff36209d544bdd960a763", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=47 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×100/(47+100) = 3.401361 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 47, "r2": 100, "vout": 3.401360544217687}, "prompt_sha1": "44508c4c919897df5cb94f5633b618891c6c0c40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on T; 2->T on N; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 1, 0, 0], "final_state": 0}, "prompt_sha1": "e85381b18cf0fe34a2f5f26db825fca4747d49f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3 ns hit time, 92.1% hit rate, and a 95 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.921 = 0.079.\nAMAT = hit time + miss rate × miss penalty\n= 3 ns + 0.079×95 ns = 10.5050 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.0, "hit_rate": 0.921, "penalty": 95, "result": 10.504999999999995}, "prompt_sha1": "9f7b74d7e22c87fa0607984b49250742ae006af0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 36 and initial occupancy is 21. In an abstract batch, producer attempts to enqueue 29 items first, dropping any excess beyond capacity; then consumer removes up to 151 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=36, dropped=14; consumed=36; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 36, "start": 21, "prod": 29, "cons": 151, "dropped": 14, "consumed": 36, "final": 0}, "prompt_sha1": "20ebff765d0523353ff3ce0c7e033435f78fe0a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 36-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^36/2^20 = 2^16 = 65536 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 36, "page_exp": 20, "entries": 65536}, "prompt_sha1": "bf3a1b7672581696383b7ab8def4a3553f7435d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 16 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×80×10^6 = 1280000000 B/s. Time = 128/1280000000 = 1e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 16, "rate_mhz": 80, "sec": 1e-07}, "prompt_sha1": "3eddd339c201d8458bd215f898595ff720cbd339", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (4096×8) = 1220703.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 4096, "pps": 1220703.125}, "prompt_sha1": "1e2c8db09b0ebf695bfb557e7260b194cb27374c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x40_write_bypass` with 16 entries of 40 bits. Inputs: `clk`, `we`, `4-bit waddr`, `40-bit wdata`, `4-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [39:0] wdata,\n input logic [3:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x40_write_bypass", "entries": 16, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "5534bd74ac6e2a6b4b362ce21497b20e361fa2f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^10 V = 0.0017578125 V = 1757.812500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 1.8, "step": 0.0017578125}, "prompt_sha1": "97e244e3e470af7fcde4edf36fc5d0da26663323", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 19 and tail index 26, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (19-26) mod 32 = 25. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 19, "tail": 26, "occupancy": 25}, "prompt_sha1": "b0d394b919553be0c4a48351992553d2fba97cbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×56)/(1000+56) = 53.030303 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 56, "req": 53.03030303030303}, "prompt_sha1": "399bbe4e2b54206f5dd6bb0adadbbf18a362aaf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x48_write_bypass` with 128 entries of 48 bits. Inputs: `clk`, `we`, `7-bit waddr`, `48-bit wdata`, `7-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [47:0] wdata,\n input logic [6:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x48_write_bypass", "entries": 128, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "5f5615a7aa92f994a777205b8e46bccbc33a3c68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w44_signed` comparing two 44-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w44_signed (\n input logic signed [43:0] a,\n input logic signed [43:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w44_signed", "width": 44, "signed": true}, "prompt_sha1": "44f3298cde56aa1f4fee5e847c98284081d4a488", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 58 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 58-10 = 48.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 58, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 48}, "prompt_sha1": "207aa63be7daa852fe7a2d238c8d6e97be7de24d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2700 ohm and C=47000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2700×47000×10^-12 s = 0.0001269 s.\nf_c=1/(2πRC)=1/(2π×2700×47000×10^-12) = 1254.1761 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2700, "c_f": 4.7e-08, "tau": 0.0001269, "fc": 1254.1760684940532}, "prompt_sha1": "404cdfb77f27b4b068610abb9c05098751b4a031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 57 and tail index 46, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (57-46) mod 64 = 11. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 57, "tail": 46, "occupancy": 11}, "prompt_sha1": "1b86a4a09f36afe7a5fef5975b1b140347a3f0fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xFBB30B28E0C04B84 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 84 4B C0 E0 28 0B B3 FB.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 18136852394548415364, "endian": "little", "bytes": [132, 75, 192, 224, 40, 11, 179, 251]}, "prompt_sha1": "9a94992ca77e147f57ec24513dade0b618181102", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 64 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 64 MHz / 2 = 32.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 64000000.0, "divider": 2, "spi_hz": 32000000.0}, "prompt_sha1": "2f44d79884e0f30f9fca5b57ffe18d2f339654de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22000 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/22000=8.18181818e-05 A. P=V²/R=1.8²/22000=0.000147272727 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 22000, "i": 8.181818181818182e-05, "p": 0.00014727272727272728}, "prompt_sha1": "f5338548acfc301e2adb5803239602ee9a9c0709", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 20% of instructions, the branch misprediction rate is 2%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.020 × 3 = 0.012000.\nEffective CPI = 1.1 + 0.012000 = 1.112000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.2, "mispred": 0.02, "penalty": 3, "result": 1.112}, "prompt_sha1": "e1cf9e2d23b47362177eebd6dc1a38fd8b3d14ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10×56)/(10+56) = 8.484848 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10, "r2": 56, "req": 8.484848484848484}, "prompt_sha1": "ebdf0ae2814713a1c14a44bbf23ce38ea3ada599", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×2/1000/8 = 25000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 2, "bytes": 25000.0}, "prompt_sha1": "d80f51c2897e75f4cd5e3e509495f648f220e521", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x2558C5 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C5 58 25.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 2447557, "endian": "little", "bytes": [197, 88, 37]}, "prompt_sha1": "18c06fe7f18fd97c2368b9ed3163a0c596c77490", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 8 = 7.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 8, "spi_hz": 7500000.0}, "prompt_sha1": "084c2f8e5803d4995ced468a43813823de53f5c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 43-bit right-shift register module `shiftreg_right_43`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `43-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_43 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [42:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[42:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_43", "width": 43, "direction": "right"}, "prompt_sha1": "e257cc8ce2013a3695718abc25a2a3f7d588e420", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 14-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^14 V = 0.00010986328125 V = 109.863281 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 14, "vref": 1.8, "step": 0.00010986328125}, "prompt_sha1": "8ec5dda174690285f00f46901236994be3d34b8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 10.4 V source drives a 6800 ohm resistor in series with an LED whose forward voltage is assumed to be 2.5 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 10.4-2.5 = 7.9 V.\nI = V/R = 7.9/6800 A = 1.1618 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 10.4, "vf": 2.5, "r": 6800, "current_a": 0.001161764705882353}, "prompt_sha1": "81285be6cdb2031e7fa21fab8f8d3919bf0f47c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/1000 = 144000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 144000 that also keeps the period count within 16 bits is 8000.\nPeriod count = 144000/8000 = 18.\nPSC register = 8000-1 = 7999.\nARR register = 18-1 = 17.\nVerification: 144000000/(8000×18) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 1000, "total_division": 144000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 8000, "period": 18, "psc_reg": 7999, "arr_reg": 17}, "prompt_sha1": "134699e18db4bacd267b3eb4f6def0f370a34ed1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967233; x = x + 219;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967233+219 = 4294967452. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967452) mod 2^32 = 156. So `x` stores 156. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967233, "add": 219, "result": 156}, "prompt_sha1": "93ed41b4fd79163f912e645691716838a6b566b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 128 = 0.187500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 128, "spi_hz": 187500.0}, "prompt_sha1": "5204f9d676da2d0c8fa27bec3925b25339f82b80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 2 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×40×10^6 = 80000000 B/s. Time = 256/80000000 = 3.2e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 2, "rate_mhz": 40, "sec": 3.2e-06}, "prompt_sha1": "b0bab931101b38edb1a2aabb3f9416317086a2be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 47 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 47 = 49.\nClock pulses = 49×9 = 441.\nTime = 441/100000 s = 4410.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 47, "clocks": 441, "time_s": 0.00441}, "prompt_sha1": "688decf010986dbd724292891cdecb72dc42aa0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1110000101101011110101 using generator polynomial bits 1110111. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 111000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 119, "msg_bits": 22, "msg": 3693301, "remainder": 56}, "prompt_sha1": "9c38abd026a54e4c8a5e454595dc4954b7844a17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1753386006, carries 19299 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 19299+1+1 = 19301. ACK = (1753386006+19301) mod 2^32 = 1753405307.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1753386006, "payload": 19299, "syn": 1, "fin": 1, "ack": 1753405307}, "prompt_sha1": "8b0af202615da794907e067165563930c8e8d38c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=4.7 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×1/(4.7+1) = 0.578947 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 4.7, "r2": 1, "vout": 0.5789473684210525}, "prompt_sha1": "448ed4f74dd285d8fa3a2ede405b7c7f705ffc8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.75 ns hit time, 94.4% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.944 = 0.056.\nAMAT = hit time + miss rate × miss penalty\n= 2.75 ns + 0.056×190 ns = 13.3900 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.75, "hit_rate": 0.944, "penalty": 190, "result": 13.39000000000001}, "prompt_sha1": "0810076e0d6a040b5d1fea37eef3937cb283158a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 85.3% hit rate, and a 175 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.853 = 0.147.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.147×175 ns = 27.2250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.853, "penalty": 175, "result": 27.225000000000005}, "prompt_sha1": "73858293c9ff045e133787a986b92f67cdea7da8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 50-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^50/2^20 = 2^30 = 1073741824 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 50, "page_exp": 20, "entries": 1073741824}, "prompt_sha1": "59335dfe147919fc5d3cfb1b2516497e61d5cbcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=10 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/10 + 2/25 = 0.380000 = 38.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 10], [2, 25]], "utilization": 0.38}, "prompt_sha1": "a7c2033dae964a4811e77d366c29ef65279f313e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 12 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 12000000/(4×4800) = 625.000000.\nNearest integer divisor D = 625.\nActual baud = 12000000/(4×625) = 4800.000 baud.\nError = (4800.000-4800)/4800×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 12000000, "oversample": 4, "baud": 4800, "divisor": 625, "actual": 4800.0, "error_pct": 0.0}, "prompt_sha1": "aa13048ac8ac60a1d536b18664d858d1bd50f5aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 39-bit up/down counter `updown_39_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_39_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [38:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 39'd549755813887) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_39_sat", "width": 39, "wrap": false}, "prompt_sha1": "3732ff1a453682c00d2ce43d88491ade1fbe854e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 7` on one shared integer without synchronization. Assume `events` initially equals 200. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 200; T2 reads 200; both compute 207; T1 writes 207; T2 writes 207. The observed final value is 207, but two serial increments would produce 214.\n\n```\nlock(mutex)\nevents = events + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "ae760e0130e417bcb984429ff36b7c0c35fa22a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_28_lsb` for `28-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_28_lsb (\n input logic [27:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 27; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_28_lsb", "width": 28, "priority": "low"}, "prompt_sha1": "b5d8db21f44df532f8269c5ab7a1bc0b579d98f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 34-bit left-shift register module `shiftreg_left_34`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `34-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_34 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [33:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[32:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_34", "width": 34, "direction": "left"}, "prompt_sha1": "96e4d8a8f6dc979bb48df20aa4e403137b795e23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/10=2.4 A. P=V²/R=24²/10=57.6 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 10, "i": 2.4, "p": 57.6}, "prompt_sha1": "a9edd393800ccd8fc8e94ad1837eb2f1ae341411", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock A then L2; consumer acquires L2 then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds A while waiting for L2, while consumer holds L2 while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "e98d9fe24596b62044b95fc1acf0c9f1eff3a2f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 7.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+8 = 15.5. Period = 15.5/8000000 = 1.9375e-06 s. Maximum rate = 1/period = 516129.032258 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 7.5, "conv_cycles": 8, "period": 1.9375e-06, "rate": 516129.0322580645}, "prompt_sha1": "f43c703332c3be1eb97ddc4ea8f2cda24f267447", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 90.1% hit rate, and a 90 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.901 = 0.099.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.099×90 ns = 9.6600 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.901, "penalty": 90, "result": 9.659999999999998}, "prompt_sha1": "2e9b6d6788bfcd5f3f956a13d3fc6a3f4664b1bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7939 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7939/(7939+20+8) = 0.996486 = 99.65%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7939, "iphdr": 20, "eff": 0.9964855026986319}, "prompt_sha1": "6b6470a265bec8fda5d8b2509a26659888b55197", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [25, 6, 22, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [71, 26, 73, 79].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [25, 6, 22, 26], "finish": [71, 26, 73, 79]}, "prompt_sha1": "dccf9cc288ca0ecb37697c832c2a4ff7672974a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1846276727, carries 50100 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 50100+1+0 = 50101. ACK = (1846276727+50101) mod 2^32 = 1846326828.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1846276727, "payload": 50100, "syn": 1, "fin": 0, "ack": 1846326828}, "prompt_sha1": "cf54f08402d0aea7a8f648f3714c1de1f96433f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01010101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01010101", "ones": 4, "parity": 0}, "prompt_sha1": "4ac230ed50f680cb49c439421600049cc402b0c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=100 nF and is stepped to 1 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1(1-e^-4)=0.981684 V; τ=2.2e-05 s and t=8.8e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 1.0000000000000001e-07, "multiple": 4, "vin": 1, "vc": 0.9816843611112658}, "prompt_sha1": "03ac7bab50466f1ec8d35ed57aefe40e807e44d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock A then L1; consumer acquires L1 then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds A while waiting for L1, while consumer holds L1 while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "b1c6ba04d53855af22e9a6b7c15affde8f483f3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x78ABE8 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E8 AB 78.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 7908328, "endian": "little", "bytes": [232, 171, 120]}, "prompt_sha1": "1cced7d2a72ea4003ae2f7a00ff433424e12637b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 011010100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011010100", "ones": 4, "parity": 0}, "prompt_sha1": "a33750dee192618c0162546d2ff5d49812a05077", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 9-bit left-shift register module `shiftreg_left_9`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `9-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_9 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [8:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[7:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_9", "width": 9, "direction": "left"}, "prompt_sha1": "2e862015d08d4cb4d54472dc02be245ab24aa836", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_152` generating a one-clock-cycle `tick` every 152 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_152 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 151) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_152", "divide": 152}, "prompt_sha1": "0dbd7590c8fb86e289fc7cdc75ab6b6fa3169069", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×1²=0.000235 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 1, "energy": 0.000235}, "prompt_sha1": "6b9ebb30d25734b3ec5e68d0cb41799059491c54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=22 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×47/(22+47) = 3.405797 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 22, "r2": 47, "vout": 3.4057971014492754}, "prompt_sha1": "c12bed373a7e9e4dcb34d84471ea78910d509eb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.96.232.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.96.232.0\nBroadcast address: 10.96.232.31\nUsable host range: 10.96.232.1 to 10.96.232.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.96.232.0/27", "usable": 30, "first": "10.96.232.1", "last": "10.96.232.30", "broadcast": "10.96.232.31"}, "prompt_sha1": "10d59177e519af8acd1460c385ff511316863292", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w14_m8425` with clk, asynchronous active-low rst_n, active-high enable, and output logic [13:0] count. On reset count=0. When enabled it increments until 8425 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w14_m8425 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [13:0] count\n);\n localparam logic [13:0] LIMIT = 14'd8425;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w14_m8425", "width": 14, "max": 8425}, "prompt_sha1": "aafb0227ba3b87fadf7aba2d66fc49171caebe64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNNNNNTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 0, 0, 0, 0, 1, 0, 1], "final_state": 1}, "prompt_sha1": "bfd46c259d0e1e03748f1a168df91cd07cedb023", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_13_lsb` for `13-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_13_lsb (\n input logic [12:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 12; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_13_lsb", "width": 13, "priority": "low"}, "prompt_sha1": "b64282d2527e0c149ea78025887a013669a77918", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1.5 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1.5/(5×10^9) = 0.006 s = 6.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.5, "ghz": 5.0, "sec": 0.006}, "prompt_sha1": "4def022fd29e3b3437357c5ed647bd165622bb6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 17-bit left-shift register module `shiftreg_left_17`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `17-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_17 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [16:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[15:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_17", "width": 17, "direction": "left"}, "prompt_sha1": "32683b49edd39511f2657d65f685eae841f71d30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4781` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4781 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4781"}, "prompt_sha1": "2aa7c7c283f9ab1720506ab56c80b6331387fd9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w19_nocin` implementing a 19-bit unsigned adder with inputs `a`, `b` and outputs `19-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w19_nocin (\n input logic [18:0] a,\n input logic [18:0] b,\n output logic [18:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w19_nocin", "width": 19, "cin": false}, "prompt_sha1": "65901486b6eaba6d0e17e853689f9adef097dc37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5168(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5168(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5168([1, 2]) == 1.5\nassert mean_5168([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5168"}, "prompt_sha1": "a49e10b87f12c375d8c25baee58973eeecb88594", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_38_lsb` for `38-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_38_lsb (\n input logic [37:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 37; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_38_lsb", "width": 38, "priority": "low"}, "prompt_sha1": "ccec79c716e6e02cdd4740afcfaa8e162ac6c667", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 16 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 16×13 = 208. Time = 208/19200 = 0.0108333333 s = 10.833333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 9, "parity": 1, "stop": 2, "frames": 16, "seconds": 0.010833333333333334}, "prompt_sha1": "7fd77a8b52485d708823ee7534ba5a2d4a339b4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×5/1000/8 = 625000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 5, "bytes": 625000.0}, "prompt_sha1": "31639b468f14fc641a384cb8a7fa2cfbd8656233", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w49_cin` implementing a 49-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `49-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w49_cin (\n input logic [48:0] a,\n input logic [48:0] b,\n input logic cin,\n output logic [48:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w49_cin", "width": 49, "cin": true}, "prompt_sha1": "067aba28e211b23ec0d3d4432fca69b59a2b4ae1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×1200)/(4700+1200) = 955.932203 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 1200, "req": 955.9322033898304}, "prompt_sha1": "26691304dcaae4b5daa61b1fa9ecb9e6be753585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1400 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1400-20-20 = 1360 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1400, "iphdr": 20, "tcphdr": 20, "mss": 1360}, "prompt_sha1": "24a5718d15792808a6313d49d14509d55ec86b72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 10 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 230400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 10000000/(4×230400) = 10.850694.\nNearest integer divisor D = 11.\nActual baud = 10000000/(4×11) = 227272.727 baud.\nError = (227272.727-230400)/230400×100% = -1.3573%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 10000000, "oversample": 4, "baud": 230400, "divisor": 11, "actual": 227272.72727272726, "error_pct": -1.3573232323232356}, "prompt_sha1": "f563714f086b81c915d5baf8436843693d3e5770", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_9774` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_9774 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_9774", "width": 12}, "prompt_sha1": "af0cb5df4032df862a4d1c5ab27e45824dc16907", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×12²=0.3384 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 12, "energy": 0.33840000000000003}, "prompt_sha1": "be96154baf4e7fb6808f34a142300e149a3bb119", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 25-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^25/2^16 = 2^9 = 512 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 25, "page_exp": 16, "entries": 512}, "prompt_sha1": "81df999a4c846cdc80cb5400c9253e1b775233b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 20 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 20 MHz / 64 = 0.312500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 20000000.0, "divider": 64, "spi_hz": 312500.0}, "prompt_sha1": "fe0483700e5b10715817609affef0b665082bfcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 48 MHz, prescaler divisor is 11, and period is 39350 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 48000000/(11×39350) = 110.892919 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 48000000, "prescaler": 11, "period": 39350, "hz": 110.89291902506642}, "prompt_sha1": "1cbd3b9b552004f46228a633f34aceb6de583cb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6955-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6955×8 = 55640 bits.\nSerialization delay = bits/rate = 55640/(100×10^6) s = 0.0005564 s = 556.400000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6955, "rate_mbps": 100, "delay_s": 0.0005564}, "prompt_sha1": "010f5a93a3c83a7057394ac7519df91259412592", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x11, toggle bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 4)`. Result = 0x1.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 17, "bit": 4, "op": "toggle", "result": 1}, "prompt_sha1": "3749c3900e9ba817b232c24969f42e36170124a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 32 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 32×11 = 352. Time = 352/4800 = 0.0733333333 s = 73.333333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 7, "parity": 1, "stop": 2, "frames": 32, "seconds": 0.07333333333333333}, "prompt_sha1": "b7d79d83649ddd4f5e20fb4ba9065408fa2569c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 4-way set-associative cache uses 32-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/32 = 32768.\nSets = 32768/4 = 8192.\nOffset bits = log2(32) = 5; index bits = log2(8192) = 13; tag bits = 40-5-13 = 22.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 32, "ways": 4, "addr_bits": 40, "lines": 32768, "sets": 8192, "offset": 5, "index": 13, "tag": 22}, "prompt_sha1": "d89f8412c8b7b2ced51a1e6c146eba7b06689dd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 810, and period is 14294 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(810×14294) = 2.072872 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 810, "period": 14294, "hz": 2.0728718084251874}, "prompt_sha1": "e1233a55242c17792ace75ed6cee814974306f34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 11626 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 11626/100000 s; frequency = 100000/11626 = 8.601411 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 11626, "hz": 8.60141063134354}, "prompt_sha1": "a5accd354c3d0ca5de7c78c49dc31a0fbb658b73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_30_msb` for `30-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_30_msb (\n input logic [29:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 30; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_30_msb", "width": 30, "priority": "high"}, "prompt_sha1": "28db0721bd5ec31d9a82cd6dcc778ef1075062c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/2.2 = 0.454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 2.2, "tau": 0.45454545454545453}, "prompt_sha1": "3057909c15b36aee19fb8aec3cf255eb6d7d38bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 48-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^48/2^18 = 2^30 = 1073741824 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 48, "page_exp": 18, "entries": 1073741824}, "prompt_sha1": "c3bee37014901f3eaad841934f7e1c92463e6d1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 10 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(10×10^6) s = 6.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 10, "bits": 64, "time_us": 6.3999999999999995}, "prompt_sha1": "87707e4330eda88785dbf32c6e6d6e05e42ca400", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 8-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/8 = 128.\nOffset bits = log2(16) = 4; index bits = log2(128) = 7; tag bits = 57-4-7 = 46.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 8, "addr_bits": 57, "lines": 1024, "sets": 128, "offset": 4, "index": 7, "tag": 46}, "prompt_sha1": "ec209363ed91b34efc5385c554c061f5607e6dea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/800 = 31250.\nWith prescaler divisor limited to at most 4096, the largest divisor of 31250 that also keeps the period count within 16 bits is 3125.\nPeriod count = 31250/3125 = 10.\nPSC register = 3125-1 = 3124.\nARR register = 10-1 = 9.\nVerification: 25000000/(3125×10) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 800, "total_division": 31250, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 3125, "period": 10, "psc_reg": 3124, "arr_reg": 9}, "prompt_sha1": "1fc6976b3a98a6b016e3c0b72fc5cb7efd10c781", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 8-way set-associative cache uses 32-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/32 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(32) = 5; index bits = log2(1024) = 10; tag bits = 40-5-10 = 25.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 32, "ways": 8, "addr_bits": 40, "lines": 8192, "sets": 1024, "offset": 5, "index": 10, "tag": 25}, "prompt_sha1": "e92ee638fb261a216568b4cdf45a20e35c97b658", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1913567726, carries 33477 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 33477+0+1 = 33478. ACK = (1913567726+33478) mod 2^32 = 1913601204.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1913567726, "payload": 33477, "syn": 0, "fin": 1, "ack": 1913601204}, "prompt_sha1": "862ee24168dc6342461cb2c6077fd8fed2d6d22b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_17` for a synchronous sampled input `noisy`. Update output `clean` only after observing 17 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_17 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 16) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_17", "stable_samples": 17}, "prompt_sha1": "49d8839f3676e2e86658599cff8e8448b5105add", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 6400 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×6400×10^6×2 = 25.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 6400, "channels": 2, "gbps": 25.6}, "prompt_sha1": "d11fc01f49d53aa02769d4989766de693f3c4249", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=1 nF and is stepped to 1 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1(1-e^-2)=0.864665 V; τ=4.7e-06 s and t=9.4e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1e-09, "multiple": 2, "vin": 1, "vc": 0.8646647167633873}, "prompt_sha1": "65ff72d96fb831514a1541fee1a1a6ceaf9aee1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x26C3B4BF. Extract the 8-bit field starting at bit 23 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x26C3B4BF >> 23) & 0xFF = 0x4D (77).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 23, "value": 650359999, "mask": 255, "field": 77}, "prompt_sha1": "5fea9d2db26a0723fd0705772332c753aea27189", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 4113 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×4113/(16×10^6) = 0.0514125 = 5.141250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 200, "cycles": 4113, "load": 0.0514125}, "prompt_sha1": "2a26ad0276d8fb5209a8b0b5721157ccd80a4486", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=5 ms, C=2 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/5 + 2/40 = 0.850000 = 85.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 5], [2, 40]], "utilization": 0.8500000000000001}, "prompt_sha1": "4d84aaaed73897c199b5662aca70c915b945dac7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 0.5 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×0.5/(0.8×10^9) = 0.00125 s = 1.250000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 0.5, "ghz": 0.8, "sec": 0.00125}, "prompt_sha1": "2dd86858b75070ad7fb5ce5313ec718c4720b7b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 39128. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 39128/65535 × 3 V = 1.791165 V.\nThus the estimated input is about 1.7912 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 39128, "volts": 1.7911650263218126}, "prompt_sha1": "4825d22a99ca86edb733880cef6019bd2cd5f63f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 8` on one shared integer without synchronization. Assume `events` initially equals 254. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 254; T2 reads 254; both compute 262; T1 writes 262; T2 writes 262. The observed final value is 262, but two serial increments would produce 270.\n\n```\nlock(mutex)\nevents = events + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "a9b4ca20c123a778527ec3809dae755503123ece", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(5×10^6) s = 204.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 1024, "time_us": 204.79999999999998}, "prompt_sha1": "554cfd25f6b299730eda010f03093bf26fad97ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 7` on one shared integer without synchronization. Assume `events` initially equals 475. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 475; T2 reads 475; both compute 482; T1 writes 482; T2 writes 482. The observed final value is 482, but two serial increments would produce 489.\n\n```\nlock(mutex)\nevents = events + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "a7ea04c51f198f97a188c569f1584524cb68ad67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=47 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/22 = -2.136364.\nVout = A_v×Vin = -2.136364×0.05 = -0.106818 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 47, "vin": 0.05, "gain": -2.1363636363636362, "vout": -0.10681818181818181}, "prompt_sha1": "028c3a4adb3bb44d128f9a0b916edf09b72d6eb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_7487` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_7487 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_7487"}, "prompt_sha1": "c10fca15b0197a58d9fd95e4604979d8ca1adbf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22×560)/(22+560) = 21.168385 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22, "r2": 560, "req": 21.168384879725085}, "prompt_sha1": "f6ce4c1d32c2271e4f3e0cb6f7e8e40ffca10e26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNNNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 0, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "d8c66dfb434e7895b3255d8460e4a9f5a2499d91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=47000 ohm and C=120000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=47000×120000×10^-12 s = 0.00564 s.\nf_c=1/(2πRC)=1/(2π×47000×120000×10^-12) = 28.2190 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 47000, "c_f": 1.2e-07, "tau": 0.005639999999999999, "fc": 28.218961541116197}, "prompt_sha1": "6ab9f2f7a26a4d54b2ac8037b07be3b570901677", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w17_nocin` implementing a 17-bit unsigned adder with inputs `a`, `b` and outputs `17-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w17_nocin (\n input logic [16:0] a,\n input logic [16:0] b,\n output logic [16:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w17_nocin", "width": 17, "cin": false}, "prompt_sha1": "d576a41b57e611cf7a925dd326ee98fcdc3bca41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 18.1 V source drives a 1500 ohm resistor in series with an LED whose forward voltage is assumed to be 1.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 18.1-1.6 = 16.5 V.\nI = V/R = 16.5/1500 A = 11.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 18.1, "vf": 1.6, "r": 1500, "current_a": 0.011}, "prompt_sha1": "68b812c7abaa141a4d25fb4352bfc864e602ebd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 120 MHz, prescaler divisor is 535, and period is 49622 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 120000000/(535×49622) = 4.520154 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 120000000, "prescaler": 535, "period": 49622, "hz": 4.520153670157606}, "prompt_sha1": "442d5a3d6d12b4b25403d602b4575f0c8c7284af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=4700 nF and is stepped to 9 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=9(1-e^-3)=8.551916 V; τ=0.1034 s and t=0.3102 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 4.7e-06, "multiple": 3, "vin": 9, "vc": 8.551916384689225}, "prompt_sha1": "9b1da747a5440a2a59f4f6bb660c1b36a6b0643a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 146-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 146×8 = 1168 bits.\nSerialization delay = bits/rate = 1168/(5000×10^6) s = 2.336e-07 s = 0.233600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 146, "rate_mbps": 5000, "delay_s": 2.336e-07}, "prompt_sha1": "a7f0074433bdbb50072d181b17991429e5658487", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-28 = 1212 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 28, "mss": 1212}, "prompt_sha1": "84ee7e8386406435826d3680c0c0087c95fca3e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/1 = 0.00047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 1, "tau": 0.00047}, "prompt_sha1": "01745ae7451a5fb3c5623820cbdeca9579fb8086", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xB5C30A in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: B5 C3 0A.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 11911946, "endian": "big", "bytes": [181, 195, 10]}, "prompt_sha1": "e71656eea3880f900e33edb330b6a6d6fc6c1001", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×48²=0.0054144 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 48, "energy": 0.0054144}, "prompt_sha1": "1ff7a58b2c89b699e39506e9183202f627e4c963", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 21 elements. Review loop `for i in range(21+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(21+1)` includes index 21, which is out of range for a length-21 sequence. Correct loop: `for i in range(21):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 21, "variant": "one_past"}, "prompt_sha1": "14b972882a5d99996f921ec30ef8ff67f04c914c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1492 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-20-32 = 1440 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 20, "tcphdr": 32, "mss": 1440}, "prompt_sha1": "e4a90eca6bcfa0c5340be1b219abe88a5cd7e453", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.57. Using Amdahl's law, compute the theoretical speedup on 6 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.57) + 0.57/6) = 1.904762.\nThe theoretical speedup is about 1.905×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.57, "n": 6, "result": 1.9047619047619047}, "prompt_sha1": "79b9c5422ab0729fcf4b24cbe8744c02e2dae211", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 2.5 V reference and returns code 2758. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2758/4095 × 2.5 V = 1.683761 V.\nThus the estimated input is about 1.6838 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 2.5, "code": 2758, "volts": 1.683760683760684}, "prompt_sha1": "c1bfe682e7d088f8d2bd3600ea9f32b5a15623ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 136 elements. Review loop `for i in range(136+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(136+1)` includes index 136, which is out of range for a length-136 sequence. Correct loop: `for i in range(136):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 136, "variant": "one_past"}, "prompt_sha1": "3ef2fc68c57002c76ed036ecbf9be4602749f1ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['P', 'P', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["P", "P", "V", "P", "P", "P", "V", "V", "P", "V", "P"], "value": 3, "blocked": 0}, "prompt_sha1": "a0e7bcc24248871b823984b9cd86f2b2c8f8bbe1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 896 payload bytes plus 80 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 896/(896+80) = 0.918033 = 91.80%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 896, "overhead": 80, "efficiency": 0.9180327868852459}, "prompt_sha1": "6a5b45e09e54bdbfb5255f9f2434cf16c2b1b61a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_51` for a 51-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_51 (\n input logic signed [50:0] data,\n input logic [5:0] shamt,\n output logic signed [50:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_51", "width": 51, "direction": "right", "arithmetic": true}, "prompt_sha1": "4b482bd579d58eac766b7fcafe375f66f44273d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 16 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×80×10^6 = 1280000000 B/s. Time = 2048/1280000000 = 1.6e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 16, "rate_mhz": 80, "sec": 1.6e-06}, "prompt_sha1": "b2f153f0c5d4e6f64dd4d4a62a79f05de98b6fac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_14306` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_14306 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_14306"}, "prompt_sha1": "c77c8db129506cee896bc4f4a169f89fe47c09fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 20-bit ADC spanning 0 to 1 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1/2^20 V = 9.53674316406e-07 V = 0.953674 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 20, "vref": 1.0, "step": 9.5367431640625e-07}, "prompt_sha1": "a164b9efaee6454c0f430433b0e1075af4be86e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1×10^6 / (768×8) = 162.760417 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "frame_bytes": 768, "pps": 162.76041666666666}, "prompt_sha1": "9ea0a85788a6e845e4a98263747d1511961827fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 110 Hz satisfies it.", "output": "Nyquist minimum is 2×50 = 100 Hz. Proposed rate 110 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50, "min_fs": 100, "proposed": 110.00000000000001}, "prompt_sha1": "50853da96799072776b3af3f905b0ddbf67e69a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×24²=0.0006336 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 24, "energy": 0.0006336}, "prompt_sha1": "20ded632ddc59ed86f91f3a5fdc3ba61c0f936bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 23719 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23719/10000 s; frequency = 10000/23719 = 0.421603 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 23719, "hz": 0.4216029343564231}, "prompt_sha1": "0a250628ce6b09813b0873aa7d5a87e0b51200e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 128 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 128/(128+36) = 0.780488 = 78.05%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 128, "overhead": 36, "efficiency": 0.7804878048780488}, "prompt_sha1": "7949836ab3a44373a373daf7518f76c929fb34ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_46_6` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 46, and YELLOW for 6; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_46_6 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 45) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 5) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_46_6", "red": 28, "green": 46, "yellow": 6}, "prompt_sha1": "8490043acb4eba30d2034b5bd97978aa4357c3fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×256 KiB = 12288 KiB = 12582912 bytes = 12.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 256, "reach": 12582912}, "prompt_sha1": "c902d3f9d3259693cbb5c8101791a4aac570872b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65325; x = x + 440;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65325+440 = 65765. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65765) mod 2^16 = 229. So `x` stores 229. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65325, "add": 440, "result": 229}, "prompt_sha1": "dcfa4c6ababa7bc94235dda27c68472bdb5bf0e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 4-way set-associative cache uses 32-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/32 = 4096.\nSets = 4096/4 = 1024.\nOffset bits = log2(32) = 5; index bits = log2(1024) = 10; tag bits = 57-5-10 = 42.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 32, "ways": 4, "addr_bits": 57, "lines": 4096, "sets": 1024, "offset": 5, "index": 10, "tag": 42}, "prompt_sha1": "ea2aad22975c52f76e262810999263d5e9e292d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['V', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["V", "P", "V", "P", "V", "P", "V", "P", "V", "P", "V", "P", "P", "V"], "value": 8, "blocked": 0}, "prompt_sha1": "333903649f840309cc5b50fc436a45c210bb33c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_127` for a synchronous sampled input `noisy`. Update output `clean` only after observing 127 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_127 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 126) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_127", "stable_samples": 127}, "prompt_sha1": "a4b3cfe6e81abfcd8419d53d36562bfe0f4e5d0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock DESC then C; consumer acquires C then DESC. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds DESC while waiting for C, while consumer holds C while waiting for DESC; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "59994c92243c740fc2b2d08c95a893ce55b4466a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5518-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5518×8 = 44144 bits.\nSerialization delay = bits/rate = 44144/(25000×10^6) s = 1.76576e-06 s = 1.765760 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5518, "rate_mbps": 25000, "delay_s": 1.76576e-06}, "prompt_sha1": "db85692081f69ea8854ede18ff8a3a7b0d111898", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 36 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 36-12 = 24.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 36, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 24}, "prompt_sha1": "6ad7f7dd0d2d0db0452fc0375b1bebb14ee88dde", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 2-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/256 = 512.\nSets = 512/2 = 256.\nOffset bits = log2(256) = 8; index bits = log2(256) = 8; tag bits = 32-8-8 = 16.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 256, "ways": 2, "addr_bits": 32, "lines": 512, "sets": 256, "offset": 8, "index": 8, "tag": 16}, "prompt_sha1": "12a3bb6a08d1b66127ad27b1e2ce5513106b359e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 23800 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 23800/10000000 s; frequency = 10000000/23800 = 420.168067 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 23800, "hz": 420.16806722689074}, "prompt_sha1": "2ac06dcc4bb62852d0b3b04f8681085051446a2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_36` for a synchronous sampled input `noisy`. Update output `clean` only after observing 36 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_36 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 35) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_36", "stable_samples": 36}, "prompt_sha1": "cdcd1b89d75184c17c22c04f72d5fa2b58050eae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_33` for a 33-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_33 (\n input logic signed [32:0] data,\n input logic [5:0] shamt,\n output logic signed [32:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_33", "width": 33, "direction": "right", "arithmetic": true}, "prompt_sha1": "9044bf2e691a81b151c21101c26566aab49335ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/400 = 300000.\nWith prescaler divisor limited to at most 128, the largest divisor of 300000 that also keeps the period count within 16 bits is 125.\nPeriod count = 300000/125 = 2400.\nPSC register = 125-1 = 124.\nARR register = 2400-1 = 2399.\nVerification: 120000000/(125×2400) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 400, "total_division": 300000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 2400, "psc_reg": 124, "arr_reg": 2399}, "prompt_sha1": "91cc4533afb486083e27e1de313865b912d7a813", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 8 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 8000000/(8×460800) = 2.170139.\nNearest integer divisor D = 2.\nActual baud = 8000000/(8×2) = 500000.000 baud.\nError = (500000.000-460800)/460800×100% = 8.5069%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 8000000, "oversample": 8, "baud": 460800, "divisor": 2, "actual": 500000.0, "error_pct": 8.506944444444445}, "prompt_sha1": "4a5475a41254f547696f190f78d093082c0fbd03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 4 = 0.090000.\nEffective CPI = 1.1 + 0.090000 = 1.190000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.15, "penalty": 4, "result": 1.1900000000000002}, "prompt_sha1": "95c73152af97820d39f320cb4314a28aae051df0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=100 nF and is stepped to 3.3 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=3.3(1-e^-1)=2.085998 V; τ=0.01 s and t=0.01 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 1.0000000000000001e-07, "multiple": 1, "vin": 3.3, "vc": 2.08599784413424}, "prompt_sha1": "cc4661ee72a12ebc4cff07858be967479dacfc3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 7.4 V source drives a 8200 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 7.4-2 = 5.4 V.\nI = V/R = 5.4/8200 A = 0.6585 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 7.4, "vf": 2.0, "r": 8200, "current_a": 0.0006585365853658537}, "prompt_sha1": "df0ec891cf726cb0fc7899bc73ed50e34540663e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=50 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/50 + 4/50 = 0.180000 = 18.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 50], [4, 50]], "utilization": 0.18}, "prompt_sha1": "8e448c9a27acf9bf542523b8c6ac9e152f47cb44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4662(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4662(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4662([1, 2]) == 1.5\nassert mean_4662([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4662"}, "prompt_sha1": "a440c8ff8fcf956c0ac91b40790f60f9d8256fcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.43. Using Amdahl's law, compute the theoretical speedup on 256 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.43) + 0.43/256) = 1.749231.\nThe theoretical speedup is about 1.749×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.43, "n": 256, "result": 1.749231294841134}, "prompt_sha1": "6ff36ccd2765d873a1c3b3286670ce9f5d363739", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_25` generating a one-clock-cycle `tick` every 25 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_25 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 24) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_25", "divide": 25}, "prompt_sha1": "148fde6ff4a2ed8ec4b3bb35fbebbb30b76c4340", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 100 Hz. Each ISR consumes 2372 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 100×2372/(200×10^6) = 0.001186 = 0.118600%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 100, "cycles": 2372, "load": 0.001186}, "prompt_sha1": "0941da31b808ac43a694df9a9f93840a47bbc00a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 20%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.200 × 8 = 0.160000.\nEffective CPI = 1.1 + 0.160000 = 1.260000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.2, "penalty": 8, "result": 1.2600000000000002}, "prompt_sha1": "f3ba78986f0765c93b8a8aa976e6ba75656c2265", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 2532 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 2532/1000000 s; frequency = 1000000/2532 = 394.944708 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 2532, "hz": 394.9447077409163}, "prompt_sha1": "131a19ef26864b0eb9300031be25b4390087d12e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 16 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×50×10^6 = 800000000 B/s. Time = 2048/800000000 = 2.56e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 16, "rate_mhz": 50, "sec": 2.56e-06}, "prompt_sha1": "375e01cf22285db57e255ad9f9e83e636e255d65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 2400 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×2400×10^6×8 = 38.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 2400, "channels": 8, "gbps": 38.4}, "prompt_sha1": "28ca6996ea492f831ec03ad833efb6312344c1df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w10_m275` with clk, asynchronous active-low rst_n, active-high enable, and output logic [9:0] count. On reset count=0. When enabled it increments until 275 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w10_m275 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [9:0] count\n);\n localparam logic [9:0] LIMIT = 10'd275;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w10_m275", "width": 10, "max": 275}, "prompt_sha1": "6d08d53c943d1031da95d2bfe67fe588099b75de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_9703` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_9703 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_9703", "width": 4}, "prompt_sha1": "4d72587aac47c770d68375e58854d338aa29483e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2780 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "79c0a3aa46873b8d3a3aa326dd8859bef0f974d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 2847 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 20000×2847/(32×10^6) = 1.779375 = 177.937500%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 20000, "cycles": 2847, "load": 1.779375}, "prompt_sha1": "7326313b683e3dc2e0925f021e7d0cf9a70843c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "3a49c0a7c75580c4703a7927ee77fb5ccdb10702", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "659bdfe04ac1aa890f6533e72e99539caab20f6d50f29964901f12a57160bd43", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 5319, "original_row_sha256": "c73663afb9bcadb085a0d51a990fcc909ed559408258dcb3f3a2ad043add59da", "version": "v1.0.0-rc1"}}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/220 = 4.54545455e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 220, "tau": 4.5454545454545455e-06}, "prompt_sha1": "d199436739ad186ec2b6d5216c5953be46d65a5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_121` for a synchronous sampled input `noisy`. Update output `clean` only after observing 121 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_121 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 120) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_121", "stable_samples": 121}, "prompt_sha1": "2678ddbffbaf103fdce75e61a2cb7f661d465d7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'V', 'P', 'V', 'P', 'P', 'V', 'V', 'P', 'P', 'P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "V", "P", "V", "P", "P", "V", "V", "P", "P", "P", "V", "V", "P", "P"], "value": 2, "blocked": 0}, "prompt_sha1": "c05e3a7f2e5d6eb7bdc665651051789282b5bb48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.1 V source drives a 1000 ohm resistor in series with an LED whose forward voltage is assumed to be 2.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.1-2.4 = 5.7 V.\nI = V/R = 5.7/1000 A = 5.7000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.1, "vf": 2.4, "r": 1000, "current_a": 0.005699999999999999}, "prompt_sha1": "48788815520e89cec8877be96dd58c136811a052", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 513668882, carries 3927 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 3927+1+1 = 3929. ACK = (513668882+3929) mod 2^32 = 513672811.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 513668882, "payload": 3927, "syn": 1, "fin": 1, "ack": 513672811}, "prompt_sha1": "5cd05d321af99453292a26cb5efbd55dc6ba5fce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3812364591, carries 8457 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 8457+1+1 = 8459. ACK = (3812364591+8459) mod 2^32 = 3812373050.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3812364591, "payload": 8457, "syn": 1, "fin": 1, "ack": 3812373050}, "prompt_sha1": "e18e76ea12de1c8b1c75a0581999273bbebf8322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/4700=0.000382978723 A. P=V²/R=1.8²/4700=0.000689361702 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 4700, "i": 0.00038297872340425535, "p": 0.0006893617021276596}, "prompt_sha1": "b3cf89cb097eac5c0fa3b66e5b871403e0eac955", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1288 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1288-40-60 = 1188 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1288, "iphdr": 40, "tcphdr": 60, "mss": 1188}, "prompt_sha1": "1c5262a28d07cde948a4cfdc9eb45a63e71dbe10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "688e699d0c2f355e793c7c2516f5f2f4320fe132", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "a0c25e8ff241330bfdce3a2afc401e3f1ddb2ff0c364d53108cb2565e671fba3", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 5327, "original_row_sha256": "24f149275c5756d08525dc3c1097d1b94041d45ddb6eadbc819fa3f96fa34cc7", "version": "v1.0.0-rc1"}}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(8×10^6) s = 1.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 8, "time_us": 1.0}, "prompt_sha1": "9c91db5951c730c06f6cfd5c8316a22ef6adb212", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=680000 ohm and C=68000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=680000×68000×10^-12 s = 0.04624 s.\nf_c=1/(2πRC)=1/(2π×680000×68000×10^-12) = 3.4419 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 680000, "c_f": 6.8e-08, "tau": 0.04624, "fc": 3.4419321602918544}, "prompt_sha1": "04a60db079023d71e015d7961c52c427749fd456", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.76. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.76) + 0.76/3) = 2.027027.\nThe theoretical speedup is about 2.027×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.76, "n": 3, "result": 2.027027027027027}, "prompt_sha1": "1f8fe56d1e578dd33540015f9ed036d80d9fd8fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 32298 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 32298/50000000 s; frequency = 50000000/32298 = 1548.083473 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 32298, "hz": 1548.083472660846}, "prompt_sha1": "7c559917e04234986ec0593bb24b0581f3de95ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 8` on one shared integer without synchronization. Assume `events` initially equals 424. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 424; T2 reads 424; both compute 432; T1 writes 432; T2 writes 432. The observed final value is 432, but two serial increments would produce 440.\n\n```\nlock(mutex)\nevents = events + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "ae9a603e8cd8f19ce25ddc555d4977fa0c01a415", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111010100100010001010100 using generator polynomial bits 11011111. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0101101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 223, "msg_bits": 24, "msg": 15352916, "remainder": 45}, "prompt_sha1": "dc27f249e3a651aa355c736f2bb4698b0a5701b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_57` generating a one-clock-cycle `tick` every 57 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_57 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 56) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_57", "divide": 57}, "prompt_sha1": "29da693fd6c78ad064247b4aff3fb95d5660be61", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x40_no_bypass` with 64 entries of 40 bits. Inputs: `clk`, `we`, `6-bit waddr`, `40-bit wdata`, `6-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [39:0] wdata,\n input logic [5:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x40_no_bypass", "entries": 64, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "01e8ba83cfe63109b2d06036baff3bf102f7f1ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x29, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x29<<1)|0 = 0x52 = 01010010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 41, "rw": 0, "byte": 82}, "prompt_sha1": "242b558a5b03be8ec649ed35beabba3db883390b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TNTNNNTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 0, 1, 0, 0, 0, 1, 1, 1], "final_state": 3}, "prompt_sha1": "e6f34908fb893327c6246c9dfa5c37211fbf8b90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 128 KiB 8-way set-associative cache uses 64-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 131072/64 = 2048.\nSets = 2048/8 = 256.\nOffset bits = log2(64) = 6; index bits = log2(256) = 8; tag bits = 64-6-8 = 50.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 128, "line": 64, "ways": 8, "addr_bits": 64, "lines": 2048, "sets": 256, "offset": 6, "index": 8, "tag": 50}, "prompt_sha1": "9b4a93c8b7c8385ca6cdff6f3cdff218b17c287f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 7` on one shared integer without synchronization. Assume `credits` initially equals 360. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 360; T2 reads 360; both compute 367; T1 writes 367; T2 writes 367. The observed final value is 367, but two serial increments would produce 374.\n\n```\nlock(mutex)\ncredits = credits + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "5e825b31ae0e81ba287dd44f21963faf49bb7080", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w46_nocin` implementing a 46-bit unsigned adder with inputs `a`, `b` and outputs `46-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w46_nocin (\n input logic [45:0] a,\n input logic [45:0] b,\n output logic [45:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w46_nocin", "width": 46, "cin": false}, "prompt_sha1": "12d851dfa09bff59d2e3e256a57f3f69feb68ac1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1110100101111 using generator polynomial bits 1110011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 101111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 115, "msg_bits": 13, "msg": 7471, "remainder": 47}, "prompt_sha1": "65e02b4d712e82205bb4f9d71e685743784fd573", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_4_12_2` with RED, GREEN, YELLOW states. Hold RED for 4 clock cycles, GREEN for 12, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_4_12_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 3) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 11) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_4_12_2", "red": 4, "green": 12, "yellow": 2}, "prompt_sha1": "57648f80b500b4501640125240327861f5f4664c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5937-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5937×8 = 47496 bits.\nSerialization delay = bits/rate = 47496/(10×10^6) s = 0.0047496 s = 4749.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5937, "rate_mbps": 10, "delay_s": 0.0047496}, "prompt_sha1": "96b1529b72d07723d1777dd148b72baef98a7443", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 100 counts per period. What compare/high-time count produces exactly 45% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.45 × 100 = 45. Verification: 45/100 = 0.45, which is 45%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 100, "duty": 45, "high": 45}, "prompt_sha1": "c25613302516e9918d17b744a4b786c1525f51da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 16-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/16 = 1024.\nOffset bits = log2(16) = 4.\nIndex bits = log2(1024) = 10.\nTag bits = 64-10-4 = 50.\nCheck: 50+10+4 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 16, "addr_bits": 64, "lines": 1024, "offset_bits": 4, "index_bits": 10, "tag_bits": 50}, "prompt_sha1": "2eca7f25f06b61e8c0b9adacf3b3f4995582a144", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 160 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 160000000/1000 = 160000.\nWith prescaler divisor limited to at most 128, the largest divisor of 160000 that also keeps the period count within 16 bits is 128.\nPeriod count = 160000/128 = 1250.\nPSC register = 128-1 = 127.\nARR register = 1250-1 = 1249.\nVerification: 160000000/(128×1250) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 160000000, "target_hz": 1000, "total_division": 160000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 128, "period": 1250, "psc_reg": 127, "arr_reg": 1249}, "prompt_sha1": "8d2ba6ebaf8c1062c65cbdfa4bff3f7e28686b75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2500 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2500×10^6 × 0.5/1000 = 1.25e+06 bits = 156250 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2500, "rtt_ms": 0.5, "bits": 1250000.0, "bytes": 156250.0}, "prompt_sha1": "6c241951feec55a643c573144585ced311e473bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 61 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 61 = 63.\nClock pulses = 63×9 = 567.\nTime = 567/1000000 s = 567.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 61, "clocks": 567, "time_s": 0.000567}, "prompt_sha1": "9cb31da60ca09ad846ac13669766fd99e0acfd0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x48_no_bypass` with 32 entries of 48 bits. Inputs: `clk`, `we`, `5-bit waddr`, `48-bit wdata`, `5-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x48_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [47:0] wdata,\n input logic [4:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x48_no_bypass", "entries": 32, "width": 48, "mode": "no_bypass"}, "prompt_sha1": "80cd60f17db3039bca441acc75bab372ba904dd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_315935` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_315935 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_315935"}, "prompt_sha1": "6b8043eeeb20d4dbc6c8d640bc3e74ecbefef243", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×32 KiB = 6144 KiB = 6291456 bytes = 6.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 32, "reach": 6291456}, "prompt_sha1": "141c62c1beb448204ac5be76a2879fbd591e18c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_98_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 98 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_98_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd98;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_98_ignore", "cycles": 98, "retrigger": false}, "prompt_sha1": "9111ecfd3d0cf9076be8beb5113ff03666c7897f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 5-bit up/down counter `updown_5_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_5_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [4:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 5'd31) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_5_sat", "width": 5, "wrap": false}, "prompt_sha1": "7da8bd665725dac29a6f6ad10ab971328ca68a6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 956 elements. Review loop `for i in range(956+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(956+1)` includes index 956, which is out of range for a length-956 sequence. Correct loop: `for i in range(956):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 956, "variant": "one_past"}, "prompt_sha1": "c4004b3016d18c6eb95d0ffe21abe2b9c39d06a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_3360` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_3360 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_3360", "width": 24}, "prompt_sha1": "1b6a40fb37f4f1b3ff087d04518f41c8c4ef7e60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.49. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.49) + 0.49/3) = 1.485149.\nThe theoretical speedup is about 1.485×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.49, "n": 3, "result": 1.4851485148514851}, "prompt_sha1": "4849bb56dafe80226ae7f5111e859dee07236eea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x49, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x49<<1)|0 = 0x92 = 10010010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 73, "rw": 0, "byte": 146}, "prompt_sha1": "930873a455849918030864befcfd744989e997d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 91.9% hit rate, and a 95 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.919 = 0.081.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.081×95 ns = 12.1950 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.919, "penalty": 95, "result": 12.194999999999997}, "prompt_sha1": "abae9c1a8ed922f573f28c0d426d4238237a05b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x8_write_bypass` with 8 entries of 8 bits. Inputs: `clk`, `we`, `3-bit waddr`, `8-bit wdata`, `3-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [7:0] wdata,\n input logic [2:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x8_write_bypass", "entries": 8, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "a6beb9e7837e4b8cbbca9adf050765451640c97e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_57` for a 57-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_57 (\n input logic signed [56:0] data,\n input logic [5:0] shamt,\n output logic signed [56:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_57", "width": 57, "direction": "right", "arithmetic": true}, "prompt_sha1": "3b43a12fffb150cc02f7782c7a891f9d4cc4cb5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 37 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 37-20 = 17.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 37, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 17}, "prompt_sha1": "0016fe3d9d71fffd61e615b3810447d608c5688c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 12 MHz. Sampling consumes 39.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+14 = 53.5. Period = 53.5/12000000 = 4.45833333e-06 s. Maximum rate = 1/period = 224299.065421 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 12000000.0, "sample_cycles": 39.5, "conv_cycles": 14, "period": 4.4583333333333336e-06, "rate": 224299.06542056074}, "prompt_sha1": "dd340f3cb4f2d041e5b9e07961b588d834b82fbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "d0682753ee7058ec49efcbccadc2662101adaafe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1024 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 1024 = 512. Verification: 512/1024 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1024, "duty": 50, "high": 512}, "prompt_sha1": "4a3edf8643338da72cec8d289ebb6eeec376daa1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 3 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×3/(3.5×10^9) = 0.0171428571 s = 17.142857 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 3.0, "ghz": 3.5, "sec": 0.017142857142857144}, "prompt_sha1": "9bc43056720959844d9fb281e0ca07937b139864", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 1 MHz, prescaler divisor is 669, and period is 15880 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 1000000/(669×15880) = 0.094129 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 1000000, "prescaler": 669, "period": 15880, "hz": 0.09412898683323732}, "prompt_sha1": "4af36e8f2fe198fec345f79d9604d3aae9ce6442", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1899E42B166D1914 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 14 19 6D 16 2B E4 99 18.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 1772698802057976084, "endian": "little", "bytes": [20, 25, 109, 22, 43, 228, 153, 24]}, "prompt_sha1": "aa32c9747d284d64aad4659093a7db4cb3ab7a0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Give the exact SPI clock frequency when the divider field value is known but the peripheral source clock and divider encoding are not provided.", "output": "The exact SPI clock is underdetermined. The source clock and the device-specific mapping from divider field to divisor are required. I would request those rather than inventing a frequency.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "f421af98cd4f75578c4bb578a38181972484f585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 62.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.625 × 1000 = 625. Verification: 625/1000 = 0.625, which is 62.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 62.5, "high": 625}, "prompt_sha1": "b720e204e287151c6b59ad1d59a14ff8adb6f2e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×128 KiB = 1024 KiB = 1048576 bytes = 1.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 128, "reach": 1048576}, "prompt_sha1": "1ebd2e4b278f9576529838a655f08be4d15d87b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xC18C in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C1 8C.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 49548, "endian": "big", "bytes": [193, 140]}, "prompt_sha1": "f3814aafa1c23fe7235b66390d2259409b7a8e21", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(50×10^6) s = 1.280000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 64, "time_us": 1.28}, "prompt_sha1": "9b24f34c1f9aae271a803827870a01012b29fb87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10110 using generator polynomial bits 1011. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 11, "msg_bits": 5, "msg": 22, "remainder": 0}, "prompt_sha1": "6a4f0b1d6826146bf2222fd1e509db6972dd00e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 150/1000 = 3.75e+07 bits = 4.6875e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 150, "bits": 37500000.0, "bytes": 4687500.0}, "prompt_sha1": "199ea8dda9afa1ae5abe5578aff872694d594764", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m244` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 244 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m244 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd244;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m244", "width": 8, "max": 244}, "prompt_sha1": "8926a2989d11047d7722b3150888f45b885ba7e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 55 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 55-14 = 41.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 55, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 41}, "prompt_sha1": "14b4864a75339e81531fac434a07bcc4b9b32e8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 12 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 12000000/(4×250000) = 12.000000.\nNearest integer divisor D = 12.\nActual baud = 12000000/(4×12) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 12000000, "oversample": 4, "baud": 250000, "divisor": 12, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "9623c897eed841ee0804282b4cfcf7193284bfcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (1024×8) = 610351.562500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 1024, "pps": 610351.5625}, "prompt_sha1": "9f763fa89801cf5563a1b843ee8f007c2d8178f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=40 ms, C=1 ms,T=5 ms, C=5 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/40 + 1/5 + 5/25 = 0.425000 = 42.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 40], [1, 5], [5, 25]], "utilization": 0.42500000000000004}, "prompt_sha1": "0493fcef098f37f2dffc7c1f4504446906ff39d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×8 KiB = 2048 KiB = 2097152 bytes = 2.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 8, "reach": 2097152}, "prompt_sha1": "4736513614626887592d6d005d0c616ab0539092", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_1344` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_1344 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_1344"}, "prompt_sha1": "0ced4df8553971989dc5a77d247ca223097b3e98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8901-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8901×8 = 71208 bits.\nSerialization delay = bits/rate = 71208/(10×10^6) s = 0.0071208 s = 7120.800000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8901, "rate_mbps": 10, "delay_s": 0.0071208}, "prompt_sha1": "d6cf547dfeac460e8d202c95baad265e510fcf4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 0, 0], "final_state": 0}, "prompt_sha1": "9de027d663ef79a5ca03dbafead6f0115ac24c36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8768` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8768 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8768"}, "prompt_sha1": "79df04e699fa0fa29559972ec6df213539508103", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_7733` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_7733 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_7733", "width": 8}, "prompt_sha1": "29d863f990b93406f4c4fa8322183d854130b483", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x1C30BC05, clear bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 5)`. Result = 0x1C30BC05.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 472955909, "bit": 5, "op": "clear", "result": 472955909}, "prompt_sha1": "61abebb3a429f7eab68a3735f1533087109372f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m20` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 20 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m20 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd20;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m20", "width": 6, "max": 20}, "prompt_sha1": "e8113d5fc783536d903c17e85604fcc9f432e536", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w16_8285` implementing a dual-clock asynchronous FIFO with depth 8 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w16_8285 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 16,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w16_8285", "depth": 8, "width": 16, "ptr_w": 3}, "prompt_sha1": "2586491e0a7fde3170553bbe6e2582173e122e4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x23, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x23<<1)|1 = 0x47 = 01000111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 35, "rw": 1, "byte": 71}, "prompt_sha1": "50d029bf55bee9ebb5d69401beacf9272dc361bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 25000 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 25000×10^6 / (1024×8) = 3051757.812500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "frame_bytes": 1024, "pps": 3051757.8125}, "prompt_sha1": "c4786930abb890c4c1802e39cf0b2a6bff6f16ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x7065180C, set bit 12 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 12)`. Result = 0x7065180C.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 1885673484, "bit": 12, "op": "set", "result": 1885673484}, "prompt_sha1": "60a7aa4f48976c9edf50d5bbd6b63b647b287590", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 4-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/16 = 2048.\nSets = 2048/4 = 512.\nOffset bits = log2(16) = 4; index bits = log2(512) = 9; tag bits = 57-4-9 = 44.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 16, "ways": 4, "addr_bits": 57, "lines": 2048, "sets": 512, "offset": 4, "index": 9, "tag": 44}, "prompt_sha1": "696408055b3753741013617120d4cdb205db0a65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=2200 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=0.0484 s and t=0.0484 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 2.2e-06, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "a57382d086103e0ce23fc52bbf721affacae2b0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_3730` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_3730 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_3730"}, "prompt_sha1": "0ee309c99dc8540fda727bfdbe9e2b40eee7b1c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 64 = 0.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 64, "spi_hz": 125000.0}, "prompt_sha1": "e6ca8aa22cb3d2d6e0dfc216893b6a24bf6d5f18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 9-bit ADC spanning 0 to 1.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.5/2^9 V = 0.0029296875 V = 2929.687500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 9, "vref": 1.5, "step": 0.0029296875}, "prompt_sha1": "d0312372c49a4cffc3a00facf48a44b603a1085f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 12 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×12)/(680+12) = 11.791908 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 12, "req": 11.791907514450868}, "prompt_sha1": "3ff2cdd3353150df80fdb1a879d14d93529c3925", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4610(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4610(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4610([1, 2]) == 1.5\nassert mean_4610([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4610"}, "prompt_sha1": "b42fb74e09cae2bc14eb8342aed8ccdd653d53da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/5000 = 33600.\nWith prescaler divisor limited to at most 16, the largest divisor of 33600 that also keeps the period count within 16 bits is 16.\nPeriod count = 33600/16 = 2100.\nPSC register = 16-1 = 15.\nARR register = 2100-1 = 2099.\nVerification: 168000000/(16×2100) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 5000, "total_division": 33600, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 2100, "psc_reg": 15, "arr_reg": 2099}, "prompt_sha1": "52a59fbc6f5f9c3666206fd8820f29c5c768b661", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 160 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 9600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 160000000/(8×9600) = 2083.333333.\nNearest integer divisor D = 2083.\nActual baud = 160000000/(8×2083) = 9601.536 baud.\nError = (9601.536-9600)/9600×100% = 0.0160%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 160000000, "oversample": 8, "baud": 9600, "divisor": 2083, "actual": 9601.536245799329, "error_pct": 0.016002560409674516}, "prompt_sha1": "b84c82ecea2d22658fa1f90bd7feeb62b9989012", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x67, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x67<<1)|1 = 0xCF = 11001111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 103, "rw": 1, "byte": 207}, "prompt_sha1": "93237428e00a6e3aad82b07c70203341d96f80ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 3 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×3/(2×10^9) = 0.003 s = 3.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 3.0, "ghz": 2.0, "sec": 0.003}, "prompt_sha1": "af0b22bb34e70554fc8755cec879d4ca9ea69661", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.25 ns hit time, 88.2% hit rate, and a 100 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.882 = 0.118.\nAMAT = hit time + miss rate × miss penalty\n= 2.25 ns + 0.118×100 ns = 14.0500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.25, "hit_rate": 0.882, "penalty": 100, "result": 14.049999999999999}, "prompt_sha1": "ac19bd81fd6c7d1db72d86bcf2d7a17406367fe6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_4314` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_4314 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_4314", "width": 10}, "prompt_sha1": "34177a961c5e8a576056349bb698f0555a922125", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.54. Using Amdahl's law, compute the theoretical speedup on 3 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.54) + 0.54/3) = 1.562500.\nThe theoretical speedup is about 1.562×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.54, "n": 3, "result": 1.5625}, "prompt_sha1": "7ef1291e7ab9f6a24a809cf4b61b8cce9d90fb86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8400` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8400 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8400"}, "prompt_sha1": "039c5d92eafb0d9128afc5e2dd6926c5913aa247", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/4.7 = 0.000212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 4.7, "tau": 0.0002127659574468085}, "prompt_sha1": "db1ad4531344f43403f69466e79e42c6911d5497", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 75%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.100×(10+0.250×200) = 6.500000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.9, "l2": 10, "l2_hit": 0.75, "mem": 200, "amat": 6.499999999999998}, "prompt_sha1": "f0db4a9160112937ac09ac5408c4f731ff59664a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 89.4% hit rate, and a 30 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.894 = 0.106.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.106×30 ns = 7.1800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.894, "penalty": 30, "result": 7.18}, "prompt_sha1": "60ac9a88040a46347aa9b8b57aeca387f0f1735f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 19 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 19 = 21.\nClock pulses = 21×9 = 189.\nTime = 189/400000 s = 472.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 19, "clocks": 189, "time_s": 0.0004725}, "prompt_sha1": "a58c1cc94a2c42ecc009470ba09508d3c10d0f7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (4096×8) = 6103.515625 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 4096, "pps": 6103.515625}, "prompt_sha1": "de9beff6f61a47e54823b6ba0dd37ec1153fde75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 1984 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×1984/(400×10^6) = 0.00992 = 0.992000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 2000, "cycles": 1984, "load": 0.00992}, "prompt_sha1": "55709bc4f9dc60e0a68cf6b62d13625eaec8e374", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 001000111010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001000111010", "ones": 5, "parity": 1}, "prompt_sha1": "432d9351b0ff39ca1172daa94cfa4b7eb2e25627", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_33_16_2` with RED, GREEN, YELLOW states. Hold RED for 33 clock cycles, GREEN for 16, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_33_16_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 32) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 15) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_33_16_2", "red": 33, "green": 16, "yellow": 2}, "prompt_sha1": "a99d95169718ed9513bf31530a652a96572433ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_3734` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_3734 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_3734"}, "prompt_sha1": "81b5f2effe541b2af4eb791d5554787b825cfad8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=20 ms, C=5 ms,T=20 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/20 + 5/20 + 4/50 = 0.380000 = 38.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 20], [5, 20], [4, 50]], "utilization": 0.38}, "prompt_sha1": "9de05e5c4f1f517505b8a0cd0ef31b7c544039c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `size` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n acc += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `words[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n acc += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "85361a4c2002fe367f0f9b1fee8b47a03633dfe9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8318-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8318×8 = 66544 bits.\nSerialization delay = bits/rate = 66544/(10000×10^6) s = 6.6544e-06 s = 6.654400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8318, "rate_mbps": 10000, "delay_s": 6.6544e-06}, "prompt_sha1": "0110efa626b593e0c131cce184c038848dca5c47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2612 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2612/(2612+40+8) = 0.981955 = 98.20%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2612, "iphdr": 40, "eff": 0.9819548872180451}, "prompt_sha1": "4daf17ae19c90ae52820c935fa9c3231c7245f75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_21_52_16` with RED, GREEN, YELLOW states. Hold RED for 21 clock cycles, GREEN for 52, and YELLOW for 16; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_21_52_16 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 20) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 51) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 15) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_21_52_16", "red": 21, "green": 52, "yellow": 16}, "prompt_sha1": "d7c97666f227d9e61aec08748f26dfd3a675bf62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `len` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n result += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `items[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n result += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8b56edd335f76e73374aae17ab7d5508b86526a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8130 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8130/(8130+20+8) = 0.996568 = 99.66%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8130, "iphdr": 20, "eff": 0.9965677862221133}, "prompt_sha1": "3e6dc1a2151a98dd59f61ea0a685dc874c603969", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3 V reference and returns code 196. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 196/255 × 3 V = 2.305882 V.\nThus the estimated input is about 2.3059 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.0, "code": 196, "volts": 2.3058823529411767}, "prompt_sha1": "57c68570e43fa79481cba8d729be8ba50abe3a09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=47 kOhm from Vin to Vout, and R2=1 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×1/(47+1) = 0.187500 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 47, "r2": 1, "vout": 0.1875}, "prompt_sha1": "151fda165ff5e35bc1db6f6f6faa16dcd13ebf58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 9000 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-40-60 = 8900 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 40, "tcphdr": 60, "mss": 8900}, "prompt_sha1": "265ba7acdf2a662259dd59c85552a19015732488", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11001101001000011 using generator polynomial bits 1101. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 13, "msg_bits": 17, "msg": 105027, "remainder": 2}, "prompt_sha1": "03e96d169e3c9468acbbd189f6b59b21c9c7df9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×20/1000/8 = 12500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 20, "bytes": 12500000.0}, "prompt_sha1": "ec89ae635312f54da06d8a6908cfbfd616945759", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 96 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 96 MHz / 64 = 1.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 96000000.0, "divider": 64, "spi_hz": 1500000.0}, "prompt_sha1": "9679ae0495998aba24be7117f7346929b8ca9e30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 80 = 72. Verification: 72/80 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 90, "high": 72}, "prompt_sha1": "45cd3bb79f29537a78663e8e4f5c9cf69b79ee8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 939. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 939/1023 × 3 V = 2.753666 V.\nThus the estimated input is about 2.7537 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 939, "volts": 2.75366568914956}, "prompt_sha1": "25826e889cbece78ae1a18de4a65a7748f808dac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_48_msb` for `48-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_48_msb (\n input logic [47:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 48; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_48_msb", "width": 48, "priority": "high"}, "prompt_sha1": "f9af9b8afbacbfc1c3dfe700c9878ac96f96a63d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 4 bytes per beat at 200 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×200×10^6 = 800000000 B/s. Time = 16384/800000000 = 2.048e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 4, "rate_mhz": 200, "sec": 2.048e-05}, "prompt_sha1": "93a744455aad67789020d8360589e148f454fa68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 31 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 31 = 34.\nClock pulses = 34×9 = 306.\nTime = 306/1000000 s = 306.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 31, "clocks": 306, "time_s": 0.000306}, "prompt_sha1": "ff72a177137e4fe886cd1b900f441f4b7b871511", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=100 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/4.7 = -21.276596.\nVout = A_v×Vin = -21.276596×0.05 = -1.063830 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 100, "vin": 0.05, "gain": -21.27659574468085, "vout": -1.0638297872340425}, "prompt_sha1": "84037f9c45ecd19ed1979c2c119687450aef2296", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/4700=0.000425531915 A. P=V²/R=2²/4700=0.00085106383 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 4700, "i": 0.000425531914893617, "p": 0.000851063829787234}, "prompt_sha1": "fc90805a2830431b9d0594535f57c200b77b14b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100001011 using generator polynomial bits 11001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 25, "msg_bits": 9, "msg": 267, "remainder": 6}, "prompt_sha1": "12c534579741e10e34253634de4f71b86b3582a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 160.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+16 = 176.5. Period = 176.5/1000000 = 0.0001765 s. Maximum rate = 1/period = 5665.722380 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 160.5, "conv_cycles": 16, "period": 0.0001765, "rate": 5665.7223796033995}, "prompt_sha1": "9b04a40920c07bf0ba2b70ecea3b8924bee3fa6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 45-bit up/down counter `updown_45_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_45_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [44:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 45'd35184372088831) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_45_sat", "width": 45, "wrap": false}, "prompt_sha1": "35df0fe2d93419a0cbf4c085fc11972772011405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/400 = 300000.\nWith prescaler divisor limited to at most 256, the largest divisor of 300000 that also keeps the period count within 16 bits is 250.\nPeriod count = 300000/250 = 1200.\nPSC register = 250-1 = 249.\nARR register = 1200-1 = 1199.\nVerification: 120000000/(250×1200) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 400, "total_division": 300000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 1200, "psc_reg": 249, "arr_reg": 1199}, "prompt_sha1": "9470a13ac514dd2c38cb35c90e197da6d5435c0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 2-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/16 = 32768.\nSets = 32768/2 = 16384.\nOffset bits = log2(16) = 4; index bits = log2(16384) = 14; tag bits = 57-4-14 = 39.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 16, "ways": 2, "addr_bits": 57, "lines": 32768, "sets": 16384, "offset": 4, "index": 14, "tag": 39}, "prompt_sha1": "952126a9748233c7c5bbaf56aaf4bfa708989a27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock QUEUE then IO; task_B acquires IO then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds QUEUE while waiting for IO, while task_B holds IO while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "3a64fb5edaf04bbf97c133f68f82c8b33a3631ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 100 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 100 MHz / 128 = 0.781250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 100000000.0, "divider": 128, "spi_hz": 781250.0}, "prompt_sha1": "6b13ed93357a6a99bdc45cae2f830636b55cad19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 736 elements. Review loop `for i in range(736+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(736+1)` includes index 736, which is out of range for a length-736 sequence. Correct loop: `for i in range(736):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 736, "variant": "one_past"}, "prompt_sha1": "a2ce10d24a3abfb71a06c47164b59625436decc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/500 = 100000.\nWith prescaler divisor limited to at most 4096, the largest divisor of 100000 that also keeps the period count within 16 bits is 4000.\nPeriod count = 100000/4000 = 25.\nPSC register = 4000-1 = 3999.\nARR register = 25-1 = 24.\nVerification: 50000000/(4000×25) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 500, "total_division": 100000, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 4000, "period": 25, "psc_reg": 3999, "arr_reg": 24}, "prompt_sha1": "0b857b7ccf31ba261591c445aea839acd5ad00a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 39-bit right-shift register module `shiftreg_right_39`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `39-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_39 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [38:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[38:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_39", "width": 39, "direction": "right"}, "prompt_sha1": "7c6e51a28db50f5282e9248fb9782fa4dd94aa0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000110 using generator polynomial bits 10011. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 19, "msg_bits": 7, "msg": 70, "remainder": 13}, "prompt_sha1": "774a085baec28d1c31a2bb9c51a1af24498135d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 4-bit up/down counter `updown_4_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_4_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [3:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 4'd15) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_4_sat", "width": 4, "wrap": false}, "prompt_sha1": "de17eaf68208fa4e5a23f25982758d26b64fff49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 5 and tail index 9, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (5-9) mod 64 = 60. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 5, "tail": 9, "occupancy": 60}, "prompt_sha1": "546e270162d9d6eaadd46a98a110e5ac9a8d4025", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.3 V source drives a 4700 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.3-2.6 = 20.7 V.\nI = V/R = 20.7/4700 A = 4.4043 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.3, "vf": 2.6, "r": 4700, "current_a": 0.004404255319148936}, "prompt_sha1": "6fd27a41aa84b306a6f7caae2c3214c59e204a5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 8 = 0.020000.\nEffective CPI = 1.1 + 0.020000 = 1.120000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.05, "penalty": 8, "result": 1.12}, "prompt_sha1": "2bc528e85ea847bb21afd46a9e9655163df8cdfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 32 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 32000000/500 = 64000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 64000 that also keeps the period count within 16 bits is 32000.\nPeriod count = 64000/32000 = 2.\nPSC register = 32000-1 = 31999.\nARR register = 2-1 = 1.\nVerification: 32000000/(32000×2) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 32000000, "target_hz": 500, "total_division": 64000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32000, "period": 2, "psc_reg": 31999, "arr_reg": 1}, "prompt_sha1": "c435dee27b4c4c304992a3698d2dec5037bebd9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `words` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n sum += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `values[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n sum += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "f6f0ff800f6a3575ed95a7b0c7c36dbe02a615fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 16067 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 16067/5000000 s; frequency = 5000000/16067 = 311.196863 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 16067, "hz": 311.1968631356196}, "prompt_sha1": "2e62a77b2d8951319029a2d6b936bf5e594f487a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 149 elements. Review loop `for i in range(149-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(149-1)` produces indices 0 through 147, so index 148 is skipped. Correct loop: `for i in range(149):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 149, "variant": "miss_last"}, "prompt_sha1": "9f22a3d3e832fc1828d3d5bb9fe37298ad9388d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_36_lsb` for `36-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_36_lsb (\n input logic [35:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 35; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_36_lsb", "width": 36, "priority": "low"}, "prompt_sha1": "5c2fe6909ed9fafd274c40665960f6c2c4465e58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 79.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+24 = 103.5. Period = 103.5/1000000 = 0.0001035 s. Maximum rate = 1/period = 9661.835749 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 79.5, "conv_cycles": 24, "period": 0.0001035, "rate": 9661.835748792271}, "prompt_sha1": "e6f296f9a4b57636d261bc3cfca9e96458d367a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x6E. Extract the 5-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x6E >> 3) & 0x1F = 0xD (13).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 3, "value": 110, "mask": 31, "field": 13}, "prompt_sha1": "ee509a4ca750891349164ebe94bd36812e8fb046", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=10 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×4.7/(10+4.7) = 2.877551 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 10, "r2": 4.7, "vout": 2.8775510204081636}, "prompt_sha1": "5d7b1370320e2a4e23f5f1cde6597e6dcc0a058d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 6` on one shared integer without synchronization. Assume `credits` initially equals 369. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 369; T2 reads 369; both compute 375; T1 writes 375; T2 writes 375. The observed final value is 375, but two serial increments would produce 381.\n\n```\nlock(mutex)\ncredits = credits + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "e7cd2c8771062eb400811e9cc9b36b3320a3e743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/470=0.00425531915 A. P=V²/R=2²/470=0.0085106383 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 470, "i": 0.00425531914893617, "p": 0.00851063829787234}, "prompt_sha1": "e78d547cd38bd039c9e7c6326f594c5b7fc6701b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.69. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.69) + 0.69/8) = 2.523659.\nThe theoretical speedup is about 2.524×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.69, "n": 8, "result": 2.5236593059936907}, "prompt_sha1": "2537ecd0bfae799c3cf11bcbe4e4fea0212f67b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x1FBF, toggle bit 3 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 3)`. Result = 0x1FB7.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 8127, "bit": 3, "op": "toggle", "result": 8119}, "prompt_sha1": "68facc1a0574714fa39bc9cfd20a026f5bfda77c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 6 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 55 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+2 = 9. Total bits = 55×9 = 495. Time = 495/921600 = 0.000537109375 s = 0.537109 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 6, "parity": 0, "stop": 2, "frames": 55, "seconds": 0.000537109375}, "prompt_sha1": "00a5b1d4e8f00ed0f264fdf3014c0b42bb3c10bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_1363` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_1363 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_1363"}, "prompt_sha1": "ab4cce61c0157fc0adc524a5751b0a19a2d96636", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 64 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 64/(5×10^6) s = 12.800000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 64, "time_us": 12.799999999999999}, "prompt_sha1": "3fc6b68544cec5e38104a23a6840966a2a25d359", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `size` elements of type `double`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n result += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `table[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n result += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "1e73a77376d65bec926f2138e1bf8d53db58dfae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w56_nocin` implementing a 56-bit unsigned adder with inputs `a`, `b` and outputs `56-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w56_nocin (\n input logic [55:0] a,\n input logic [55:0] b,\n output logic [55:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w56_nocin", "width": 56, "cin": false}, "prompt_sha1": "19ff3edfa8c04e14c03574a0ba992f9e285f2e6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=220 nF and is stepped to 1.8 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1.8(1-e^-1)=1.137817 V; τ=0.00022 s and t=0.00022 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 2.2e-07, "multiple": 1, "vin": 1.8, "vc": 1.1378170058914039}, "prompt_sha1": "5745d53dddae7ae0d5a0474bcd9beccac6380519", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 483, and period is 1013 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(483×1013) = 147.155304 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 483, "period": 1013, "hz": 147.1553040289896}, "prompt_sha1": "78a7f7947692f1f459762f834f83537f7c93dedc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/4.7 = 2.12765957e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 4.7, "tau": 2.1276595744680852e-05}, "prompt_sha1": "274fca607ad606028cb3a58d432c394c284b254d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 7.5 V source drives a 270 ohm resistor in series with an LED whose forward voltage is assumed to be 1.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 7.5-1.7 = 5.8 V.\nI = V/R = 5.8/270 A = 21.4815 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 7.5, "vf": 1.7, "r": 270, "current_a": 0.02148148148148148}, "prompt_sha1": "2d107676cb26572e070552ad960ff000e58a65ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 256-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/256 = 4.\nOffset bits = log2(256) = 8.\nIndex bits = log2(4) = 2.\nTag bits = 52-2-8 = 42.\nCheck: 42+2+8 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 256, "addr_bits": 52, "lines": 4, "offset_bits": 8, "index_bits": 2, "tag_bits": 42}, "prompt_sha1": "7e36d7c119eb937eb2c26dcad2c91cef6c664b2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_253` generating a one-clock-cycle `tick` every 253 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_253 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 252) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_253", "divide": 253}, "prompt_sha1": "daee99e1be83d881d6cef4959664793d4cb037ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [10, 30, 10, 16]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [34, 66, 40, 52].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [10, 30, 10, 16], "finish": [34, 66, 40, 52]}, "prompt_sha1": "f2bcdb9852ecfcb09cd67ae6a67aef31f949d566", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact cutoff frequency of an RC low-pass when R=1000 ohm but capacitance is unspecified.", "output": "A numeric cutoff is underdetermined because C is missing. For a first-order RC low-pass, f_c=1/(2πRC). With R=1000 ohm, the capacitance is still required; I would request C rather than assume it.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "22b1c3618ed0729160c2266526e3a513a86b4c6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1110101001000010010110 using generator polynomial bits 1111101. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 010001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 125, "msg_bits": 22, "msg": 3838102, "remainder": 17}, "prompt_sha1": "1526f5f78e8a2c46d53295786a1d29cd8d9b5588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xB0. Extract the 6-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xB0 >> 2) & 0x3F = 0x2C (44).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 6, "lsb": 2, "value": 176, "mask": 63, "field": 44}, "prompt_sha1": "9bfc9cfddaaf9a008c3a4f10b79cd4fd0cd0caea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/2.2 = 0.1 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 2.2, "tau": 0.09999999999999999}, "prompt_sha1": "4c879899d0a94879df7ff48fdb3d8babc9ebb37d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=220 nF and is stepped to 9 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=9(1-e^-5)=8.939358 V; τ=0.001034 s and t=0.00517 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 2.2e-07, "multiple": 5, "vin": 9, "vc": 8.93935847700823}, "prompt_sha1": "ea720e689c5db223c4b9e97d3daaddfc642bae22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×1²=1.1e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 1, "energy": 1.1e-05}, "prompt_sha1": "6826b5aabed77ac8e4e4a95d138763650fd063a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x774C3204EC in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 77 4C 32 04 EC.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 512379454700, "endian": "big", "bytes": [119, 76, 50, 4, 236]}, "prompt_sha1": "7b20ace7ef0cbcc63103820c2fad6ee0752149da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 0.75 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×0.75/(5×10^9) = 0.0075 s = 7.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 0.75, "ghz": 5.0, "sec": 0.0075}, "prompt_sha1": "f3f902f33df329c5ebd85c12a9e13ad9002e28cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_6` generating a one-clock-cycle `tick` every 6 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_6 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 5) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_6", "divide": 6}, "prompt_sha1": "1478153cd35b17ef82dd7698de45fe7e7ab3ad9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1101110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1101110", "ones": 5, "parity": 1}, "prompt_sha1": "726a88783904e927a41614fd14bd542a565c40e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 2%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.020 × 5 = 0.015000.\nEffective CPI = 1.1 + 0.015000 = 1.115000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.02, "penalty": 5, "result": 1.115}, "prompt_sha1": "931383b57e381d18eadcd6415cd287e266b1bf1b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=22 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×100/(22+100) = 2.704918 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 22, "r2": 100, "vout": 2.7049180327868854}, "prompt_sha1": "4fafa510b8044305a1ae77ce42c9abf6681c7a83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact cutoff frequency of an RC low-pass when R=4700 ohm but capacitance is unspecified.", "output": "A numeric cutoff is underdetermined because C is missing. For a first-order RC low-pass, f_c=1/(2πRC). With R=4700 ohm, the capacitance is still required; I would request C rather than assume it.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "5c6eba4f5ebc821d8a60503f4fba0586d1544060", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500000 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 500000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 500000.0}, "prompt_sha1": "312e2c9ef68be806b2a01f29c9c4b4c5714f8ecd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 11; x = x + 255;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 11+255 = 266. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (266) mod 2^8 = 10. So `x` stores 10. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 11, "add": 255, "result": 10}, "prompt_sha1": "9d4f601b0a2c93b7edd3b9e88ed743932e944f5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 64 bytes over a datapath transferring 16 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×50×10^6 = 800000000 B/s. Time = 64/800000000 = 8e-08 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 64, "width": 16, "rate_mhz": 50, "sec": 8e-08}, "prompt_sha1": "c2c50f56a748af8b82e66439359ea39e2eb84f4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3.3 V reference and returns code 55. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 55/255 × 3.3 V = 0.711765 V.\nThus the estimated input is about 0.7118 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.3, "code": 55, "volts": 0.711764705882353}, "prompt_sha1": "b0dea2de072b87a2c13baba210910aff1bc20d55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x32_no_bypass` with 4 entries of 32 bits. Inputs: `clk`, `we`, `2-bit waddr`, `32-bit wdata`, `2-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [31:0] wdata,\n input logic [1:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x32_no_bypass", "entries": 4, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "6e201cbf58cb375652d146cccdf6a14146388608", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x20_no_bypass` with 32 entries of 20 bits. Inputs: `clk`, `we`, `5-bit waddr`, `20-bit wdata`, `5-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x20_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [19:0] wdata,\n input logic [4:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x20_no_bypass", "entries": 32, "width": 20, "mode": "no_bypass"}, "prompt_sha1": "979ef387d8fd2f2146226b3eaf93473e33fcb2dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 20 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(20×10^6) s = 1.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 20, "bits": 24, "time_us": 1.2}, "prompt_sha1": "8999379d3b25f88fa6b662d5b1972d388a3ac938", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 1.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+12 = 13.5. Period = 13.5/1000000 = 1.35e-05 s. Maximum rate = 1/period = 74074.074074 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 1.5, "conv_cycles": 12, "period": 1.35e-05, "rate": 74074.07407407407}, "prompt_sha1": "71e2fbb84247f6470ca9eb69524810dfd988831c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xDFCD, set bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 4)`. Result = 0xDFDD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 57293, "bit": 4, "op": "set", "result": 57309}, "prompt_sha1": "096eb478d4bd9490978f9e54f65f90c88648aff1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(16×500000) = 2.000000.\nNearest integer divisor D = 2.\nActual baud = 16000000/(16×2) = 500000.000 baud.\nError = (500000.000-500000)/500000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 16, "baud": 500000, "divisor": 2, "actual": 500000.0, "error_pct": 0.0}, "prompt_sha1": "d309fefcf519e15f581a648eec9dbfbbfa1865e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 6` on one shared integer without synchronization. Assume `requests` initially equals 98. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 98; T2 reads 98; both compute 104; T1 writes 104; T2 writes 104. The observed final value is 104, but two serial increments would produce 110.\n\n```\nlock(mutex)\nrequests = requests + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "5d57e33174539db25f78101147b7706ea8383d3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock STATE then BUF; consumer acquires BUF then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds STATE while waiting for BUF, while consumer holds BUF while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "b7b061e977da893fe6287a01e74088314d2d9c33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.176.121.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.176.121.0\nBroadcast address: 10.176.121.15\nUsable host range: 10.176.121.1 to 10.176.121.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.176.121.0/28", "usable": 14, "first": "10.176.121.1", "last": "10.176.121.14", "broadcast": "10.176.121.15"}, "prompt_sha1": "02216a0561d9c7d4dc677e9dbb25c389e12bc3ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.246.52.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.246.52.0\nBroadcast address: 10.246.52.127\nUsable host range: 10.246.52.1 to 10.246.52.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.246.52.0/25", "usable": 126, "first": "10.246.52.1", "last": "10.246.52.126", "broadcast": "10.246.52.127"}, "prompt_sha1": "f02acffa533f1dd7eecb56e75e7d4661cde2e19f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 110101101111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 9 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110101101111", "ones": 9, "parity": 1}, "prompt_sha1": "c2ba9e998458a7ae74a56a8dd01788cd6da17b35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 72 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 512. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 72000000/500 = 144000.\nWith prescaler divisor limited to at most 512, the largest divisor of 144000 that also keeps the period count within 16 bits is 500.\nPeriod count = 144000/500 = 288.\nPSC register = 500-1 = 499.\nARR register = 288-1 = 287.\nVerification: 72000000/(500×288) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 72000000, "target_hz": 500, "total_division": 144000, "max_prescaler": 512, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 500, "period": 288, "psc_reg": 499, "arr_reg": 287}, "prompt_sha1": "23dcb769fc79a9634bd756c3812e9abdc36f6bb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 16 MHz, prescaler divisor is 107, and period is 24078 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 16000000/(107×24078) = 6.210346 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 16000000, "prescaler": 107, "period": 24078, "hz": 6.21034597061109}, "prompt_sha1": "28e2ed80b924923e756e630ff1392b7cae3ae6a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 128 = 0.062500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 128, "spi_hz": 62500.0}, "prompt_sha1": "ab03725195ce63a0697b88920aed28c56b5ba4c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3166 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "e10fb9f11ad4b6f0a45b2d154a97a44231284204", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_140` generating a one-clock-cycle `tick` every 140 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_140 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 139) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_140", "divide": 140}, "prompt_sha1": "aa2f4ee484eb77e9d7d92f33eb556000483a0c2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 8-bit up/down counter `updown_8_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_8_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [7:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_8_wrap", "width": 8, "wrap": true}, "prompt_sha1": "2ccc94457afaeb430b3a381fb0678fd2a5af085e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 12 = 0.024000.\nEffective CPI = 1.2 + 0.024000 = 1.224000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.1, "mispred": 0.02, "penalty": 12, "result": 1.224}, "prompt_sha1": "10a939d9abba95e9ef19c64854356d37bcf89417", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 1600 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×1600×10^6×4 = 76.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 1600, "channels": 4, "gbps": 76.8}, "prompt_sha1": "d12a621bc360ff7481b7ada934b61769e58d2689", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 91.4% hit rate, and a 45 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.914 = 0.086.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.086×45 ns = 5.6200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.914, "penalty": 45, "result": 5.619999999999998}, "prompt_sha1": "6b4d1862a85441800932a4099f80303226224724", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTTTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 1, 1, 0, 0], "final_state": 1}, "prompt_sha1": "852684c62d5ee35d3ffb2491f0de7def07e07e73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_9688` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_9688 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_9688", "width": 8}, "prompt_sha1": "ce228b99ef5750dd35612663bf22671e4355749d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x1A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x1A<<1)|1 = 0x35 = 00110101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 26, "rw": 1, "byte": 53}, "prompt_sha1": "a3041dff450e6d1d37fbdfd477865b91e9132602", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1492 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-40-32 = 1420 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 40, "tcphdr": 32, "mss": 1420}, "prompt_sha1": "756326157c920973cb5848f3d64d4a233773b61c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5012(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5012(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5012([1, 2]) == 1.5\nassert mean_5012([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5012"}, "prompt_sha1": "0e15295234bf3a9c723caa5dc1955c994a263ff1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=25 ms, C=1 ms,T=25 ms, C=5 ms,T=40 ms, C=3 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/25 + 1/25 + 5/40 + 3/5 = 0.885000 = 88.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 25], [1, 25], [5, 40], [3, 5]], "utilization": 0.885}, "prompt_sha1": "51902ed22a1442762e2f3f9103992cf4ce80635f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x1A0B, clear bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 4)`. Result = 0x1A0B.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 6667, "bit": 4, "op": "clear", "result": 6667}, "prompt_sha1": "5d52b5bc694959d710cf9df15241e36319e312b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [22, 15, 18]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [53, 39, 55].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [22, 15, 18], "finish": [53, 39, 55]}, "prompt_sha1": "44ea714011856792c50cd9d5b46dad469c43b21c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10000 Mbit/s and RTT 200 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10000×10^6 × 200/1000 = 2e+09 bits = 2.5e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10000, "rtt_ms": 200, "bits": 2000000000.0, "bytes": 250000000.0}, "prompt_sha1": "dce800a063b9c3fb010786e8683a7c3a4cf05fcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 200 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 1024. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 200000000/50 = 4000000.\nWith prescaler divisor limited to at most 1024, the largest divisor of 4000000 that also keeps the period count within 16 bits is 1000.\nPeriod count = 4000000/1000 = 4000.\nPSC register = 1000-1 = 999.\nARR register = 4000-1 = 3999.\nVerification: 200000000/(1000×4000) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 200000000, "target_hz": 50, "total_division": 4000000, "max_prescaler": 1024, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1000, "period": 4000, "psc_reg": 999, "arr_reg": 3999}, "prompt_sha1": "93f5e1f3dab4a19bbf07aff697bf3b0ccbd54d22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m7203` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 7203 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m7203 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd7203;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m7203", "width": 13, "max": 7203}, "prompt_sha1": "223138ee5bc2738891cc66b96ad44d687a6655e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_4404` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_4404 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_4404", "width": 3}, "prompt_sha1": "07566c98c5d623cd66450ca1fd95c16c46fdfe46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/220 = 4.54545455e-07 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 220, "tau": 4.5454545454545457e-07}, "prompt_sha1": "010b645ca1827e3e8b1ddff38d03b7b654b56de3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNTNNNNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "f88691d9b901e2158a92e549161764a651b22cd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 4 and tail index 7, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (4-7) mod 8 = 5. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 4, "tail": 7, "occupancy": 5}, "prompt_sha1": "95adb52045d6b6715fd8de8f6fe6b138e3f4d2a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x4D. Extract the 6-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x4D >> 2) & 0x3F = 0x13 (19).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 6, "lsb": 2, "value": 77, "mask": 63, "field": 19}, "prompt_sha1": "c2324351618d100b17deeb3fc24513a78f23e8a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 100000 Mbit/s and RTT 0.1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 100000×10^6 × 0.1/1000 = 1e+07 bits = 1.25e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 100000, "rtt_ms": 0.1, "bits": 10000000.0, "bytes": 1250000.0}, "prompt_sha1": "050216e1beedae1e892ffba00692c54a465a73b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 1 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 1 = 4.\nClock pulses = 4×9 = 36.\nTime = 36/100000 s = 360.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 1, "clocks": 36, "time_s": 0.00036}, "prompt_sha1": "375fb9fd5741729f6f85685505e95e8f237f0a26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=470 nF and is stepped to 5 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=5(1-e^-0.5)=1.967347 V; τ=0.001034 s and t=0.000517 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 4.7000000000000005e-07, "multiple": 0.5, "vin": 5, "vc": 1.9673467014368329}, "prompt_sha1": "21b8039b7924bdedd7c7c65337bee3e8d1aeb674", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x51, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x51<<1)|0 = 0xA2 = 10100010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 81, "rw": 0, "byte": 162}, "prompt_sha1": "2c80459a535e3b9a9c56a3f07ce8f3b81180dda7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=2.2 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/1 = -2.200000.\nVout = A_v×Vin = -2.200000×0.1 = -0.220000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 2.2, "vin": 0.1, "gain": -2.2, "vout": -0.22000000000000003}, "prompt_sha1": "cad7422188244423c5455f1d9f27a99386f1151f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 3200 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×3200×10^6×1 = 16.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 3200, "channels": 1, "gbps": 16.0}, "prompt_sha1": "525f6aa2cc79f785fa82959b6bb27aadba8198c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_8036` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_8036 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_8036", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "490d96a9698e225faf74ff6332f5e53f0d3ffbea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 25% of instructions, the branch misprediction rate is 2%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.020 × 2 = 0.010000.\nEffective CPI = 1 + 0.010000 = 1.010000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.25, "mispred": 0.02, "penalty": 2, "result": 1.01}, "prompt_sha1": "099a06b633210f227a458c7400fe307003e5d085", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(16×250000) = 24.000000.\nNearest integer divisor D = 24.\nActual baud = 96000000/(16×24) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 16, "baud": 250000, "divisor": 24, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "b915e46f66efa867dff64892ce9d88d45198003d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 35 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 35-15 = 20.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 35, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 20}, "prompt_sha1": "92caca0143d6940a3311182c272a74d3cf4d6256", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(4×10^6) s = 2.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 8, "time_us": 2.0}, "prompt_sha1": "976a8d87a3612f30cf05d3919a85988b87577074", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2000 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 2000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 2000}, "prompt_sha1": "64a48ac1d124c3f75ab9c968b1a13179edc592a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.67. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.67) + 0.67/10) = 2.518892.\nThe theoretical speedup is about 2.519×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.67, "n": 10, "result": 2.518891687657431}, "prompt_sha1": "eaf69f0064613f9daf02ed94853c6f3e2d79de5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 11001101. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "11001101", "ones": 5, "parity": 1}, "prompt_sha1": "a41f443190a8ff6014805f32d004f1250d4de23d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 2769. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 2769/4095 × 3.3 V = 2.231429 V.\nThus the estimated input is about 2.2314 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 2769, "volts": 2.2314285714285713}, "prompt_sha1": "0d66f6ee2276aedafea0b369a07a282e3d1c7e74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xDBE9F5DC. Extract the 8-bit field starting at bit 8 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0xDBE9F5DC >> 8) & 0xFF = 0xF5 (245).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 8, "value": 3689543132, "mask": 255, "field": 245}, "prompt_sha1": "d4f61b9ae4d2bd76963830aceadb209a42b829f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 71 and initial occupancy is 19. In an abstract batch, producer attempts to enqueue 91 items first, dropping any excess beyond capacity; then consumer removes up to 200 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=71, dropped=39; consumed=71; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 71, "start": 19, "prod": 91, "cons": 200, "dropped": 39, "consumed": 71, "final": 0}, "prompt_sha1": "e1cd66af431e36b45b25df0c34f4ba4970b242d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 16 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×160×10^6 = 2560000000 B/s. Time = 131072/2560000000 = 5.12e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 16, "rate_mhz": 160, "sec": 5.12e-05}, "prompt_sha1": "8a29b366ee1cf81b46db77dc4da9c70f4a339e76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 39; x = x + 397;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 39+397 = 436. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (436) mod 2^8 = 180. So `x` stores 180. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 39, "add": 397, "result": 180}, "prompt_sha1": "2a3643e95ad59b4bebf23b72d15da13c17cc3322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x24_no_bypass` with 4 entries of 24 bits. Inputs: `clk`, `we`, `2-bit waddr`, `24-bit wdata`, `2-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x24_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [23:0] wdata,\n input logic [1:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x24_no_bypass", "entries": 4, "width": 24, "mode": "no_bypass"}, "prompt_sha1": "e489d580a83f374c524dc5164e24747b6ca9d36a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_58_13` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 58, and YELLOW for 13; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_58_13 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 57) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 12) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_58_13", "red": 28, "green": 58, "yellow": 13}, "prompt_sha1": "9bf58591d9ce34033a531b2af23c68918cfcfab8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=100 ms, C=2 ms,T=5 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/100 + 2/5 + 4/50 = 0.510000 = 51.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 100], [2, 5], [4, 50]], "utilization": 0.51}, "prompt_sha1": "b2b6c3bbc889533313f58f81aaff51de40f7db3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=10 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×4.7/(10+4.7) = 3.836735 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 10, "r2": 4.7, "vout": 3.8367346938775517}, "prompt_sha1": "daac127f98ecdd7163c31c7abdcc581927ecebd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 25% of instructions, the branch misprediction rate is 5%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.050 × 5 = 0.062500.\nEffective CPI = 1 + 0.062500 = 1.062500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.25, "mispred": 0.05, "penalty": 5, "result": 1.0625}, "prompt_sha1": "9b77f52133dfad1e2ab57d90a8614bce5dc390c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 58-bit up/down counter `updown_58_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_58_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [57:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_58_wrap", "width": 58, "wrap": true}, "prompt_sha1": "2c6b72c818ed2f6cb4c49e57f0546505c47ea2a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `size` elements of type `double`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n sum += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `values[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n sum += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "349bf9440e089cb8d8de42af238b3dc0fd341ba0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-24 = 1976 bytes.\nRound down to an 8-byte multiple: floor((1976)/8)×8 = 1976 bytes.\nFragments required = ceil(6000/1976) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 24, "payload": 6000, "max_payload": 1976, "fragments": 4}, "prompt_sha1": "21a93bd7b38eaafba93f7ee2491e068df6506760", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 8.7 V source drives a 1500 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 8.7-2.2 = 6.5 V.\nI = V/R = 6.5/1500 A = 4.3333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 8.7, "vf": 2.2, "r": 1500, "current_a": 0.004333333333333333}, "prompt_sha1": "4c7d97608e5d1f79f334d420a6f94dfd8c6acc22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=10 ms, C=4 ms,T=10 ms, C=4 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/10 + 4/10 + 4/50 = 0.780000 = 78.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 10], [4, 10], [4, 50]], "utilization": 0.78}, "prompt_sha1": "8724b9e8c4869019d4197a1839a7116858197653", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 24 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×24²=0.006336 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 24, "energy": 0.0063360000000000005}, "prompt_sha1": "de5c763cac0ef07931e0a952aa376ac1ed68ff03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 10000 ohm and 12 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (10000×12)/(10000+12) = 11.985617 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 10000, "r2": 12, "req": 11.985617259288853}, "prompt_sha1": "42412d66909693c0122caf1a19c5bcac160b140b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 96 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 96000000/400 = 240000.\nWith prescaler divisor limited to at most 256, the largest divisor of 240000 that also keeps the period count within 16 bits is 250.\nPeriod count = 240000/250 = 960.\nPSC register = 250-1 = 249.\nARR register = 960-1 = 959.\nVerification: 96000000/(250×960) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 96000000, "target_hz": 400, "total_division": 240000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 960, "psc_reg": 249, "arr_reg": 959}, "prompt_sha1": "af5cdb28ae1b54cc7aefbb91ed0207a3d4e8ea2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1011011110010100011011 using generator polynomial bits 110101. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 11010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 53, "msg_bits": 22, "msg": 3007771, "remainder": 26}, "prompt_sha1": "ca7419c6b181e70a6edec9cf889699687b8ec648", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=4.7 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×22/(4.7+22) = 2.719101 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 4.7, "r2": 22, "vout": 2.7191011235955056}, "prompt_sha1": "366337b9f11cf70260bdbec4ebf78e381392ef2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 95.3% hit rate, and a 50 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.953 = 0.047.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.047×50 ns = 6.8500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.953, "penalty": 50, "result": 6.850000000000002}, "prompt_sha1": "9483fd0146d56c20b1d5f2de8658e71e8603a725", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['P', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 1 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["P", "V", "P", "P", "P", "P", "P", "V", "V", "V", "V", "V", "P", "P", "V", "P", "V"], "value": 0, "blocked": 1}, "prompt_sha1": "f4acc3ffb2f1c113f7f22854420cd14979599e33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 36-bit up/down counter `updown_36_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_36_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [35:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 36'd68719476735) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_36_sat", "width": 36, "wrap": false}, "prompt_sha1": "6a6fbce59295188a3542aef3e1c3fe034551bf03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m5` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 5 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m5 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd5;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m5", "width": 3, "max": 5}, "prompt_sha1": "4938b36567a37916a4dccb486c51c26cbb4d5866", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_5404` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_5404 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_5404", "width": 4}, "prompt_sha1": "0e9c31238cf26a99ec8c776c5f42150b330adaa9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.108.12.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.108.12.0\nBroadcast address: 10.108.12.63\nUsable host range: 10.108.12.1 to 10.108.12.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.108.12.0/26", "usable": 62, "first": "10.108.12.1", "last": "10.108.12.62", "broadcast": "10.108.12.63"}, "prompt_sha1": "78a03ceb6b50eb92c12700dc5c413f6ca94a4f22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5333(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5333(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5333([1, 2]) == 1.5\nassert mean_5333([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5333"}, "prompt_sha1": "44e1f862d449d6fbad86ce68300ba0baa93cd2cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 256-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/256 = 256.\nOffset bits = log2(256) = 8.\nIndex bits = log2(256) = 8.\nTag bits = 24-8-8 = 8.\nCheck: 8+8+8 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 256, "addr_bits": 24, "lines": 256, "offset_bits": 8, "index_bits": 8, "tag_bits": 8}, "prompt_sha1": "1d1745d4a0c448c4afdd63a613fa848462fa6096", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1200 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1200-20-24 = 1156 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1200, "iphdr": 20, "tcphdr": 24, "mss": 1156}, "prompt_sha1": "92ecf207161bd3c4f50defdea95dbc29326e889f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 16-way set-associative cache uses 16-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/16 = 64.\nOffset bits = log2(16) = 4; index bits = log2(64) = 6; tag bits = 32-4-6 = 22.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 16, "addr_bits": 32, "lines": 1024, "sets": 64, "offset": 4, "index": 6, "tag": 22}, "prompt_sha1": "baee7aba7f95e0536b046997640630db9800a960", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 44 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 44×11 = 484. Time = 484/1000000 = 0.000484 s = 0.484000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 7, "parity": 1, "stop": 2, "frames": 44, "seconds": 0.000484}, "prompt_sha1": "61864805d60a2982783ea22e17e4671548829b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 420, and period is 212 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(420×212) = 1796.945193 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 420, "period": 212, "hz": 1796.9451931716083}, "prompt_sha1": "d3c4e0abe5023e27094fe95d75adfd23f5792777", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_33_lsb` for `33-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_33_lsb (\n input logic [32:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 32; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_33_lsb", "width": 33, "priority": "low"}, "prompt_sha1": "7f951e07bb2c3a2cc604ecddffe664eb56df1573", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 0.1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 0.1/1000 = 200000 bits = 25000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 0.1, "bits": 200000.0, "bytes": 25000.0}, "prompt_sha1": "edae6bac8ee7f60710902bd40255e666562c12ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.44. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.44) + 0.44/64) = 1.764057.\nThe theoretical speedup is about 1.764×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.44, "n": 64, "result": 1.7640573318632855}, "prompt_sha1": "87130b830fe1b0d66333ff1851dd9d5302645a93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 5 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 5 = 7.\nClock pulses = 7×9 = 63.\nTime = 63/1000000 s = 63.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 5, "clocks": 63, "time_s": 6.3e-05}, "prompt_sha1": "fd5eac7435e2b4bd11f74d33bb6ff064c67e1534", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 32-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/32 = 512.\nOffset bits = log2(32) = 5.\nIndex bits = log2(512) = 9.\nTag bits = 28-9-5 = 14.\nCheck: 14+9+5 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 32, "addr_bits": 28, "lines": 512, "offset_bits": 5, "index_bits": 9, "tag_bits": 14}, "prompt_sha1": "4822f222f5cdb76d1a1f7602a1e9c085c64406a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 35-bit virtual address space with 2097152 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^35/2^21 = 2^14 = 16384 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 35, "page_exp": 21, "entries": 16384}, "prompt_sha1": "c0eaa9ed4b41f46f8bccb3d6b834c9639c948fca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (768×8) = 6510416.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 768, "pps": 6510416.666666667}, "prompt_sha1": "98c20c2c12a2a23c515a44ccd08c32c0c2394f88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 1632 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 1632/10000000 s; frequency = 10000000/1632 = 6127.450980 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 1632, "hz": 6127.450980392156}, "prompt_sha1": "e84d75eabd4fbd6523640cab42b52187b8343d8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_102_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 102 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_102_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd102;\n end else begin\n if (pulse_in)\n count <= 7'd102;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_102_retrig", "cycles": 102, "retrigger": true}, "prompt_sha1": "74008e8f69f6f3033964920900584c02e239bd46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 80 MHz, prescaler divisor is 516, and period is 1383 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 80000000/(516×1383) = 112.103225 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 80000000, "prescaler": 516, "period": 1383, "hz": 112.10322464925703}, "prompt_sha1": "7a8c319ebfc018dd6fcf7bcf1a2b4c52bda05036", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_7760` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_7760 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_7760"}, "prompt_sha1": "394cf16c8fed07078906388b08f1f130fe2e5296", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 6` on one shared integer without synchronization. Assume `events` initially equals 491. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 491; T2 reads 491; both compute 497; T1 writes 497; T2 writes 497. The observed final value is 497, but two serial increments would produce 503.\n\n```\nlock(mutex)\nevents = events + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "a87fd945000d05221341fd204b4704ba96f3598e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_21` for a 21-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_21 (\n input logic [20:0] data,\n input logic [4:0] shamt,\n output logic [20:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_21", "width": 21, "direction": "right", "arithmetic": false}, "prompt_sha1": "f0cb56c399ab0d42237fbfae336017b1374bef55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×4 KiB = 512 KiB = 524288 bytes = 0.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 4, "reach": 524288}, "prompt_sha1": "10729f2438107403f1b9cc5d50006d5f63c7458a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 7 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 7×7 = 49. Time = 49/9600 = 0.00510416667 s = 5.104167 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 5, "parity": 0, "stop": 1, "frames": 7, "seconds": 0.005104166666666667}, "prompt_sha1": "81f800b5db0c71f0652c66cfd0ba6dbe4f529c14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65463; x = x + 513;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65463+513 = 65976. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65976) mod 2^16 = 440. So `x` stores 440. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65463, "add": 513, "result": 440}, "prompt_sha1": "1cab245c341a950ba15052607b6c793565c06762", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=4.7 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×100/(4.7+100) = 11.461318 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 4.7, "r2": 100, "vout": 11.461318051575931}, "prompt_sha1": "e8978dabe8479dd0d8adf09d8ed974ad8cd93a76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×2048 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 2048, "reach": 67108864}, "prompt_sha1": "95ee9e8a78f64feb189da605e6dc61702f50a21c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x455C85E9, toggle bit 30 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 30)`. Result = 0x55C85E9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 1163691497, "bit": 30, "op": "toggle", "result": 89949673}, "prompt_sha1": "943186f54c91fe11b3c0de3706d4924dbe769ea3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_4_3817` converting a 4-bit binary input `bin` to 4-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_4_3817 (\n input logic [3:0] bin,\n output logic [3:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_4_3817", "width": 4}, "prompt_sha1": "27378429e549d59b854cdc522c747f7937fca8e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65530; x = x + 106;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65530+106 = 65636. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65636) mod 2^16 = 100. So `x` stores 100. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65530, "add": 106, "result": 100}, "prompt_sha1": "050563507d7fa2c52cc87a00ecaea33963626652", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 30 and tail index 22, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (30-22) mod 32 = 8. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 30, "tail": 22, "occupancy": 8}, "prompt_sha1": "c8f62169ad2f290f80162ab796eac326e6f262b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD6A3 in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: D6 A3.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 54947, "endian": "big", "bytes": [214, 163]}, "prompt_sha1": "18ed9355f4195582741a6cf9f75277a984c1fbc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×16 KiB = 1024 KiB = 1048576 bytes = 1.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 16, "reach": 1048576}, "prompt_sha1": "ee106989db648c18df62800da91c08f1b1416bdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 640.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+10 = 650.5. Period = 650.5/2000000 = 0.00032525 s. Maximum rate = 1/period = 3074.558032 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 640.5, "conv_cycles": 10, "period": 0.00032525, "rate": 3074.558032282859}, "prompt_sha1": "de1e04c87c7c2afa2012fdebef55bd95292110fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=4700 nF and is stepped to 3.3 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=3.3(1-e^-1)=2.085998 V; τ=0.47 s and t=0.47 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 4.7e-06, "multiple": 1, "vin": 3.3, "vc": 2.08599784413424}, "prompt_sha1": "525114f3003b56e3470a85d88162bf46884b342a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7491-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7491×8 = 59928 bits.\nSerialization delay = bits/rate = 59928/(25000×10^6) s = 2.39712e-06 s = 2.397120 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7491, "rate_mbps": 25000, "delay_s": 2.39712e-06}, "prompt_sha1": "87219945ec0ad1e7f9c4a9dec1619dbdc673d03e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×820)/(470+820) = 298.759690 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 820, "req": 298.7596899224806}, "prompt_sha1": "6551280eb53c41746e0757193e5553e0687fad7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_93_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 93 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_93_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd93;\n end else begin\n if (pulse_in)\n count <= 7'd93;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_93_retrig", "cycles": 93, "retrigger": true}, "prompt_sha1": "7a86ce2eb8e8f12cab36af0f1823784b704ddeb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 20 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 20×11 = 220. Time = 220/1000000 = 0.00022 s = 0.220000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 8, "parity": 0, "stop": 2, "frames": 20, "seconds": 0.00022}, "prompt_sha1": "37a47154497d7df761236a324748b5377e7a59e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w16_cin` implementing a 16-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `16-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w16_cin (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic cin,\n output logic [15:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w16_cin", "width": 16, "cin": true}, "prompt_sha1": "6045102cc65f05903a853490b0145fad5cf0c5e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w33_cin` implementing a 33-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `33-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w33_cin (\n input logic [32:0] a,\n input logic [32:0] b,\n input logic cin,\n output logic [32:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w33_cin", "width": 33, "cin": true}, "prompt_sha1": "198b4f504606743917ba9d42cdb3455028aaf752", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 8` on one shared integer without synchronization. Assume `packets` initially equals 41. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 41; T2 reads 41; both compute 49; T1 writes 49; T2 writes 49. The observed final value is 49, but two serial increments would produce 57.\n\n```\nlock(mutex)\npackets = packets + 8\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "ccd15b879bcec38d0a82ed40ff9536dd0e2aaaea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_1209` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_1209 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_1209"}, "prompt_sha1": "ae158b7c3c855b8380856600fafd6b1de625a33f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_96_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 96 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_96_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd96;\n end else begin\n if (pulse_in)\n count <= 7'd96;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_96_retrig", "cycles": 96, "retrigger": true}, "prompt_sha1": "ff3898d7d88a781f447c11327a8298cb25b2f062", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NTNTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 1, 0, 1, 1, 0], "final_state": 2}, "prompt_sha1": "ef724abdfc7dc649f4449f8e16258fb1621d337d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 32-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/32 = 512.\nOffset bits = log2(32) = 5.\nIndex bits = log2(512) = 9.\nTag bits = 52-9-5 = 38.\nCheck: 38+9+5 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 32, "addr_bits": 52, "lines": 512, "offset_bits": 5, "index_bits": 9, "tag_bits": 38}, "prompt_sha1": "76363ffc75e40d09ee8846f02fa9510a0c71b578", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w25_signed` comparing two 25-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w25_signed (\n input logic signed [24:0] a,\n input logic signed [24:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w25_signed", "width": 25, "signed": true}, "prompt_sha1": "b5621973cb700f9a6a9353ae336eefeb4633b029", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_49` for a 49-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_49 (\n input logic signed [48:0] data,\n input logic [5:0] shamt,\n output logic signed [48:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_49", "width": 49, "direction": "right", "arithmetic": true}, "prompt_sha1": "8d508ea5decc7100588e0283d8ae08089334790a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 136 and tail index 351, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (136-351) mod 512 = 297. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 136, "tail": 351, "occupancy": 297}, "prompt_sha1": "4ff585bee20c5858cf32c11330f88b3618bebc5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 57-bit up/down counter `updown_57_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_57_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [56:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_57_wrap", "width": 57, "wrap": true}, "prompt_sha1": "a8832ba00e96a54eac5addfe4115ee46b538f39f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^17 V = 1.37329101563e-05 V = 13.732910 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 1.8, "step": 1.373291015625e-05}, "prompt_sha1": "009c07c814ed237e49794fef89842f0458c4bc94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=4 ms,T=50 ms, C=2 ms,T=200 ms, C=1 ms,T=100 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 4/50 + 2/200 + 1/100 + 2/25 = 0.380000 = 38.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [4, 50], [2, 200], [1, 100], [2, 25]], "utilization": 0.38}, "prompt_sha1": "54b9e5d545e6354d98f807d699110555df8356b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 64 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 64 MHz / 64 = 1.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 64000000.0, "divider": 64, "spi_hz": 1000000.0}, "prompt_sha1": "8aeb3f4b6d0a8ae7b18072490b7eeb7cf66691d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 38-bit up/down counter `updown_38_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_38_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [37:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_38_wrap", "width": 38, "wrap": true}, "prompt_sha1": "1e32f574e57c531f638adf20dbef1d41e8f8a4a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01010010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01010010", "ones": 3, "parity": 1}, "prompt_sha1": "9dacb9be8351a3f766555472832111591e67c7df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 30000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 30000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 30000.0}, "prompt_sha1": "c2f30270a97f8f0d4c2571c7aa1e98789a152374", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 2%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.020 × 4 = 0.020000.\nEffective CPI = 1.2 + 0.020000 = 1.220000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.02, "penalty": 4, "result": 1.22}, "prompt_sha1": "e85dd0633d5fc29a381f3e9a89f89543f93c540f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x10BD, clear bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 6)`. Result = 0x10BD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 4285, "bit": 6, "op": "clear", "result": 4285}, "prompt_sha1": "350d6839a8c0f77a268b14f09e77c2d1cadd26b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 10 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×10/1000/8 = 125000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 10, "bytes": 125000000.0}, "prompt_sha1": "f3eb6ee9318dd4da52f2c7e546c22e5bfb344a1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3613 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "b8ec143feeb33e55a9e581bb031898b4c7936132", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 80 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 1387 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50000×1387/(80×10^6) = 0.866875 = 86.687500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 80, "irq_hz": 50000, "cycles": 1387, "load": 0.866875}, "prompt_sha1": "25cbe96764d91831bdffab9037d1ff6fe125ef89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 6 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 16 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+2 = 9. Total bits = 16×9 = 144. Time = 144/230400 = 0.000625 s = 0.625000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 6, "parity": 0, "stop": 2, "frames": 16, "seconds": 0.000625}, "prompt_sha1": "cc62ee41e4fa8bc99712c895ddf0d9e6a63f9994", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 64 bytes over a datapath transferring 4 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×8×10^6 = 32000000 B/s. Time = 64/32000000 = 2e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 64, "width": 4, "rate_mhz": 8, "sec": 2e-06}, "prompt_sha1": "dbd687aeb61188f1949dba00434dde42567355f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 96 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 128000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 96000000/(16×128000) = 46.875000.\nNearest integer divisor D = 47.\nActual baud = 96000000/(16×47) = 127659.574 baud.\nError = (127659.574-128000)/128000×100% = -0.2660%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 96000000, "oversample": 16, "baud": 128000, "divisor": 47, "actual": 127659.5744680851, "error_pct": -0.26595744680851113}, "prompt_sha1": "a4ea590e15a0bb5acacb991b621b3615203daa6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=5 ms,T=200 ms, C=5 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 5/200 + 5/20 = 0.475000 = 47.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [5, 200], [5, 20]], "utilization": 0.47500000000000003}, "prompt_sha1": "bcc28e6a8f3378b8d6144b6e26bdce5123e96739", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 12-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^12 V = 0.001220703125 V = 1220.703125 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 12, "vref": 5.0, "step": 0.001220703125}, "prompt_sha1": "f840e31689782d478eec05536251e43c82204294", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 64-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/64 = 128.\nOffset bits = log2(64) = 6.\nIndex bits = log2(128) = 7.\nTag bits = 32-7-6 = 19.\nCheck: 19+7+6 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 64, "addr_bits": 32, "lines": 128, "offset_bits": 6, "index_bits": 7, "tag_bits": 19}, "prompt_sha1": "b1a602fd5f4cc9997fe588ff21c03f180d0b2ad2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 26-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^26/2^20 = 2^6 = 64 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 26, "page_exp": 20, "entries": 64}, "prompt_sha1": "1e077f398a494d6b579d80dd8435aa49a5b0961d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xDEAE1D in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: DE AE 1D.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 14593565, "endian": "big", "bytes": [222, 174, 29]}, "prompt_sha1": "f730e29cb3c6aab1a5569bcd460aa6d370ec74bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xDAB06AB9. Extract the 5-bit field starting at bit 6 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xDAB06AB9 >> 6) & 0x1F = 0xA (10).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 6, "value": 3668994745, "mask": 31, "field": 10}, "prompt_sha1": "763b197c171c67ba415956c538399b32447be6e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8936 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8936/(8936+20+8) = 0.996876 = 99.69%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8936, "iphdr": 20, "eff": 0.9968763944667559}, "prompt_sha1": "bcc474057604e915ccc9bd63f96cff95eff85f7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 15%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.150 × 8 = 0.300000.\nEffective CPI = 1.2 + 0.300000 = 1.500000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.15, "penalty": 8, "result": 1.5}, "prompt_sha1": "a83cbe277113da843abad76f16772fec58f4af4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(1×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 8, "time_us": 8.0}, "prompt_sha1": "3ab0cb261be201fd7f5b867bb1b1cd27e90dd1a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 97%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.020×(5+0.030×40) = 0.624000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.98, "l2": 5, "l2_hit": 0.97, "mem": 40, "amat": 0.6240000000000001}, "prompt_sha1": "4ba0f196b8b0addc20f2cd56306f4da8dc27d3d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1111011011101100011101 using generator polynomial bits 110000101. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01000011.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 389, "msg_bits": 22, "msg": 4045597, "remainder": 67}, "prompt_sha1": "409e94abb57f25ce6c34421ad0e11b96d217efaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_9615` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_9615 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_9615"}, "prompt_sha1": "44f5b65753e3053038ce653c0c2b81450fe2632d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0D, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x0D<<1)|0 = 0x1A = 00011010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 13, "rw": 0, "byte": 26}, "prompt_sha1": "80dbfa25b6e1f36178c4419504a969ecce26f74f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2500 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2500×10^6 / (256×8) = 1220703.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "frame_bytes": 256, "pps": 1220703.125}, "prompt_sha1": "b9a3be7543d99936ea0b41199df3f33152c2949f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=5 ms,T=25 ms, C=3 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 5/25 + 3/25 = 0.445000 = 44.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [5, 25], [3, 25]], "utilization": 0.445}, "prompt_sha1": "a2faae1c9c66755dc04dbb186003eda9c95bc993", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 198. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 198/255 × 2.5 V = 1.941176 V.\nThus the estimated input is about 1.9412 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 198, "volts": 1.9411764705882353}, "prompt_sha1": "e0e7958db004850147dca5273d7caa5fa5c97763", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 512 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 512×8 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 512, "page_kib": 8, "reach": 4194304}, "prompt_sha1": "1a9c0119526a37700be2548ec50c5e9e07298142", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 38750 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 38750/10000000 s; frequency = 10000000/38750 = 258.064516 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 38750, "hz": 258.06451612903226}, "prompt_sha1": "81a23634c6b4aabc62426ecec1100151be065434", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x1B61, set bit 13 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 13)`. Result = 0x3B61.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 7009, "bit": 13, "op": "set", "result": 15201}, "prompt_sha1": "b0f56e53f771f3bb7f7951c840c175fa08146640", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 2930 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×2930/(32×10^6) = 0.0183125 = 1.831250%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 200, "cycles": 2930, "load": 0.0183125}, "prompt_sha1": "b1acc851c0a806ab1ef3a50add6ef64dcf185c4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 4000 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-20-20 = 3960 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 20, "tcphdr": 20, "mss": 3960}, "prompt_sha1": "d277c682bf690f2d1673cc3a2ee9dd4eeb94de79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xA23852E9, clear bit 10 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 10)`. Result = 0xA23852E9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 2721600233, "bit": 10, "op": "clear", "result": 2721600233}, "prompt_sha1": "a4ed8381788dbbc6952a9333262faacc031a6a6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 10%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.100 × 4 = 0.100000.\nEffective CPI = 1.2 + 0.100000 = 1.300000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.1, "penalty": 4, "result": 1.3}, "prompt_sha1": "cea4ffadb99fa761dbd8b002463458cd12d2203c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 15-bit up/down counter `updown_15_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_15_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [14:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 15'd32767) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_15_sat", "width": 15, "wrap": false}, "prompt_sha1": "80cf10b580d838d80db081dd081302c1e264e652", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 110111101010100001110010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 13 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "110111101010100001110010", "ones": 13, "parity": 1}, "prompt_sha1": "e840385cee02a9dbcfa0892f074ca9fcac511770", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 65536 bytes over a datapath transferring 2 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×2×10^6 = 4000000 B/s. Time = 65536/4000000 = 0.016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 65536, "width": 2, "rate_mhz": 2, "sec": 0.016384}, "prompt_sha1": "68c4e577949116ac8ac5607c24059a352a3d3f0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 95 and initial occupancy is 36. In an abstract batch, producer attempts to enqueue 67 items first, dropping any excess beyond capacity; then consumer removes up to 2 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=95, dropped=8; consumed=2; final occupancy=93.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 95, "start": 36, "prod": 67, "cons": 2, "dropped": 8, "consumed": 2, "final": 93}, "prompt_sha1": "561b3743d9f436ae418c094d09d578ca6266ced8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 9.9 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 1.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 9.9-1.8 = 8.1 V.\nI = V/R = 8.1/2700 A = 3.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 9.9, "vf": 1.8, "r": 2700, "current_a": 0.003}, "prompt_sha1": "c522f75ceba8b5f040b74a80d5a2c1baa4b6ce3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×1/1000/8 = 625000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 1, "bytes": 625000.0}, "prompt_sha1": "9f1f09cd8cdb405f75274c96c1840465eaa36867", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_106` generating a one-clock-cycle `tick` every 106 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_106 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 105) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_106", "divide": 106}, "prompt_sha1": "4f74b179e5460200bdf6610312511428663e5d50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1101111110110011010 using generator polynomial bits 10111001. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1001111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 185, "msg_bits": 19, "msg": 458138, "remainder": 79}, "prompt_sha1": "73e6784682e148be9c12707ea77d46a750aa863f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2200 ohm and C=560000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2200×560000×10^-12 s = 0.001232 s.\nf_c=1/(2πRC)=1/(2π×2200×560000×10^-12) = 129.1842 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2200, "c_f": 5.6e-07, "tau": 0.001232, "fc": 129.18420705510985}, "prompt_sha1": "ec001f0cc84767233d7dc98682983ee6347ca46c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 39.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+8 = 47.5. Period = 47.5/32000000 = 1.484375e-06 s. Maximum rate = 1/period = 673684.210526 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 39.5, "conv_cycles": 8, "period": 1.484375e-06, "rate": 673684.2105263157}, "prompt_sha1": "b330e7c94626f081cc3d1d981b47a728509fea3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×1.8²=0.0007614 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 1.8, "energy": 0.0007614}, "prompt_sha1": "2a23307d95347428a50c5447fe9378182eb0730c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 25598 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 25598/1000 s; frequency = 1000/25598 = 0.039066 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 25598, "hz": 0.039065551996249705}, "prompt_sha1": "bde2ee9b13a8741880ee48d4bfcc47d794bd5a51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 1 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×10×10^6 = 10000000 B/s. Time = 256/10000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 1, "rate_mhz": 10, "sec": 2.56e-05}, "prompt_sha1": "883ab1967499b806e2c13293c5ece6b35369075c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 10 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-05×100²=0.05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-06, "v": 100, "energy": 0.05}, "prompt_sha1": "db6cba19b3fa72699d40899a456f5f197026a7ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×1/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 1, "bytes": 125000.0}, "prompt_sha1": "b15acf478f5221e74a01bc3251ce61894ea6580d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w8_5017` implementing a dual-clock asynchronous FIFO with depth 4 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w8_5017 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 8,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w8_5017", "depth": 4, "width": 8, "ptr_w": 2}, "prompt_sha1": "128d889dcc93354f0f5d4648cd4c8357a8c314f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 100000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 100000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 100000}, "prompt_sha1": "1c31d920f86700c5be9fd00c509cbc14688e50fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w62_signed` comparing two 62-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w62_signed (\n input logic signed [61:0] a,\n input logic signed [61:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w62_signed", "width": 62, "signed": true}, "prompt_sha1": "efa0807adec820db603010e2eea8e30cd520013e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_4005` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_4005 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_4005", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "da3612056332592292b6c4ccf484df4a024cee24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×2048 KiB = 393216 KiB = 402653184 bytes = 384.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 2048, "reach": 402653184}, "prompt_sha1": "df964b7d4f304cdbda6911ab286b78adbe8f2601", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=22 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/1 = -22.000000.\nVout = A_v×Vin = -22.000000×0.05 = -1.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 22, "vin": 0.05, "gain": -22.0, "vout": -1.1}, "prompt_sha1": "d8639622665252de9d20040a0abfb81afd5c93e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 4 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(4×10^6) s = 6.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 4, "bits": 24, "time_us": 6.0}, "prompt_sha1": "54795898404a89558f2d33504ef8cc484a8340dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 128 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 128/(128+64) = 0.666667 = 66.67%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 128, "overhead": 64, "efficiency": 0.6666666666666666}, "prompt_sha1": "318b8e0eba175e06245df98382959e35ad037a41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-24 = 552 bytes.\nRound down to an 8-byte multiple: floor((552)/8)×8 = 552 bytes.\nFragments required = ceil(10000/552) = 19.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 24, "payload": 10000, "max_payload": 552, "fragments": 19}, "prompt_sha1": "19b407989ff57f4d12efe998fa0ce8ddaf396265", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 2.5 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×2.5/(5×10^9) = 0.025 s = 25.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 2.5, "ghz": 5.0, "sec": 0.025}, "prompt_sha1": "22aa93bcec2537d59350c3949cbbb277c6f0e342", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 55-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^55/2^16 = 2^39 = 549755813888 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 55, "page_exp": 16, "entries": 549755813888}, "prompt_sha1": "9da867ea85c0ff4ddb80ee74af829b798c932ac3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 48 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 48×7 = 336. Time = 336/230400 = 0.00145833333 s = 1.458333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 5, "parity": 0, "stop": 1, "frames": 48, "seconds": 0.0014583333333333334}, "prompt_sha1": "9e73b2893f93e8239f4ce8372fbb3d4827d3717c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 4-way set-associative cache uses 16-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/16 = 512.\nSets = 512/4 = 128.\nOffset bits = log2(16) = 4; index bits = log2(128) = 7; tag bits = 40-4-7 = 29.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 16, "ways": 4, "addr_bits": 40, "lines": 512, "sets": 128, "offset": 4, "index": 7, "tag": 29}, "prompt_sha1": "79918303a8ea2a11f0912d822ae45d00f75c1ef7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x32_write_bypass` with 16 entries of 32 bits. Inputs: `clk`, `we`, `4-bit waddr`, `32-bit wdata`, `4-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [31:0] wdata,\n input logic [3:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x32_write_bypass", "entries": 16, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "a3d4cfc004d5bfdf804545d96dcd712cf2822ffe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 4-way set-associative cache uses 64-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/64 = 4096.\nSets = 4096/4 = 1024.\nOffset bits = log2(64) = 6; index bits = log2(1024) = 10; tag bits = 40-6-10 = 24.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 64, "ways": 4, "addr_bits": 40, "lines": 4096, "sets": 1024, "offset": 6, "index": 10, "tag": 24}, "prompt_sha1": "006c8922bc8db4e15ff258ba1912f1bc1fc91547", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'V', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "V", "P", "P", "P", "P"], "value": 4, "blocked": 0}, "prompt_sha1": "f4f3b6a376b894b24ae1bf0dfc688440586c53e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w16_5381` implementing a dual-clock asynchronous FIFO with depth 8 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w16_5381 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 16,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w16_5381", "depth": 8, "width": 16, "ptr_w": 3}, "prompt_sha1": "c8de5e7f74892daecbc34ceaf9e107125c050301", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7600 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7600/(7600+40+8) = 0.993724 = 99.37%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7600, "iphdr": 40, "eff": 0.9937238493723849}, "prompt_sha1": "d83e0a0323734c13dcd7489a293b964b5cd7a9f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 67 elements. Review loop `for i in range(67+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(67+1)` includes index 67, which is out of range for a length-67 sequence. Correct loop: `for i in range(67):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 67, "variant": "one_past"}, "prompt_sha1": "0e5d6f123dd6b9e7788a72c2d9922dfb60d202e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^24 V = 1.220703125e-07 V = 0.122070 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 2.048, "step": 1.220703125e-07}, "prompt_sha1": "7e5b6268343a69cdbbf6acd315e6d78b729a7d14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 27000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×27000)/(68+27000) = 67.829171 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 27000, "req": 67.82917097679918}, "prompt_sha1": "9ebd16a97e8839ff015780f94984c7b9192d1394", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=10 nF and is stepped to 1.8 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1.8(1-e^-2)=1.556396 V; τ=4.7e-06 s and t=9.4e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1e-08, "multiple": 2, "vin": 1.8, "vc": 1.5563964901740972}, "prompt_sha1": "826f878b41dc16eaaf09ff7345ed03f798c05c0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5477(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5477(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5477([1, 2]) == 1.5\nassert mean_5477([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5477"}, "prompt_sha1": "e6b9467e65df3a85a0dbe3dac5c317d88cc5a41c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47×82)/(47+82) = 29.875969 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47, "r2": 82, "req": 29.875968992248062}, "prompt_sha1": "6157ca068989c3b8c5474a667578876ac0d1c367", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5617` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5617 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5617"}, "prompt_sha1": "a2dfb45a3eab247a58fd0c9ba8aab27a63d29830", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 256-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/256 = 128.\nOffset bits = log2(256) = 8.\nIndex bits = log2(128) = 7.\nTag bits = 64-7-8 = 49.\nCheck: 49+7+8 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 256, "addr_bits": 64, "lines": 128, "offset_bits": 8, "index_bits": 7, "tag_bits": 49}, "prompt_sha1": "39f43ac7787c3def6ff4966be0ea275398852975", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=22 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/10 = -2.200000.\nVout = A_v×Vin = -2.200000×1 = -2.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 22, "vin": 1.0, "gain": -2.2, "vout": -2.2}, "prompt_sha1": "0f723493c036dfc8baf03223e55b16944ac91492", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (1024×8) = 610.351562 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 1024, "pps": 610.3515625}, "prompt_sha1": "b8c74d96a56382663b11df2926e97b34529f1b1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 181 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "df36fa80de758ed15a19b308a83b03a4725e40b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w57_nocin` implementing a 57-bit unsigned adder with inputs `a`, `b` and outputs `57-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w57_nocin (\n input logic [56:0] a,\n input logic [56:0] b,\n output logic [56:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w57_nocin", "width": 57, "cin": false}, "prompt_sha1": "837d502d2f94f138388c2074ecb77f5b9ed9cec9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/200 = 125000.\nWith prescaler divisor limited to at most 256, the largest divisor of 125000 that also keeps the period count within 16 bits is 250.\nPeriod count = 125000/250 = 500.\nPSC register = 250-1 = 249.\nARR register = 500-1 = 499.\nVerification: 25000000/(250×500) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 200, "total_division": 125000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 500, "psc_reg": 249, "arr_reg": 499}, "prompt_sha1": "5c02f1d3df0a0f36921fed34ec6fa937c28f583d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 5 ns hit time, 96.3% hit rate, and a 30 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.963 = 0.037.\nAMAT = hit time + miss rate × miss penalty\n= 5 ns + 0.037×30 ns = 6.1100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 5.0, "hit_rate": 0.963, "penalty": 30, "result": 6.110000000000001}, "prompt_sha1": "d2a3bcc0b25601d85b2145955a0d057c7ff046bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_61` for a 61-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_61 (\n input logic [60:0] data,\n input logic [5:0] shamt,\n output logic [60:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_61", "width": 61, "direction": "right", "arithmetic": false}, "prompt_sha1": "5f9758e554a73c88c28b79ae775b3a076f9717fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock DESC then RX; task_B acquires RX then DESC. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds DESC while waiting for RX, while task_B holds RX while waiting for DESC; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2ea80c9b4f522035331d415da8bf435d0ce231ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×1200)/(680+1200) = 434.042553 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 1200, "req": 434.04255319148933}, "prompt_sha1": "02f45e5b44d9cdc78084786b412531fbffd60fa2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on N; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 0, 1, 1], "final_state": 3}, "prompt_sha1": "23b7186be7844ca27f3d1941bb27113314923228", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8831` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8831 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8831"}, "prompt_sha1": "60c7e855be39cef5855e7de91a0a13973357b5e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w12_nocin` implementing a 12-bit unsigned adder with inputs `a`, `b` and outputs `12-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w12_nocin (\n input logic [11:0] a,\n input logic [11:0] b,\n output logic [11:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w12_nocin", "width": 12, "cin": false}, "prompt_sha1": "d15d01ae78819832e2212148327e7fc314219af4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_200` generating a one-clock-cycle `tick` every 200 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_200 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 199) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_200", "divide": 200}, "prompt_sha1": "471204c23c3051ad39be3ad931a957030435e79d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x8_no_bypass` with 8 entries of 8 bits. Inputs: `clk`, `we`, `3-bit waddr`, `8-bit wdata`, `3-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [7:0] wdata,\n input logic [2:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x8_no_bypass", "entries": 8, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "f23e5b65625f48d7d8dccece9db3fbd9ee6cf2c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_178775` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_178775 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_178775"}, "prompt_sha1": "cc3b037a86a1e193e3543d7d196f5d81c1bcb5be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×40/1000/8 = 5000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 40, "bytes": 5000000.0}, "prompt_sha1": "146e3af93a0b81cadac4e56247e43a2c3825fbc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 4, and period is 32555 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(4×32555) = 92.151743 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 4, "period": 32555, "hz": 92.15174320380893}, "prompt_sha1": "5b3ae1cf414980064249228c34a24e4eaf1545da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 399. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 399/1023 × 2.5 V = 0.975073 V.\nThus the estimated input is about 0.9751 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 399, "volts": 0.9750733137829912}, "prompt_sha1": "e5844aea6d3d6d00fac7993ded4b15ce862d4405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 8-way set-associative cache uses 32-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/32 = 512.\nSets = 512/8 = 64.\nOffset bits = log2(32) = 5; index bits = log2(64) = 6; tag bits = 64-5-6 = 53.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 32, "ways": 8, "addr_bits": 64, "lines": 512, "sets": 64, "offset": 5, "index": 6, "tag": 53}, "prompt_sha1": "a26b4e71494df311ecc37b65e8cd6609428e3f6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=68000 ohm and C=2200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=68000×2200000×10^-12 s = 0.1496 s.\nf_c=1/(2πRC)=1/(2π×68000×2200000×10^-12) = 1.0639 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 68000, "c_f": 2.2e-06, "tau": 0.1496, "fc": 1.0638699404538459}, "prompt_sha1": "abc92678710f4491d831ee3397b329885a5a458e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1200 baud with 1 start bit, 9 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 2 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+1 = 11. Total bits = 2×11 = 22. Time = 22/1200 = 0.0183333333 s = 18.333333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1200, "data": 9, "parity": 0, "stop": 1, "frames": 2, "seconds": 0.018333333333333333}, "prompt_sha1": "7259e3bcc15cf75e3a2e69462ca65102490a7c87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×180)/(47000+180) = 179.313268 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 180, "req": 179.31326833403983}, "prompt_sha1": "2ec1b5ad352edea3f5fa10a8fc52b06264c895ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×20/1000/8 = 250000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 20, "bytes": 250000000.0}, "prompt_sha1": "40124975e1587c79ab4cf65595d68e6bfc60eee7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 449-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 449×8 = 3592 bits.\nSerialization delay = bits/rate = 3592/(25000×10^6) s = 1.4368e-07 s = 0.143680 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 449, "rate_mbps": 25000, "delay_s": 1.4368e-07}, "prompt_sha1": "8c7ed4e31d1ddd2740adba87dc7f0f1f299479f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_665614` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_665614 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_665614"}, "prompt_sha1": "645ddfc77dac0812d6bc264893a59afc08466257", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2970(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2970(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2970([1, 2]) == 1.5\nassert mean_2970([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2970"}, "prompt_sha1": "6d3d1a326edb6655b0bb9fac158f8b8c71b100e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3983 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "25f47201e1ad96e790b052a6731b05cad5d6f307", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/50 = 2880000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 2880000 that also keeps the period count within 16 bits is 2000.\nPeriod count = 2880000/2000 = 1440.\nPSC register = 2000-1 = 1999.\nARR register = 1440-1 = 1439.\nVerification: 144000000/(2000×1440) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 50, "total_division": 2880000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 2000, "period": 1440, "psc_reg": 1999, "arr_reg": 1439}, "prompt_sha1": "8242ed74e5b75890bec9877d739d1a9c5fcd94a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 16 and tail index 2, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (16-2) mod 32 = 14. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 16, "tail": 2, "occupancy": 14}, "prompt_sha1": "163309c8083525e972040f1b23b46a44c63e8551", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 8 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 46 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+1 = 11. Total bits = 46×11 = 506. Time = 506/2400 = 0.210833333 s = 210.833333 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 8, "parity": 1, "stop": 1, "frames": 46, "seconds": 0.21083333333333334}, "prompt_sha1": "30cbf35b17e12f66f2fc8ab67e9619580247b3b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 20 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 20000000/(8×1200) = 2083.333333.\nNearest integer divisor D = 2083.\nActual baud = 20000000/(8×2083) = 1200.192 baud.\nError = (1200.192-1200)/1200×100% = 0.0160%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 20000000, "oversample": 8, "baud": 1200, "divisor": 2083, "actual": 1200.192030724916, "error_pct": 0.016002560409674516}, "prompt_sha1": "9b51f213c1cb55c4547aa44943f2476765c92a17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [22, 21, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [62, 63, 60].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [22, 21, 20], "finish": [62, 63, 60]}, "prompt_sha1": "24cb08560e42fe917418f56934779bf83d6ef351", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 4-bit left-shift register module `shiftreg_left_4`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `4-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_4 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [3:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[2:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_4", "width": 4, "direction": "left"}, "prompt_sha1": "911892d079552797721ce8fe555e3c37af75ae20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.56. Using Amdahl's law, compute the theoretical speedup on 24 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.56) + 0.56/24) = 2.158273.\nThe theoretical speedup is about 2.158×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.56, "n": 24, "result": 2.1582733812949644}, "prompt_sha1": "2a77965a6449d7fec2fbf3fbafd25f6da44b4528", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=5 ms, C=2 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/5 + 2/25 = 0.880000 = 88.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 5], [2, 25]], "utilization": 0.88}, "prompt_sha1": "9abdc5804e693afc541465940a9b2a3affa426a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 933 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "9e2a584376d3eb878d813073d01a523fe33e43bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 102 and initial occupancy is 34. In an abstract batch, producer attempts to enqueue 96 items first, dropping any excess beyond capacity; then consumer removes up to 142 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=102, dropped=28; consumed=102; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 102, "start": 34, "prod": 96, "cons": 142, "dropped": 28, "consumed": 102, "final": 0}, "prompt_sha1": "b13432bc8b6d02db94e226e3863c4f7c59f3e890", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 10% of instructions, the branch misprediction rate is 20%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.200 × 5 = 0.100000.\nEffective CPI = 1.2 + 0.100000 = 1.300000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.1, "mispred": 0.2, "penalty": 5, "result": 1.3}, "prompt_sha1": "980f88043dbf3328b3585e746f20b3a47be4878a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 8-way set-associative cache uses 256-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/256 = 64.\nSets = 64/8 = 8.\nOffset bits = log2(256) = 8; index bits = log2(8) = 3; tag bits = 57-8-3 = 46.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 256, "ways": 8, "addr_bits": 57, "lines": 64, "sets": 8, "offset": 8, "index": 3, "tag": 46}, "prompt_sha1": "9b5edd8e5d891669e6ebee0afa5c2367a1b189a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_7688` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_7688 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_7688", "width": 10}, "prompt_sha1": "d37da4c80aff1d7770c437410741d7de4447274e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w16_3111` implementing a dual-clock asynchronous FIFO with depth 64 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w16_3111 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 16,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w16_3111", "depth": 64, "width": 16, "ptr_w": 6}, "prompt_sha1": "cc0e2f691ee9bb23dd386ccbe6a9720973ad850a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w9_signed` comparing two 9-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w9_signed (\n input logic signed [8:0] a,\n input logic signed [8:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w9_signed", "width": 9, "signed": true}, "prompt_sha1": "11a12757e400f092313e859e707bb90a442a1df6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 1.2 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.2/2^24 V = 7.15255737305e-08 V = 0.071526 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 1.2, "step": 7.152557373046875e-08}, "prompt_sha1": "864521729a8123b87ac3bf7b78d85bb3833af417", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 82 and initial occupancy is 73. In an abstract batch, producer attempts to enqueue 165 items first, dropping any excess beyond capacity; then consumer removes up to 21 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=82, dropped=156; consumed=21; final occupancy=61.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 82, "start": 73, "prod": 165, "cons": 21, "dropped": 156, "consumed": 21, "final": 61}, "prompt_sha1": "5af5d8a579624ee96e6e5e4fcaec5685fa7d3992", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(16×2400) = 3750.000000.\nNearest integer divisor D = 3750.\nActual baud = 144000000/(16×3750) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 16, "baud": 2400, "divisor": 3750, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "963faa1b7510e988e731100472593026e79fd66d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w37_signed` comparing two 37-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w37_signed (\n input logic signed [36:0] a,\n input logic signed [36:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w37_signed", "width": 37, "signed": true}, "prompt_sha1": "a17d74f8f1e253a1a8d951e8bf0acf20a0315775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 120 MHz, prescaler divisor is 954, and period is 3541 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 120000000/(954×3541) = 35.522780 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 120000000, "prescaler": 954, "period": 3541, "hz": 35.52277987066156}, "prompt_sha1": "c9996c17cf3759fb27be32bc1f21ebbe62fec611", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 8 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 8000000/(4×2400) = 833.333333.\nNearest integer divisor D = 833.\nActual baud = 8000000/(4×833) = 2400.960 baud.\nError = (2400.960-2400)/2400×100% = 0.0400%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 8000000, "oversample": 4, "baud": 2400, "divisor": 833, "actual": 2400.9603841536614, "error_pct": 0.0400160064025575}, "prompt_sha1": "b546b739795f1d439508474fd904cfcb6d7aa775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 22; x = x + 301;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 22+301 = 323. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (323) mod 2^8 = 67. So `x` stores 67. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 22, "add": 301, "result": 67}, "prompt_sha1": "eef546a893c40d216c84cd3f1ffcae34659e3ab0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m4540` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 4540 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m4540 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd4540;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m4540", "width": 13, "max": 4540}, "prompt_sha1": "4ada23efcc3d61a07b82ce1e56b95152b9f5d046", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w16_4498` implementing a dual-clock asynchronous FIFO with depth 32 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w16_4498 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 16,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w16_4498", "depth": 32, "width": 16, "ptr_w": 5}, "prompt_sha1": "ed3ee5b392a6e880d8b794ef36e3339ad5670b8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=2.2 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×2.2/(2.2+2.2) = 2.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 2.2, "r2": 2.2, "vout": 2.5}, "prompt_sha1": "b8f4e3d9897a138190a2ef3c2b915a9c4e7b6d88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [17, 23, 9]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [41, 49, 29].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [17, 23, 9], "finish": [41, 49, 29]}, "prompt_sha1": "aa6548aaaddd41af35f28ae80e8127d6a3cff1a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2050-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2050×8 = 16400 bits.\nSerialization delay = bits/rate = 16400/(2500×10^6) s = 6.56e-06 s = 6.560000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2050, "rate_mbps": 2500, "delay_s": 6.56e-06}, "prompt_sha1": "a41337a2e7ad59f0bcf1d14a330376295cde0df0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=1500000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×1500000×10^-12 s = 0.405 s.\nf_c=1/(2πRC)=1/(2π×270000×1500000×10^-12) = 0.3930 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 1.5e-06, "tau": 0.405, "fc": 0.3929751681281366}, "prompt_sha1": "9124fe7b21532757315cf3e19fe27e41e22c915d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 18000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 18000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 18000.0}, "prompt_sha1": "282b689309272e08d8d1a9eb331f00dd919519de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 652, and period is 7032 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(652×7032) = 34.897436 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 652, "period": 7032, "hz": 34.89743643431954}, "prompt_sha1": "a18610d476bc10cbded058cbc5b9f21e2b811d1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 40 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×40/1000/8 = 25000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 40, "bytes": 25000.0}, "prompt_sha1": "9c24c27fb5876f31a4c90a59e1165af1314f2d7d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x8_no_bypass` with 4 entries of 8 bits. Inputs: `clk`, `we`, `2-bit waddr`, `8-bit wdata`, `2-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [7:0] wdata,\n input logic [1:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x8_no_bypass", "entries": 4, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "d6aa6dfd76e5ce01189fe117938aa9bd4f424d1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.22.20.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.22.20.0\nBroadcast address: 10.22.20.15\nUsable host range: 10.22.20.1 to 10.22.20.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.22.20.0/28", "usable": 14, "first": "10.22.20.1", "last": "10.22.20.14", "broadcast": "10.22.20.15"}, "prompt_sha1": "1c03262377162d09f20d959254171070b128374c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 400 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×400×10^6×1 = 25.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 400, "channels": 1, "gbps": 25.6}, "prompt_sha1": "3accf8bb28b368519d17b70165153291051af1be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.25 ns hit time, 86.4% hit rate, and a 150 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.864 = 0.136.\nAMAT = hit time + miss rate × miss penalty\n= 2.25 ns + 0.136×150 ns = 22.6500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.25, "hit_rate": 0.864, "penalty": 150, "result": 22.650000000000002}, "prompt_sha1": "46abac9c5b9c742edfbca565cc875e3971fe4fcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_7` for a synchronous sampled input `noisy`. Update output `clean` only after observing 7 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_7 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 6) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_7", "stable_samples": 7}, "prompt_sha1": "bc814f3c8394db8776633f3473ebe7e70bad56d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(5×10^6) s = 51.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 256, "time_us": 51.199999999999996}, "prompt_sha1": "07845fe241c7563686727d6b016d03687fae4407", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-20 = 536 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 20, "mss": 536}, "prompt_sha1": "ca2af99de46629090f973b42b3b2c3a6e78a4d3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1463 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "a3e5efe0b11a3c52be9e750003e3eefa0f0ca48b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 3000 counts per period. What compare/high-time count produces exactly 70% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.7 × 3000 = 2100. Verification: 2100/3000 = 0.7, which is 70%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 3000, "duty": 70, "high": 2100}, "prompt_sha1": "48ef22bdab8657253bfb698ca568364117a47390", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 64 data bits per transfer at 400 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 64/8 = 8. Bandwidth = 8×400×10^6×2 = 6.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 64, "rate_mt": 400, "channels": 2, "gbps": 6.4}, "prompt_sha1": "8afb17b06a341bcd1000c67ddc025afe05efd6ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 20/1000 = 4e+08 bits = 5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 20, "bits": 400000000.0, "bytes": 50000000.0}, "prompt_sha1": "3478395be005c876d9d11db7fdad35d226c6b6b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 240 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 65536. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 240000000/50 = 4800000.\nWith prescaler divisor limited to at most 65536, the largest divisor of 4800000 that also keeps the period count within 16 bits is 64000.\nPeriod count = 4800000/64000 = 75.\nPSC register = 64000-1 = 63999.\nARR register = 75-1 = 74.\nVerification: 240000000/(64000×75) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 240000000, "target_hz": 50, "total_division": 4800000, "max_prescaler": 65536, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64000, "period": 75, "psc_reg": 63999, "arr_reg": 74}, "prompt_sha1": "1bdb4e284807e308c3c8b33394c5987984f2c039", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_37_msb` for `37-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_37_msb (\n input logic [36:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 37; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_37_msb", "width": 37, "priority": "high"}, "prompt_sha1": "702a5ce5933d64a0317ced9595ab57b8ff7aed73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/330=0.00303030303 A. P=V²/R=1²/330=0.00303030303 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 330, "i": 0.0030303030303030303, "p": 0.0030303030303030303}, "prompt_sha1": "288c4415623cdec6cbc108589ab24db3171278e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=39000 ohm and C=1800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=39000×1800000×10^-12 s = 0.0702 s.\nf_c=1/(2πRC)=1/(2π×39000×1800000×10^-12) = 2.2672 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 39000, "c_f": 1.8e-06, "tau": 0.0702, "fc": 2.2671644315084807}, "prompt_sha1": "ddef96a4fc270bcebf2fbf7fbb62bbefbcc30f36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(8×10^6) s = 128.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 1024, "time_us": 128.0}, "prompt_sha1": "54104e717dd70972dc2bd1a7a360d95b21153b7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x20_no_bypass` with 8 entries of 20 bits. Inputs: `clk`, `we`, `3-bit waddr`, `20-bit wdata`, `3-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_8x20_no_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [19:0] wdata,\n input logic [2:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x20_no_bypass", "entries": 8, "width": 20, "mode": "no_bypass"}, "prompt_sha1": "6424aa509778553206407dcc01e4c67890c6e058", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x12, toggle bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 5)`. Result = 0x32.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 18, "bit": 5, "op": "toggle", "result": 50}, "prompt_sha1": "adfad43b9b0ade64f178dbbbc4fa792039a3c97e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/2200=0.00227272727 A. P=V²/R=5²/2200=0.0113636364 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 2200, "i": 0.0022727272727272726, "p": 0.011363636363636364}, "prompt_sha1": "aa8becc5d3418412249ba82189b728adcb946526", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 6. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 6/4095 × 3 V = 0.004396 V.\nThus the estimated input is about 0.0044 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 6, "volts": 0.004395604395604396}, "prompt_sha1": "53448561dd02614c9977fbd5ea675b91f1c38e1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 36 and initial occupancy is 7. In an abstract batch, producer attempts to enqueue 175 items first, dropping any excess beyond capacity; then consumer removes up to 93 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=36, dropped=146; consumed=36; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 36, "start": 7, "prod": 175, "cons": 93, "dropped": 146, "consumed": 36, "final": 0}, "prompt_sha1": "2e1d2f01e20d82d248eef788b698990c2e6d70ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_231` generating a one-clock-cycle `tick` every 231 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_231 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 230) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_231", "divide": 231}, "prompt_sha1": "68ad38ebe0d0ab1da4fe066d23bdf3d91d62c9f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 8 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 64 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+2 = 12. Total bits = 64×12 = 768. Time = 768/9600 = 0.08 s = 80.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 8, "parity": 1, "stop": 2, "frames": 64, "seconds": 0.08}, "prompt_sha1": "5ccae87f54f36c5af3020e916ef1e0e8943c1982", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 337. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 337; T2 reads 337; both compute 338; T1 writes 338; T2 writes 338. The observed final value is 338, but two serial increments would produce 339.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "3348065bbd5b4f0460ec166df8681088cad43d51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 16 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+16) = 0.988701 = 98.87%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 16, "efficiency": 0.9887005649717514}, "prompt_sha1": "46b5b95fb90743cc6784175bdc9c4ecc4df77b3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2025-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2025×8 = 16200 bits.\nSerialization delay = bits/rate = 16200/(1000×10^6) s = 1.62e-05 s = 16.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2025, "rate_mbps": 1000, "delay_s": 1.62e-05}, "prompt_sha1": "46e234774bcdb21b718c0604132470785a30574b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3.75 ns hit time, 98.6% hit rate, and a 170 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.986 = 0.014.\nAMAT = hit time + miss rate × miss penalty\n= 3.75 ns + 0.014×170 ns = 6.1300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.75, "hit_rate": 0.986, "penalty": 170, "result": 6.130000000000003}, "prompt_sha1": "048003c3ecb43ccf4e80c27b9c093e8cc4bfdd95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3595 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "5b777d45226212352cc619282ea0c795d110f2cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5587` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5587 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5587"}, "prompt_sha1": "ec996f635748c19f1a4fbaae8c7287b527971294", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 75%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.030×(5+0.250×40) = 1.650000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.97, "l2": 5, "l2_hit": 0.75, "mem": 40, "amat": 1.6500000000000004}, "prompt_sha1": "a966f7dc60a6d4df0dd856bea22b31516470dd52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w60_cin` implementing a 60-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `60-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w60_cin (\n input logic [59:0] a,\n input logic [59:0] b,\n input logic cin,\n output logic [59:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w60_cin", "width": 60, "cin": true}, "prompt_sha1": "5c41fe6e3f435106a454d76d450045c1f2dc3731", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xD7B1DD8E, clear bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 1)`. Result = 0xD7B1DD8C.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 3618758030, "bit": 1, "op": "clear", "result": 3618758028}, "prompt_sha1": "3005641e2732b8b35c97816aebc3f1410230125a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 64 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 64/(64+28) = 0.695652 = 69.57%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 64, "overhead": 28, "efficiency": 0.6956521739130435}, "prompt_sha1": "c870733726e19eeb75df9d83a7386ed43cca5b71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500000 Hz satisfies it.", "output": "Nyquist minimum is 2×500000 = 1000000 Hz. Proposed rate 500000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500000, "min_fs": 1000000, "proposed": 500000}, "prompt_sha1": "a357c9a509b25b8e2122c2ddcd11fcb8c1d557e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 4 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×40×10^6 = 160000000 B/s. Time = 262144/160000000 = 0.0016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 4, "rate_mhz": 40, "sec": 0.0016384}, "prompt_sha1": "866f36338f596adc7b6dd2639b70188df7ba4673", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_825240` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_825240 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_825240"}, "prompt_sha1": "5010a9aa9d72ab99c996d338fbd1c071fcb1a4bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=200 ms, C=5 ms,T=25 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/200 + 5/25 + 4/20 = 0.405000 = 40.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 200], [5, 25], [4, 20]], "utilization": 0.405}, "prompt_sha1": "497c2cbe52e641f6ac1e917757511efe4320aa78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 30-bit left-shift register module `shiftreg_left_30`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `30-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_30 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [29:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[28:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_30", "width": 30, "direction": "left"}, "prompt_sha1": "cf38fa6a04afcaec9212f32e281d4ff817dc5af7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1 Mbit/s using fixed 1200-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1×10^6 / (1200×8) = 104.166667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1, "frame_bytes": 1200, "pps": 104.16666666666667}, "prompt_sha1": "d389ed2624ab14ec0f040e5c613daca3a8d3905f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 12.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+8 = 20.5. Period = 20.5/64000000 = 3.203125e-07 s. Maximum rate = 1/period = 3121951.219512 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 12.5, "conv_cycles": 8, "period": 3.203125e-07, "rate": 3121951.219512195}, "prompt_sha1": "97b2fa75ea2869a1493f775bfed986aeb03215c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 279 elements. Review loop `for i in range(279-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(279-1)` produces indices 0 through 277, so index 278 is skipped. Correct loop: `for i in range(279):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 279, "variant": "miss_last"}, "prompt_sha1": "8a034fc64429e557b3f23465936f3553aed0b32b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xAD, toggle bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 5)`. Result = 0x8D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 173, "bit": 5, "op": "toggle", "result": 141}, "prompt_sha1": "e99fea1a8f9f24f59c04c68160a583cc6f6858c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1.8e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×1000000 = 2000000 Hz. Proposed rate 1.8e+06 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000000, "min_fs": 2000000, "proposed": 1800000.0}, "prompt_sha1": "d10f3cea4466141d88ffb839b2feefba8b94b2d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(40×10^6) s = 0.600000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 24, "time_us": 0.6}, "prompt_sha1": "ef8c59de5ba9a8a34137097fe2a9fd2bae4ca9a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 330 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (330×820)/(330+820) = 235.304348 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 330, "r2": 820, "req": 235.30434782608697}, "prompt_sha1": "f6d2dc83eb530788af380dadaceb9f5ba75cc62a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m2674` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 2674 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m2674 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd2674;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m2674", "width": 12, "max": 2674}, "prompt_sha1": "896f4a43fde1f84f886abfa42ba2c4e3475f8f48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=40 ms, C=4 ms,T=5 ms, C=4 ms,T=40 ms, C=2 ms,T=50 ms, C=3 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/40 + 4/5 + 4/40 + 2/50 + 3/50 = 1.050000 = 105.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 40], [4, 5], [4, 40], [2, 50], [3, 50]], "utilization": 1.05}, "prompt_sha1": "deb7c7983fa0fab270d85549fa5d7c452629b8db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.88. Using Amdahl's law, compute the theoretical speedup on 128 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.88) + 0.88/128) = 7.881773.\nThe theoretical speedup is about 7.882×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.88, "n": 128, "result": 7.881773399014779}, "prompt_sha1": "05b1c0e1d0be7addc5091a6cad1de3ed78a13478", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8282` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8282 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8282"}, "prompt_sha1": "189c8f8ed64686e98242bd37f02b4f90f8dac6ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 80000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 80000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 80000}, "prompt_sha1": "21f0592766770a521402283812d766ee9d0edea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 9.2 V source drives a 1000 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 9.2-3.4 = 5.8 V.\nI = V/R = 5.8/1000 A = 5.8000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 9.2, "vf": 3.4, "r": 1000, "current_a": 0.005799999999999999}, "prompt_sha1": "c5e21410addbc2c0c5bb26521c193cf877c45438", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_63_msb` for `63-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_63_msb (\n input logic [62:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 63; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_63_msb", "width": 63, "priority": "high"}, "prompt_sha1": "02591dd0b00f1e6f3b7e92a5c39874979b3a4fdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 101111111111000100 using generator polynomial bits 11110101. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1000100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 245, "msg_bits": 18, "msg": 196548, "remainder": 68}, "prompt_sha1": "4cf333d8d63262518339511730cd5966d30509e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 1157. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 1157/16383 × 3 V = 0.211866 V.\nThus the estimated input is about 0.2119 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 1157, "volts": 0.21186595861563817}, "prompt_sha1": "f12b9b12bc69a82ddc4de8e398401650b23a795b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^6 V = 0.09375 V = 93750.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 6.0, "step": 0.09375}, "prompt_sha1": "a67dc2910341d909808a7b4d243b6b217f14eb6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 39 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 39-10 = 29.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 39, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 29}, "prompt_sha1": "29d942467dd66ddab098c16eeedac83477898bd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 24 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 24 MHz / 64 = 0.375000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 24000000.0, "divider": 64, "spi_hz": 375000.0}, "prompt_sha1": "238c4c4dcc32fbd9b71af2eac4ce1d54d73e4592", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2441924701, carries 11952 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 11952+0+0 = 11952. ACK = (2441924701+11952) mod 2^32 = 2441936653.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2441924701, "payload": 11952, "syn": 0, "fin": 0, "ack": 2441936653}, "prompt_sha1": "41b18631929def2d7f81f3d756e4f5fe121c8afb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 100 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 100000000/(8×1000000) = 12.500000.\nNearest integer divisor D = 12.\nActual baud = 100000000/(8×12) = 1041666.667 baud.\nError = (1041666.667-1000000)/1000000×100% = 4.1667%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 100000000, "oversample": 8, "baud": 1000000, "divisor": 12, "actual": 1041666.6666666666, "error_pct": 4.1666666666666625}, "prompt_sha1": "1470936da9f78f613c7b8d8ff412ab71ca451bb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 16-way set-associative cache uses 256-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/256 = 64.\nSets = 64/16 = 4.\nOffset bits = log2(256) = 8; index bits = log2(4) = 2; tag bits = 48-8-2 = 38.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 256, "ways": 16, "addr_bits": 48, "lines": 64, "sets": 4, "offset": 8, "index": 2, "tag": 38}, "prompt_sha1": "4d75b46b7ba211ad1d0163bf8e6afe527bd2a5c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x14, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x14<<1)|1 = 0x29 = 00101001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 20, "rw": 1, "byte": 41}, "prompt_sha1": "07ee272188730b1178ae371e04f7f1fc992d312d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_65_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 65 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_65_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd65;\n end else begin\n if (pulse_in)\n count <= 7'd65;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_65_retrig", "cycles": 65, "retrigger": true}, "prompt_sha1": "7a9baa981865a0267f7f69f381f1362b61e25757", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_90_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 90 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_90_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd90;\n end else begin\n if (pulse_in)\n count <= 7'd90;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_90_retrig", "cycles": 90, "retrigger": true}, "prompt_sha1": "26913dc19cac2323e5ce7b87fbddcc35f21dc1d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=10 kOhm from Vin to Vout, and R2=4.7 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×4.7/(10+4.7) = 1.055102 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 10, "r2": 4.7, "vout": 1.0551020408163265}, "prompt_sha1": "0ed58c0a2486ec42713081da2ac0037dd682a08e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551453; x = x + 452;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551453+452 = 18446744073709551905. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551905) mod 2^64 = 289. So `x` stores 289. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551453, "add": 452, "result": 289}, "prompt_sha1": "b7d74a3201065922eb9860bbdc07f1708a8b8719", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^6 V = 0.0390625 V = 39062.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 2.5, "step": 0.0390625}, "prompt_sha1": "317d8abb55545ff82be030dd329785b4cd82ac14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w61_signed` comparing two 61-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w61_signed (\n input logic signed [60:0] a,\n input logic signed [60:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w61_signed", "width": 61, "signed": true}, "prompt_sha1": "04d808c0aecd1d1132860c598db08f6058b609a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.75.79.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.75.79.0\nBroadcast address: 10.75.79.3\nUsable host range: 10.75.79.1 to 10.75.79.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.75.79.0/30", "usable": 2, "first": "10.75.79.1", "last": "10.75.79.2", "broadcast": "10.75.79.3"}, "prompt_sha1": "4e2a024144885c9c7b0abca61dbf246d99b3a116", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x3B. Extract the 4-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x3B >> 4) & 0xF = 0x3 (3).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 4, "value": 59, "mask": 15, "field": 3}, "prompt_sha1": "40457fb45d94c21d82a19239c1774a6458714605", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "39651af8d3ed31dd13db6af1de6f646c6d1a23f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x32_write_bypass` with 8 entries of 32 bits. Inputs: `clk`, `we`, `3-bit waddr`, `32-bit wdata`, `3-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [31:0] wdata,\n input logic [2:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x32_write_bypass", "entries": 8, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "8f892abde108b4cb052a2c5f9715fa6cb6314e58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 1000 Mbit/s and RTT 10 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 1000×10^6×10/1000/8 = 1250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "rtt_ms": 10, "bytes": 1250000.0}, "prompt_sha1": "6de0aff4d48bfc9f9f3e6bec268ac18e2ecfe00a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 29 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 29 = 31.\nClock pulses = 31×9 = 279.\nTime = 279/400000 s = 697.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 29, "clocks": 279, "time_s": 0.0006975}, "prompt_sha1": "b34117e84c906d300c29b85694299ae40219d890", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `entries` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n sum += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `samples[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n sum += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "bebaa869407d0155204c3734f18d8d04baaebbe2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_12` for a 12-bit unsigned input `data`, `4-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_12 (\n input logic [11:0] data,\n input logic [3:0] shamt,\n output logic [11:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_12", "width": 12, "direction": "left", "arithmetic": false}, "prompt_sha1": "423d59b35b106617f792be6356ec5c29850c4635", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_25_38_17` with RED, GREEN, YELLOW states. Hold RED for 25 clock cycles, GREEN for 38, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_25_38_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 24) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_25_38_17", "red": 25, "green": 38, "yellow": 17}, "prompt_sha1": "9630110db95033058dbcce0aafe12de36f2e9cd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 2961 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 2961/(2961+40+8) = 0.984048 = 98.40%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 2961, "iphdr": 40, "eff": 0.9840478564307079}, "prompt_sha1": "ea7b89e811c2340c18a23e3a3dfba74b50e57d5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x55, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x55<<1)|0 = 0xAA = 10101010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 85, "rw": 0, "byte": 170}, "prompt_sha1": "7bf84043f8a56efe53bb3f36d1655dcf2e8e3391", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×1/1000/8 = 625.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 1, "bytes": 625.0}, "prompt_sha1": "bad6cf09b3c4d393f06fef4eee0448ca417ef630", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=4.7 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×2.2/(4.7+2.2) = 1.594203 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 4.7, "r2": 2.2, "vout": 1.5942028985507246}, "prompt_sha1": "aea21d7d8e860f8fe762b3cbdca78e32c2707e51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1100111111000111 using generator polynomial bits 1110001. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 011001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 113, "msg_bits": 16, "msg": 53191, "remainder": 25}, "prompt_sha1": "f1c608fefd376af7e9c25d1e82652486363b142e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 80 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 80 MHz / 256 = 0.312500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 80000000.0, "divider": 256, "spi_hz": 312500.0}, "prompt_sha1": "fe8ddc3d6ab2590a9dc5d4eedcfa2f0a8449bff9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 21 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 21 = 23.\nClock pulses = 23×9 = 207.\nTime = 207/1000000 s = 207.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 21, "clocks": 207, "time_s": 0.000207}, "prompt_sha1": "2dcf0ab0d3c9fcc0b12421f8ee992a0cf0d23b35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1413 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "a169cc3114702ab9ebb34f15d4f4181cf7bc7fdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 9600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(16×9600) = 104.166667.\nNearest integer divisor D = 104.\nActual baud = 16000000/(16×104) = 9615.385 baud.\nError = (9615.385-9600)/9600×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 16, "baud": 9600, "divisor": 104, "actual": 9615.384615384615, "error_pct": 0.1602564102564088}, "prompt_sha1": "6dea3907dbfa7d5e3bba5e17b52172abfe963c1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 35 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 35-18 = 17.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 35, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 17}, "prompt_sha1": "612b194844319f236cc1272064830c9e91e387eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_3265` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_3265 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_3265", "width": 3}, "prompt_sha1": "a7c4d191d95d0ab82723c5a7fe9c6ceac004ddef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.1 V source drives a 3900 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.1-2.9 = 3.2 V.\nI = V/R = 3.2/3900 A = 0.8205 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.1, "vf": 2.9, "r": 3900, "current_a": 0.0008205128205128205}, "prompt_sha1": "a9761facddf0ae974958cad8208cd3649e08016d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 3 = 0.036000.\nEffective CPI = 1.2 + 0.036000 = 1.236000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.08, "penalty": 3, "result": 1.236}, "prompt_sha1": "8dc1ad822fccafc42178eb71b4e29b1f049725d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=1 nF and is stepped to 2.5 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=2.5(1-e^-0.5)=0.983673 V; τ=4.7e-07 s and t=2.35e-07 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1e-09, "multiple": 0.5, "vin": 2.5, "vc": 0.9836733507184164}, "prompt_sha1": "d32af090bca82a912a27e4aa936810d4f3248aa5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 27 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 27 = 29.\nClock pulses = 29×9 = 261.\nTime = 261/100000 s = 2610.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 27, "clocks": 261, "time_s": 0.00261}, "prompt_sha1": "d13237cc8d96bb43f1580577861fbffd1e8634d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 56629. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 56629/65535 × 3.3 V = 2.851540 V.\nThus the estimated input is about 2.8515 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 56629, "volts": 2.8515403982604717}, "prompt_sha1": "f2207c236151dcbbdefd118e2f36c8898794c914", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_51_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 51 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_51_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd51;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_51_ignore", "cycles": 51, "retrigger": false}, "prompt_sha1": "361c3cc2d799b77ac7aef63d70ac2d44c364a84f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m109` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 109 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m109 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd109;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m109", "width": 7, "max": 109}, "prompt_sha1": "35c09453e75c1fe2c513737fa2a77cbfc19fbf4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/330=0.0151515152 A. P=V²/R=5²/330=0.0757575758 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 330, "i": 0.015151515151515152, "p": 0.07575757575757576}, "prompt_sha1": "3b989fd9a578cb4fdfe259d3ccb5738f6d699056", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 32282 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 32282/100000 s; frequency = 100000/32282 = 3.097702 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 32282, "hz": 3.0977015054829318}, "prompt_sha1": "93a16927da116f94c7069dc190415cd207869c8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 3.3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.3/2^24 V = 1.96695327759e-07 V = 0.196695 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 3.3, "step": 1.9669532775878905e-07}, "prompt_sha1": "f881ce6d3fc653f76b677bd15948e42ea6c21178", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=22 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/22 = -1.000000.\nVout = A_v×Vin = -1.000000×0.1 = -0.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 22, "vin": 0.1, "gain": -1.0, "vout": -0.1}, "prompt_sha1": "8a5d5c5ddf657332ff91e09c75147e2ce8b42177", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967079; x = x + 460;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967079+460 = 4294967539. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967539) mod 2^32 = 243. So `x` stores 243. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967079, "add": 460, "result": 243}, "prompt_sha1": "20fb6e75812c1626b0211fe0f6215bb81bc1cc2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^13 V = 0.00030517578125 V = 305.175781 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 2.5, "step": 0.00030517578125}, "prompt_sha1": "b7ba3a5724bcbd1e131de0be5507392be0a416c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 4049 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×4049/(120×10^6) = 0.674833333 = 67.483333%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 20000, "cycles": 4049, "load": 0.6748333333333333}, "prompt_sha1": "358be8e09d53749c8d38a63cb601d37a0edaffc7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [28, 13, 28]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [65, 37, 69].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [28, 13, 28], "finish": [65, 37, 69]}, "prompt_sha1": "53f1a886c630fb5f6ee38b817556981d4083c3f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x321D11AC, set bit 28 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 28)`. Result = 0x321D11AC.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 840765868, "bit": 28, "op": "set", "result": 840765868}, "prompt_sha1": "10887d721a99122f4c6d9319d11f07e3d3902abb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 4000 counts per period. What compare/high-time count produces exactly 15% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.15 × 4000 = 600. Verification: 600/4000 = 0.15, which is 15%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 4000, "duty": 15, "high": 600}, "prompt_sha1": "f97888885d8b46555d92ee2fe2159f497b092138", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x5A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x5A<<1)|1 = 0xB5 = 10110101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 90, "rw": 1, "byte": 181}, "prompt_sha1": "ab2730899c638849e5c2cf3d375295e4bf49ec92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9722(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9722(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9722([1, 2]) == 1.5\nassert mean_9722([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9722"}, "prompt_sha1": "8569387907cabb46e582b691f9e73e550b01b2d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3145 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0ae263683eff2bcb7aa11adeb439d8c41594d51f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3 V reference and returns code 1484. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 1484/4095 × 3 V = 1.087179 V.\nThus the estimated input is about 1.0872 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.0, "code": 1484, "volts": 1.087179487179487}, "prompt_sha1": "f2bbe47a8c745db598c1f1b42975fca0dc1c9baf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 64 = 0.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 64, "spi_hz": 250000.0}, "prompt_sha1": "47790251edadfc568931e7e6c281e9fe4b6decf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 20-bit right-shift register module `shiftreg_right_20`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `20-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_20 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [19:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[19:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_20", "width": 20, "direction": "right"}, "prompt_sha1": "7b46bb75978bca716a84d14827150378457c1a60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.5 ns hit time, 98.6% hit rate, and a 150 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.986 = 0.014.\nAMAT = hit time + miss rate × miss penalty\n= 2.5 ns + 0.014×150 ns = 4.6000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.5, "hit_rate": 0.986, "penalty": 150, "result": 4.600000000000001}, "prompt_sha1": "1b3b19e2c9a0ccca8c8d06ac26e8110c7b917896", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 2000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (2000×8) = 6250000.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 2000, "pps": 6250000.0}, "prompt_sha1": "049aa20a7994a8af03e678e22a3dda20ff3f59d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 80 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 4382 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 50000×4382/(80×10^6) = 2.73875 = 273.875000%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 80, "irq_hz": 50000, "cycles": 4382, "load": 2.73875}, "prompt_sha1": "e8cd3e64f910304252df887588ecd00fd0149182", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "a019bbaa88b1998075625ff770ecf4e089d5eaf7", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "15ccfec1241ef0b632358b5585a0d07d3688a9c10f9c5cbc2c6a53db8cb5171a", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 5863, "original_row_sha256": "2cdc06ae2d8df318d2e82a0d4a4e8a1c2e97ec4cd77d8bbb8df0f171bc5cf451", "version": "v1.0.0-rc1"}}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1010111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1010111", "ones": 5, "parity": 1}, "prompt_sha1": "4d1e8a37761f2bb57eba21929e2ee0353e65ce95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=390000 ohm and C=470000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=390000×470000×10^-12 s = 0.1833 s.\nf_c=1/(2πRC)=1/(2π×390000×470000×10^-12) = 0.8683 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 390000, "c_f": 4.7e-07, "tau": 0.1833, "fc": 0.8682757397266522}, "prompt_sha1": "74b183789df41275019cba937386693d2e587c44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 15 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 15 = 17.\nClock pulses = 17×9 = 153.\nTime = 153/400000 s = 382.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 15, "clocks": 153, "time_s": 0.0003825}, "prompt_sha1": "c58a79ea35d1fd9584159e3a2bd5739043fe2455", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1800 ohm and C=560000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1800×560000×10^-12 s = 0.001008 s.\nf_c=1/(2πRC)=1/(2π×1800×560000×10^-12) = 157.8918 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1800, "c_f": 5.6e-07, "tau": 0.001008, "fc": 157.89180862291204}, "prompt_sha1": "edb6f97bc70daa15d5c743c2c2a028cfeaff133a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/1000 = 4.7e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 1000, "tau": 4.7e-06}, "prompt_sha1": "1389d937eaf8ee0a763181145a2e1572c6b67be5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 1 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×4×10^6 = 4000000 B/s. Time = 128/4000000 = 3.2e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 1, "rate_mhz": 4, "sec": 3.2e-05}, "prompt_sha1": "6fa56e596f03cf62dc951b883d7174da2e9e0400", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 27 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 27-17 = 10.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 27, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 10}, "prompt_sha1": "aa70a55982e5e138976d459f446fcd2d5a5d8236", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 80 counts per period. What compare/high-time count produces exactly 12.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.125 × 80 = 10. Verification: 10/80 = 0.125, which is 12.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 80, "duty": 12.5, "high": 10}, "prompt_sha1": "0d137e9ecbf12dfa05efef410be3d1c85bb6195f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_17_12` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 17, and YELLOW for 12; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_17_12 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 16) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 11) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_17_12", "red": 23, "green": 17, "yellow": 12}, "prompt_sha1": "76b8341480050dead12716026c07399c5ffdaa4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 12 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 12 MHz / 4 = 3.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 12000000.0, "divider": 4, "spi_hz": 3000000.0}, "prompt_sha1": "c32ac743f6ed0252428053ea50bd17683484b838", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 5%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.050 × 12 = 0.090000.\nEffective CPI = 1 + 0.090000 = 1.090000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.05, "penalty": 12, "result": 1.09}, "prompt_sha1": "69ef13b622de6bc01fc5f984f58f428bdee556fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1345-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1345×8 = 10760 bits.\nSerialization delay = bits/rate = 10760/(25000×10^6) s = 4.304e-07 s = 0.430400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1345, "rate_mbps": 25000, "delay_s": 4.304e-07}, "prompt_sha1": "da8711c1e1c4445f8982573745599b64be7fdba7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_11_10_9` with RED, GREEN, YELLOW states. Hold RED for 11 clock cycles, GREEN for 10, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_11_10_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 10) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 9) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_11_10_9", "red": 11, "green": 10, "yellow": 9}, "prompt_sha1": "051ba05db4cda51be531222b260ae203755f7b0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967279; x = x + 236;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967279+236 = 4294967515. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967515) mod 2^32 = 219. So `x` stores 219. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967279, "add": 236, "result": 219}, "prompt_sha1": "544beef4cc917bb07015e679589bdc9d7455bcda", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 53-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^53/2^18 = 2^35 = 34359738368 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 53, "page_exp": 18, "entries": 34359738368}, "prompt_sha1": "be8ffa9cba69ed16f920817ed497099ec721d805", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 4.096 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.096/2^19 V = 7.8125e-06 V = 7.812500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 4.096, "step": 7.8125e-06}, "prompt_sha1": "5899c479d6b01c2c1055b4d664533e3ba62d2b40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 79.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+8 = 87.5. Period = 87.5/16000000 = 5.46875e-06 s. Maximum rate = 1/period = 182857.142857 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 79.5, "conv_cycles": 8, "period": 5.46875e-06, "rate": 182857.14285714287}, "prompt_sha1": "a2b02ee8b165d696ebe6417d7e4cbfa799d9df49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_38` for a 38-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_38 (\n input logic [37:0] data,\n input logic [5:0] shamt,\n output logic [37:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_38", "width": 38, "direction": "left", "arithmetic": false}, "prompt_sha1": "ca6cad79f563308fdc70c6eadc8612012ac804b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 7` on one shared integer without synchronization. Assume `jobs` initially equals 174. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 174; T2 reads 174; both compute 181; T1 writes 181; T2 writes 181. The observed final value is 181, but two serial increments would produce 188.\n\n```\nlock(mutex)\njobs = jobs + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "19f48c0dffc5f1bcd225dee3942176b777942e32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `len` elements of type `int`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n result += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `buf[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n result += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "22c78a4f67257f44ed26200372e5b82941246c75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 100 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 100 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 100}, "prompt_sha1": "4c9c4a1ebdad31a9bd9b4759e49749f116aaa30f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.57. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.57) + 0.57/8) = 1.995012.\nThe theoretical speedup is about 1.995×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.57, "n": 8, "result": 1.9950124688279298}, "prompt_sha1": "6bffc69e8e4c8b1f7b7c48514ca08b479993b3aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 192 payload bytes plus 18 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 192/(192+18) = 0.914286 = 91.43%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 192, "overhead": 18, "efficiency": 0.9142857142857143}, "prompt_sha1": "43d5c7f36cb127f984aab43417c5ccd939d13aa9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 921, and period is 22940 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(921×22940) = 0.378649 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 921, "period": 22940, "hz": 0.37864911249381145}, "prompt_sha1": "4431537cccd57f67576e7bf308a44dd006704f7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1024 bytes over a datapath transferring 2 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×10×10^6 = 20000000 B/s. Time = 1024/20000000 = 5.12e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1024, "width": 2, "rate_mhz": 10, "sec": 5.12e-05}, "prompt_sha1": "ec4894ad5afa43b5a457f0ca051d4ec2880ace27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 3-bit up/down counter `updown_3_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_3_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [2:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 3'd7) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_3_sat", "width": 3, "wrap": false}, "prompt_sha1": "2ea49238ec8630d7178401c44b49d02c065104f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `count` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n sum += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `buf[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n sum += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "1120b41c18b11119c444d1568960d029b6e33a6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_113` for a synchronous sampled input `noisy`. Update output `clean` only after observing 113 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_113 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 112) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_113", "stable_samples": 113}, "prompt_sha1": "0b962e1fab771b91798630535fdf485918155189", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_30_52_10` with RED, GREEN, YELLOW states. Hold RED for 30 clock cycles, GREEN for 52, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_30_52_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 29) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 51) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_30_52_10", "red": 30, "green": 52, "yellow": 10}, "prompt_sha1": "92044e08557e6a36257ac84cf4eb6022ecaf624a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 8-way set-associative cache uses 16-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/16 = 32768.\nSets = 32768/8 = 4096.\nOffset bits = log2(16) = 4; index bits = log2(4096) = 12; tag bits = 32-4-12 = 16.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 16, "ways": 8, "addr_bits": 32, "lines": 32768, "sets": 4096, "offset": 4, "index": 12, "tag": 16}, "prompt_sha1": "8e100e69a92b8becdb3490d373d418909bf21858", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=1000 nF and is stepped to 3.3 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=3.3(1-e^-1)=2.085998 V; τ=0.022 s and t=0.022 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 1.0000000000000002e-06, "multiple": 1, "vin": 3.3, "vc": 2.08599784413424}, "prompt_sha1": "3e19ce3f00939fd6d3ae02a25e17f7ed4fffb2c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_1351` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_1351 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_1351", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "a199f98cee860aafa7758b080d9bebe214acc3ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w4_signed` comparing two 4-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w4_signed (\n input logic signed [3:0] a,\n input logic signed [3:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w4_signed", "width": 4, "signed": true}, "prompt_sha1": "392b85f955940a739053a8177c2cbd875fb59019", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 32-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^32/2^14 = 2^18 = 262144 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 32, "page_exp": 14, "entries": 262144}, "prompt_sha1": "631e1bdd422f8494fc901c7c4e0a7faedb94b6b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5833(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5833(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5833([1, 2]) == 1.5\nassert mean_5833([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5833"}, "prompt_sha1": "89a0cdb558fb89838ebe0bf3374228eb55d1b182", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^24 V = 7.45058059692e-08 V = 0.074506 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 1.25, "step": 7.450580596923828e-08}, "prompt_sha1": "4351097d3b960e3343575f4a2c92609a00ff095a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 29 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 29-12 = 17.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 29, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 17}, "prompt_sha1": "54071cc2bb768db1b5061413c4908fc2d0bc90ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_8260` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_8260 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_8260"}, "prompt_sha1": "ff22a1476880f08d39d11f498cd415e541cf8ea8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 10 Hz satisfies it.", "output": "Nyquist minimum is 2×10 = 20 Hz. Proposed rate 10 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10, "min_fs": 20, "proposed": 10}, "prompt_sha1": "b844399443a1ff817212480e12b9e103a6e19b08", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_1473` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_1473 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_1473", "width": 10}, "prompt_sha1": "65c3d4097f470fb07949303d3a92a9267b3680b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 9 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 48 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+2 = 12. Total bits = 48×12 = 576. Time = 576/57600 = 0.01 s = 10.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 9, "parity": 0, "stop": 2, "frames": 48, "seconds": 0.01}, "prompt_sha1": "b0a02183e36f7ee40801ee94ad945fc7d59e4e39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 85%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.020×(20+0.150×40) = 1.320000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.98, "l2": 20, "l2_hit": 0.85, "mem": 40, "amat": 1.3200000000000005}, "prompt_sha1": "8dc636692bdba19a1c1831af7c1c0b4527a15432", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_6_msb` for `6-bit in`. The highest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_6_msb (\n input logic [5:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 6; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_6_msb", "width": 6, "priority": "high"}, "prompt_sha1": "038b3a0e3c5ae77c871f7b565243fdc76c0557fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 95%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.060×(3+0.050×200) = 1.280000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.94, "l2": 3, "l2_hit": 0.95, "mem": 200, "amat": 1.2800000000000011}, "prompt_sha1": "f276716fe901ffde597ee8e333363c1b9a735dfb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1101 using generator polynomial bits 1001. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 9, "msg_bits": 4, "msg": 13, "remainder": 4}, "prompt_sha1": "15db2633797c5151469ab4cd690cdb694425509c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w44_nocin` implementing a 44-bit unsigned adder with inputs `a`, `b` and outputs `44-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w44_nocin (\n input logic [43:0] a,\n input logic [43:0] b,\n output logic [43:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w44_nocin", "width": 44, "cin": false}, "prompt_sha1": "d30d992bad75e500a0c80aeab931d5f678207a99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 2382 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×2382/(24×10^6) = 0.01985 = 1.985000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 200, "cycles": 2382, "load": 0.01985}, "prompt_sha1": "e37f53811a1a3bf52e5353ce4586737ec3bcc073", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 97%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.030×(3+0.030×200) = 1.470000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.97, "l2": 3, "l2_hit": 0.97, "mem": 200, "amat": 1.4700000000000004}, "prompt_sha1": "1bd1d0691cec75e300406a211a0ddd8167963c66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=180000 ohm and C=2200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=180000×2200×10^-12 s = 0.000396 s.\nf_c=1/(2πRC)=1/(2π×180000×2200×10^-12) = 401.9064 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 180000, "c_f": 2.2e-09, "tau": 0.000396, "fc": 401.90642194923066}, "prompt_sha1": "485c0cdc02b7df64d5f4ea22dd5b2bd24156d3f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.99. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.99) + 0.99/8) = 7.476636.\nThe theoretical speedup is about 7.477×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.99, "n": 8, "result": 7.4766355140186915}, "prompt_sha1": "81285169305a6dc269e8e8f2899cf96a7ada472d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_71` for a synchronous sampled input `noisy`. Update output `clean` only after observing 71 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_71 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 70) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_71", "stable_samples": 71}, "prompt_sha1": "68580952293a121be90066f7093f698104013152", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_49_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 49 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_49_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd49;\n end else begin\n if (pulse_in)\n count <= 6'd49;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_49_retrig", "cycles": 49, "retrigger": true}, "prompt_sha1": "fc62ab5e49ceea1485b29012bd648cbbd5f6aad7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 3 on a 4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×3/(4×10^9) = 0.0015 s = 1.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 3.0, "ghz": 4.0, "sec": 0.0015}, "prompt_sha1": "c7117ba761a8f26818ee4b432393b474ef9c0775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_3` for a synchronous sampled input `noisy`. Update output `clean` only after observing 3 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_3 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [1:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 2) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_3", "stable_samples": 3}, "prompt_sha1": "c62393cadd8105eb99b5495dce2a6adefa8f0c1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x24_write_bypass` with 64 entries of 24 bits. Inputs: `clk`, `we`, `6-bit waddr`, `24-bit wdata`, `6-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x24_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [23:0] wdata,\n input logic [5:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x24_write_bypass", "entries": 64, "width": 24, "mode": "write_bypass"}, "prompt_sha1": "327feb36247c7f86674cc76a34fdd0b81b41d497", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 46716 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 46716/10000 s; frequency = 10000/46716 = 0.214059 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 46716, "hz": 0.21405942289579588}, "prompt_sha1": "4d7f7cc104e86d699fce1bede2d688669fde4ca7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1492 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-40-60 = 1392 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 40, "tcphdr": 60, "mss": 1392}, "prompt_sha1": "51b5d167d1e8a0c5a2b7d7c57ea19f12ee0f71ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_28_53_19` with RED, GREEN, YELLOW states. Hold RED for 28 clock cycles, GREEN for 53, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_28_53_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 27) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 52) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_28_53_19", "red": 28, "green": 53, "yellow": 19}, "prompt_sha1": "e350a48ea5c2b1008cb783df0209bdba84b1637a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 16-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/16 = 8192.\nOffset bits = log2(16) = 4.\nIndex bits = log2(8192) = 13.\nTag bits = 24-13-4 = 7.\nCheck: 7+13+4 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 16, "addr_bits": 24, "lines": 8192, "offset_bits": 4, "index_bits": 13, "tag_bits": 7}, "prompt_sha1": "a5ccd4c40a813003c6e3ef3b0a26a0020175c8d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 3625 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×3625/(72×10^6) = 0.0503472222 = 5.034722%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 1000, "cycles": 3625, "load": 0.050347222222222224}, "prompt_sha1": "138b664222d742ea18875903d0490eca8b503314", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1024 bytes over a datapath transferring 1 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×160×10^6 = 160000000 B/s. Time = 1024/160000000 = 6.4e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1024, "width": 1, "rate_mhz": 160, "sec": 6.4e-06}, "prompt_sha1": "0b025bb12204b3ee4dba4b8607668a9bf5f1981a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 300/1000 = 6e+07 bits = 7.5e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 300, "bits": 60000000.0, "bytes": 7500000.0}, "prompt_sha1": "520c6829299241d9615033a5e26df623afc91bee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 93.9% hit rate, and a 130 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.939 = 0.061.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.061×130 ns = 9.9300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.939, "penalty": 130, "result": 9.930000000000007}, "prompt_sha1": "e8b88da3e7da2d2ab7f08147343294fc20e23a58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1450 bytes, IP header 20 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-20-20 = 1410 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 20, "tcphdr": 20, "mss": 1410}, "prompt_sha1": "62bdbc773ab96892d38b1d03873f7885c54e7a58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 16. Using occupancy formula `(head-tail) mod capacity`, with head index 12 and tail index 10, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (12-10) mod 16 = 2. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 16 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 16, "head": 12, "tail": 10, "occupancy": 2}, "prompt_sha1": "0c87b8ddba898f055d599e83cc29dea36f02fb65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 4 on a 4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×4/(4×10^9) = 0.2 s = 200.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 4.0, "ghz": 4.0, "sec": 0.2}, "prompt_sha1": "caf8e5d4bfb2f786bf519953987891ec87311357", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.25 ns hit time, 89.7% hit rate, and a 105 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.897 = 0.103.\nAMAT = hit time + miss rate × miss penalty\n= 1.25 ns + 0.103×105 ns = 12.0650 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.25, "hit_rate": 0.897, "penalty": 105, "result": 12.064999999999998}, "prompt_sha1": "ab2cd82d47a919d6a9900cf30735051d8dc11658", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `count` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n result += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `words[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n result += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "f00467e7a4e8f04875e6b532dd3779ae2245bca3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 494, and period is 27497 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(494×27497) = 1.766847 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 494, "period": 27497, "hz": 1.7668471451946395}, "prompt_sha1": "979d27bd8bef893ac43ec9015bcf9046679b1478", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 10 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 10/2^6 V = 0.15625 V = 156250.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 10.0, "step": 0.15625}, "prompt_sha1": "fdc62c963c4b23bb43f95de052128336e89ce03a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.8.131.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.8.131.0\nBroadcast address: 10.8.131.7\nUsable host range: 10.8.131.1 to 10.8.131.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.8.131.0/29", "usable": 6, "first": "10.8.131.1", "last": "10.8.131.6", "broadcast": "10.8.131.7"}, "prompt_sha1": "cc1af4dbffe52c9cca583f425857ee571d5a7283", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 45-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^45/2^10 = 2^35 = 34359738368 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 45, "page_exp": 10, "entries": 34359738368}, "prompt_sha1": "18914e6db0a91a573babe769fa7ec77fe715b509", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 19.3 V source drives a 470 ohm resistor in series with an LED whose forward voltage is assumed to be 2.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 19.3-2.1 = 17.2 V.\nI = V/R = 17.2/470 A = 36.5957 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 19.3, "vf": 2.1, "r": 470, "current_a": 0.03659574468085106}, "prompt_sha1": "936455e691c3d4f437e48023852b2abaa897d51d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_50_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 50 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_50_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd50;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_50_ignore", "cycles": 50, "retrigger": false}, "prompt_sha1": "749d95399916de618e15ea634ac486ef99bef3f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x11091D32, clear bit 15 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 15)`. Result = 0x11091D32.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 285809970, "bit": 15, "op": "clear", "result": 285809970}, "prompt_sha1": "8c268f8d869c6dbee54ab09611045157df273f44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w26_nocin` implementing a 26-bit unsigned adder with inputs `a`, `b` and outputs `26-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w26_nocin (\n input logic [25:0] a,\n input logic [25:0] b,\n output logic [25:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w26_nocin", "width": 26, "cin": false}, "prompt_sha1": "877bd1fd203c38c843944dbc80c1a716ae6b43d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 4.2 V source drives a 1500 ohm resistor in series with an LED whose forward voltage is assumed to be 3.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 4.2-3.2 = 1 V.\nI = V/R = 1/1500 A = 0.6667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 4.2, "vf": 3.2, "r": 1500, "current_a": 0.0006666666666666666}, "prompt_sha1": "7d9e7d6388558c86a9fad7c21d736b6b37264236", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_2512` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_2512 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_2512", "width": 8}, "prompt_sha1": "3cceb3375e7b290d6dbd3a160c041a698517bc3c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 65 and initial occupancy is 56. In an abstract batch, producer attempts to enqueue 63 items first, dropping any excess beyond capacity; then consumer removes up to 133 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=65, dropped=54; consumed=65; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 65, "start": 56, "prod": 63, "cons": 133, "dropped": 54, "consumed": 65, "final": 0}, "prompt_sha1": "3389470d1fa3dd1b7c246d549bfb82f13a98ccd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 150 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 150 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 150.0}, "prompt_sha1": "6d3fad972932b7c9f478acfedec8fe7d947536b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 16 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×20×10^6 = 320000000 B/s. Time = 8192/320000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 16, "rate_mhz": 20, "sec": 2.56e-05}, "prompt_sha1": "ae3ab1552f90dec260845c98cb310354842eceaf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 96 and initial occupancy is 7. In an abstract batch, producer attempts to enqueue 141 items first, dropping any excess beyond capacity; then consumer removes up to 155 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=96, dropped=52; consumed=96; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 96, "start": 7, "prod": 141, "cons": 155, "dropped": 52, "consumed": 96, "final": 0}, "prompt_sha1": "8226c67e97a2ee1922609689529575b2bbd74936", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65488; x = x + 409;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65488+409 = 65897. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65897) mod 2^16 = 361. So `x` stores 361. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65488, "add": 409, "result": 361}, "prompt_sha1": "92ae01a2c282032a0722496d79e9a05dc2a1a87a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 110001011010001101010 using generator polynomial bits 1111101. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 011110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 125, "msg_bits": 21, "msg": 1619050, "remainder": 30}, "prompt_sha1": "12d288198fbcab3bd242811df4bd2c6ff955de16", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 40-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^40/2^20 = 2^20 = 1048576 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 40, "page_exp": 20, "entries": 1048576}, "prompt_sha1": "c3f12332cf4aafa4335566e79da90fd76c1fb062", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 5 and tail index 4, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (5-4) mod 8 = 1. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 5, "tail": 4, "occupancy": 1}, "prompt_sha1": "643f2bab7403d3a81dbab1b728085b54a81332d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×56000)/(100+56000) = 99.821747 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 56000, "req": 99.82174688057042}, "prompt_sha1": "9c06f7ca9d68386886d93012d86baeb55dcece80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 1` on one shared integer without synchronization. Assume `requests` initially equals 210. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 210; T2 reads 210; both compute 211; T1 writes 211; T2 writes 211. The observed final value is 211, but two serial increments would produce 212.\n\n```\nlock(mutex)\nrequests = requests + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "e87160b3e5ff85b74c58734c8d9b6dcfbf2a394e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=100 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/47 = -2.127660.\nVout = A_v×Vin = -2.127660×0.1 = -0.212766 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 100, "vin": 0.1, "gain": -2.127659574468085, "vout": -0.2127659574468085}, "prompt_sha1": "398a4dbc394989520ea49c62e4b2d48c08b9ae6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 48 payload bytes plus 16 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 48/(48+16) = 0.750000 = 75.00%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 48, "overhead": 16, "efficiency": 0.75}, "prompt_sha1": "6187f05eb7cbbcf95ed93774949b60a99a0665e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_3377` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_3377 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_3377", "width": 24}, "prompt_sha1": "d8231a7b190cd176dafac31c961631fd38ab818a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 10732 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 10732/5000000 s; frequency = 5000000/10732 = 465.896385 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 10732, "hz": 465.89638464405516}, "prompt_sha1": "4c13f342d4fc08760e832046c294f214ceb03f37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_7263` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_7263 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_7263", "width": 16}, "prompt_sha1": "09b847cae280c4612386c9d0180366fcf174b112", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 80%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.010×(12+0.200×50) = 1.720000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.99, "l2": 12, "l2_hit": 0.8, "mem": 50, "amat": 1.7200000000000002}, "prompt_sha1": "0605a93db5e2c106d0c255450a7dec403390249b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=2.2 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/4.7 = -0.468085.\nVout = A_v×Vin = -0.468085×0.5 = -0.234043 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 2.2, "vin": 0.5, "gain": -0.46808510638297873, "vout": -0.23404255319148937}, "prompt_sha1": "c8b1a4c0375bb626805372b3f81ef593b3a2b2e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 8000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×8000×10^6×8 = 4096.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 8000, "channels": 8, "gbps": 4096.0}, "prompt_sha1": "26bd11d7c45055077daa4f9c7f7f64fc07fc6f50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_98_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 98 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_98_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd98;\n end else begin\n if (pulse_in)\n count <= 7'd98;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_98_retrig", "cycles": 98, "retrigger": true}, "prompt_sha1": "a78aeb1fcd05ca399572e895e7cf31b56a718a11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'V', 'V', 'P', 'V', 'V', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "V", "V", "P", "V", "V", "P", "P", "V"], "value": 12, "blocked": 0}, "prompt_sha1": "376eaec0d43dca570ea087476b21b30a5d2adbfd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×100²=0.011 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 100, "energy": 0.011000000000000001}, "prompt_sha1": "e88d0a84032479c5915985c770d2c34d74c17e22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w59_signed` comparing two 59-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w59_signed (\n input logic signed [58:0] a,\n input logic signed [58:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w59_signed", "width": 59, "signed": true}, "prompt_sha1": "a324bed1bb9a10cd1d91a7ff1766bfb55d673f92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_59_msb` for `59-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_59_msb (\n input logic [58:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 59; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_59_msb", "width": 59, "priority": "high"}, "prompt_sha1": "16a4c67a0d8bbf05ace69155e424efc2f760492e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 8 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×160×10^6 = 1280000000 B/s. Time = 128/1280000000 = 1e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 8, "rate_mhz": 160, "sec": 1e-07}, "prompt_sha1": "e69dc2352dc62705193d9677476b88ddb8c3e9e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xAB. Extract the 2-bit field starting at bit 5 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xAB >> 5) & 0x3 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 2, "lsb": 5, "value": 171, "mask": 3, "field": 1}, "prompt_sha1": "044da97022581f7790f19fbba108cf5fa3e3cb93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 1×10^-3/100 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.001, "r": 100, "tau": 1e-05}, "prompt_sha1": "88d8f51408ebdc4d2013011cbf7c53907bcb2e26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 89 and tail index 47, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (89-47) mod 128 = 42. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 89, "tail": 47, "occupancy": 42}, "prompt_sha1": "070aa608a5645cfec965f719eccc22bdc1b6e66c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 39.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+20 = 59.5. Period = 59.5/16000000 = 3.71875e-06 s. Maximum rate = 1/period = 268907.563025 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 39.5, "conv_cycles": 20, "period": 3.71875e-06, "rate": 268907.56302521005}, "prompt_sha1": "09ca82ec316b03f6a4c2524a4269b60a0b247127", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000 Hz. Consecutive rising edges are 24917 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 24917/10000 s; frequency = 10000/24917 = 0.401332 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000, "delta": 24917, "hz": 0.4013324236465064}, "prompt_sha1": "782160ed0e35bc2a854d9519eacc0051e751cc0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1280 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1280/(1280+36) = 0.972644 = 97.26%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1280, "overhead": 36, "efficiency": 0.9726443768996961}, "prompt_sha1": "522855ef6951e8a6e2b26a36f432d3e369c068ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 640 payload bytes plus 32 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 640/(640+32) = 0.952381 = 95.24%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 640, "overhead": 32, "efficiency": 0.9523809523809523}, "prompt_sha1": "bb84a37da07b9516821c7681cdfd3424d37c06b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1000 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 1000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 1000}, "prompt_sha1": "a8c3bab88a61b1191d38507ef2b082fe1d342e38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×270)/(470+270) = 171.486486 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 270, "req": 171.48648648648648}, "prompt_sha1": "86bf95b04e2d4ace617336c46ca20646a2f651f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 400 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 4471 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50000×4471/(400×10^6) = 0.558875 = 55.887500%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 400, "irq_hz": 50000, "cycles": 4471, "load": 0.558875}, "prompt_sha1": "da54162ec8ff06092767ee521e8094e387dc7679", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x0C, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x0C<<1)|0 = 0x18 = 00011000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 12, "rw": 0, "byte": 24}, "prompt_sha1": "1b5f0b84d9365cac46ef7d32b544b70023dcca24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w5_signed` comparing two 5-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w5_signed (\n input logic signed [4:0] a,\n input logic signed [4:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w5_signed", "width": 5, "signed": true}, "prompt_sha1": "e19d9482f26866febdbe062788901627b15fe380", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=27000 ohm and C=180000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=27000×180000×10^-12 s = 0.00486 s.\nf_c=1/(2πRC)=1/(2π×27000×180000×10^-12) = 32.7479 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 27000, "c_f": 1.8e-07, "tau": 0.00486, "fc": 32.74793067734472}, "prompt_sha1": "5e0c24fa99536cedada02d5704f1b667a755f50f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 37-bit up/down counter `updown_37_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_37_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [36:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 37'd137438953471) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_37_sat", "width": 37, "wrap": false}, "prompt_sha1": "2700bd097986fa6d4d1eff2d1197c4b48a7ecacb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock CACHE then A; consumer acquires A then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds CACHE while waiting for A, while consumer holds A while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "bc5ef32e2be24fb11a0074a4d1863cad2b15b849", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD12038 in 3 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 38 20 D1.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 13705272, "endian": "little", "bytes": [56, 32, 209]}, "prompt_sha1": "d50f1ab21ed5385c2685c5ba55950cfbd283c572", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_16_msb` for `16-bit in`. The highest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_16_msb (\n input logic [15:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 16; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_16_msb", "width": 16, "priority": "high"}, "prompt_sha1": "68c8b2223f7fa19014f0ff018f0c4cd3147b28d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x751D17A556C5E937 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 37 E9 C5 56 A5 17 1D 75.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 8438927275655031095, "endian": "little", "bytes": [55, 233, 197, 86, 165, 23, 29, 117]}, "prompt_sha1": "cd474177cf5ff84d10b9b343f88440eeb2867c57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 25 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 25×8 = 200. Time = 200/1000000 = 0.0002 s = 0.200000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 5, "parity": 1, "stop": 1, "frames": 25, "seconds": 0.0002}, "prompt_sha1": "cdbcf0ead2f17528ee72ef89b6a13590b0a1f67e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 12-bit left-shift register module `shiftreg_left_12`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `12-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_12 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [11:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[10:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_12", "width": 12, "direction": "left"}, "prompt_sha1": "ceaa96ff5322f9797b90bf2545bb2fd310ccd19b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=47 nF and is stepped to 1 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1(1-e^-2)=0.864665 V; τ=4.7e-05 s and t=9.4e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7000000000000004e-08, "multiple": 2, "vin": 1, "vc": 0.8646647167633873}, "prompt_sha1": "890c3be77a98152c1b226ee64f7d0ef02f62d20f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 200 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 200×10^6×0.5/1000/8 = 12500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "rtt_ms": 0.5, "bytes": 12500.0}, "prompt_sha1": "eb9ee6a45a1f2c7e314dc2f6454fc3941c41d2d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-28 = 1372 bytes.\nRound down to an 8-byte multiple: floor((1372)/8)×8 = 1368 bytes.\nFragments required = ceil(8000/1368) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 28, "payload": 8000, "max_payload": 1368, "fragments": 6}, "prompt_sha1": "6fb12e6ca85bea818902a7f5eb1aa7969c57a47b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1500 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-40-52 = 1408 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 40, "tcphdr": 52, "mss": 1408}, "prompt_sha1": "a7cb6b43150070fd55155dc0b6c3240fe4be25a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×64 KiB = 512 KiB = 524288 bytes = 0.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 64, "reach": 524288}, "prompt_sha1": "7f163338362f103cc27da1383eb2fe73e0f4f9e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_73_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 73 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_73_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd73;\n end else begin\n if (pulse_in)\n count <= 7'd73;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_73_retrig", "cycles": 73, "retrigger": true}, "prompt_sha1": "1654596d78d7be8e71be1bc99b5695771eb55c60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/22 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 22, "tau": 1e-05}, "prompt_sha1": "604bee40fafc2e90457162c332a88b37d1289b4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 5%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.050 × 2 = 0.015000.\nEffective CPI = 1 + 0.015000 = 1.015000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.05, "penalty": 2, "result": 1.015}, "prompt_sha1": "d8d13fbbd16e0b240e45287d171f8ad2cbc1034c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w16_signed` comparing two 16-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w16_signed (\n input logic signed [15:0] a,\n input logic signed [15:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w16_signed", "width": 16, "signed": true}, "prompt_sha1": "4b13a53020a82c92c079850f1a9b38ca870aa6ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock TX then IO; T2 acquires IO then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds TX while waiting for IO, while T2 holds IO while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "46fabd3b8735dcc4fbd313fc7b7385c2c747d2f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.5 ns hit time, 98.5% hit rate, and a 80 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.985 = 0.015.\nAMAT = hit time + miss rate × miss penalty\n= 1.5 ns + 0.015×80 ns = 2.7000 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.5, "hit_rate": 0.985, "penalty": 80, "result": 2.700000000000001}, "prompt_sha1": "a4a99cc35c84b536d3c63f7028eb8510235de601", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [29, 26, 4, 30, 1]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [88, 82, 16, 90, 5].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [29, 26, 4, 30, 1], "finish": [88, 82, 16, 90, 5]}, "prompt_sha1": "230616f07635c2a127c3011d02ddba5385039d48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 261. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 261/1023 × 3 V = 0.765396 V.\nThus the estimated input is about 0.7654 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 261, "volts": 0.7653958944281525}, "prompt_sha1": "3f01035e822acdfe2934a27a0e29cf5645569266", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_37` for a 37-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_37 (\n input logic [36:0] data,\n input logic [5:0] shamt,\n output logic [36:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_37", "width": 37, "direction": "right", "arithmetic": false}, "prompt_sha1": "6008ec880b93adc2350b2810e7c3f12e54b0a461", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×200/1000/8 = 2500000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 200, "bytes": 2500000000.0}, "prompt_sha1": "340e701af44dffef7fec6b469380e45a82013910", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6536 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6536/(6536+40+8) = 0.992710 = 99.27%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6536, "iphdr": 40, "eff": 0.9927095990279465}, "prompt_sha1": "fee951cdc5f969d8e8c2c830ee54fa3f5f841ec3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 2.5 cycles and conversion consumes 24 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+24 = 26.5. Period = 26.5/40000000 = 6.625e-07 s. Maximum rate = 1/period = 1509433.962264 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 2.5, "conv_cycles": 24, "period": 6.625e-07, "rate": 1509433.9622641508}, "prompt_sha1": "51ee6dfb10e882a46631cfb66d252c0dff9cf374", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_7` for a 7-bit signed input `data`, `3-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_7 (\n input logic signed [6:0] data,\n input logic [2:0] shamt,\n output logic signed [6:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_7", "width": 7, "direction": "right", "arithmetic": true}, "prompt_sha1": "5c228f00259b4b2cd1c35c54d0f56a64ac3add65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_9214` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_9214 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_9214"}, "prompt_sha1": "9466ce158d5db149c7998755be74b74a8c5c6caa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.5 ns hit time, 97.1% hit rate, and a 120 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.971 = 0.029.\nAMAT = hit time + miss rate × miss penalty\n= 2.5 ns + 0.029×120 ns = 5.9800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.5, "hit_rate": 0.971, "penalty": 120, "result": 5.980000000000003}, "prompt_sha1": "058f4d42eece52111a0c05c7572af2e07b8bebf5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×20/1000/8 = 25000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 20, "bytes": 25000000.0}, "prompt_sha1": "0765191a4caff83752907b10860d963b4714c1e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 256 = 0.281250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 256, "spi_hz": 281250.0}, "prompt_sha1": "c70ac5799b586cd149d0347d62eb054abcd9489d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=50 ms, C=2 ms,T=200 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/50 + 2/200 + 4/20 = 0.230000 = 23.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 50], [2, 200], [4, 20]], "utilization": 0.23}, "prompt_sha1": "1201863fa7685728650acc2d413f679f893e85e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 50-bit right-shift register module `shiftreg_right_50`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `50-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_50 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [49:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[49:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_50", "width": 50, "direction": "right"}, "prompt_sha1": "d778c34e9534f71fdc1f68f69368116d7194d215", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 681 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×681/(120×10^6) = 0.1135 = 11.350000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 20000, "cycles": 681, "load": 0.1135}, "prompt_sha1": "c8170535d7c83da0af5700ae6610bd8f73355912", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 527, and period is 49532 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(527×49532) = 0.459711 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 527, "period": 49532, "hz": 0.45971086332014527}, "prompt_sha1": "0fe261dadcc029f9162cc173e88d867a81ce42a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 32-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/32 = 4096.\nOffset bits = log2(32) = 5.\nIndex bits = log2(4096) = 12.\nTag bits = 32-12-5 = 15.\nCheck: 15+12+5 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 32, "addr_bits": 32, "lines": 4096, "offset_bits": 5, "index_bits": 12, "tag_bits": 15}, "prompt_sha1": "dab1177eee63a719ab5411a26e9ee1e84d159f70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 100 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×100×10^6×3 = 0.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 100, "channels": 3, "gbps": 0.6}, "prompt_sha1": "8adb5c3ecdfa458e43945fd3d1602be14ef30fd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(40×10^6) s = 0.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 8, "time_us": 0.19999999999999998}, "prompt_sha1": "463665ccfe654c02fb4624a09fc49c72b9308ddd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 24-bit right-shift register module `shiftreg_right_24`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `24-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_24 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [23:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[23:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_24", "width": 24, "direction": "right"}, "prompt_sha1": "4ab7924e329a0473b7c203f4fbc0b000b69b554b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 220 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 220 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 220.00000000000003}, "prompt_sha1": "5dfc3144bf37a2f0cb380725ca79516f41a52413", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 6-bit left-shift register module `shiftreg_left_6`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `6-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_6 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [5:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[4:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_6", "width": 6, "direction": "left"}, "prompt_sha1": "3adc59435ce4c4caef8147f20deaed4bda8de42f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xE58CA012. Extract the 3-bit field starting at bit 25 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0xE58CA012 >> 25) & 0x7 = 0x2 (2).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 25, "value": 3851198482, "mask": 7, "field": 2}, "prompt_sha1": "f7a9ec6ee501a697ec73cfcf44e1bbcc9ad5f5c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w16_unsigned` comparing two 16-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w16_unsigned (\n input logic [15:0] a,\n input logic [15:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w16_unsigned", "width": 16, "signed": false}, "prompt_sha1": "dee49804b9055f2e98dbd39d6a703c15f7bb6bc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_9_37_8` with RED, GREEN, YELLOW states. Hold RED for 9 clock cycles, GREEN for 37, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_9_37_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 8) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 36) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_9_37_8", "red": 9, "green": 37, "yellow": 8}, "prompt_sha1": "a0b672f062af4a6627419d75a40b7b48bbe2a260", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 480. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 480/4095 × 3.3 V = 0.386813 V.\nThus the estimated input is about 0.3868 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 480, "volts": 0.38681318681318677}, "prompt_sha1": "ebcd28522b3e959233291ca2792c22f6e8729a12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 2` on one shared integer without synchronization. Assume `counter` initially equals 486. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 486; T2 reads 486; both compute 488; T1 writes 488; T2 writes 488. The observed final value is 488, but two serial increments would produce 490.\n\n```\nlock(mutex)\ncounter = counter + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "56f5e6a535d0c59a7072dd02d80f30d5560c542d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22×1200)/(22+1200) = 21.603928 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22, "r2": 1200, "req": 21.60392798690671}, "prompt_sha1": "20bd624db141e0fccd8c71e1086809782e26f7b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 36-bit left-shift register module `shiftreg_left_36`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `36-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_36 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [35:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[34:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_36", "width": 36, "direction": "left"}, "prompt_sha1": "4ad7f7abf6afbd425b71153191e8214a21c23ed7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 8 = 0.180000.\nEffective CPI = 1.2 + 0.180000 = 1.380000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.15, "penalty": 8, "result": 1.38}, "prompt_sha1": "42f90931a8467b9cd4a1a0bcc6ca6ed98cfab6a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NNNTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 0, 0, 1, 0, 1, 1], "final_state": 2}, "prompt_sha1": "3408cf4286632004dd2136abb2ca7ed9c4369d89", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=8200 ohm and C=47000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=8200×47000×10^-12 s = 0.0003854 s.\nf_c=1/(2πRC)=1/(2π×8200×47000×10^-12) = 412.9604 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 8200, "c_f": 4.7e-08, "tau": 0.0003854, "fc": 412.96041279682237}, "prompt_sha1": "4f32d7b218d1582b4958b9e6c3ca65b4c953d606", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `n` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n acc += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `table[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n acc += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "c6b076b0574899fbead8491d7eefca6c46b4dcf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 64-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/64 = 512.\nOffset bits = log2(64) = 6.\nIndex bits = log2(512) = 9.\nTag bits = 32-9-6 = 17.\nCheck: 17+9+6 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 64, "addr_bits": 32, "lines": 512, "offset_bits": 6, "index_bits": 9, "tag_bits": 17}, "prompt_sha1": "a2d9b1701f07ae15afce069489f3a50ef331f241", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 25-bit right-shift register module `shiftreg_right_25`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `25-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_25 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [24:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[24:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_25", "width": 25, "direction": "right"}, "prompt_sha1": "c6ba33cff81c3dcf55c53e274e3a3e0b886dc932", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×0.1/1000/8 = 1250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 0.1, "bytes": 1250000.0}, "prompt_sha1": "03a53b9e148483f8327be7e3e83e35b1a372bda7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×500000 = 1000000 Hz. Proposed rate 2e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500000, "min_fs": 1000000, "proposed": 2000000}, "prompt_sha1": "8bb7f1e23a203009c4d6bfe21d14dc3e33d70f11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 127 and initial occupancy is 44. In an abstract batch, producer attempts to enqueue 144 items first, dropping any excess beyond capacity; then consumer removes up to 141 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=127, dropped=61; consumed=127; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 127, "start": 44, "prod": 144, "cons": 141, "dropped": 61, "consumed": 127, "final": 0}, "prompt_sha1": "601a5123c582b05ed07fd21edc83d6f4a2c5e4fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 5600 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×5600)/(4700+5600) = 2555.339806 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 5600, "req": 2555.339805825243}, "prompt_sha1": "6092fd59b8d4b6d5df3bc9dc33eb3f322e0c5a2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 10. Apply operations ['P', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'V', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 10 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 10, "ops": ["P", "V", "V", "P", "P", "V", "P", "P", "P", "V", "P", "V", "P", "V", "V", "P", "V", "P", "V", "V"], "value": 10, "blocked": 0}, "prompt_sha1": "dd34c41f54a36751a3fb4b04814e3389dc5f4b9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 46 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 46-21 = 25.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 46, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 25}, "prompt_sha1": "b3ffe4b185bbda1ea2139c02fd5fa0df8942b41a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3570(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3570(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3570([1, 2]) == 1.5\nassert mean_3570([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3570"}, "prompt_sha1": "ba2ae3364afd7c1c759c0aecceef46bb1b702cff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551515; x = x + 542;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551515+542 = 18446744073709552057. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552057) mod 2^64 = 441. So `x` stores 441. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551515, "add": 542, "result": 441}, "prompt_sha1": "9275187b0f5986931dde6740ad3e98ea8a925ca3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 45 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 45×8 = 360. Time = 360/460800 = 0.00078125 s = 0.781250 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 5, "parity": 1, "stop": 1, "frames": 45, "seconds": 0.00078125}, "prompt_sha1": "021e1552d69ba2895b3c93e0068d4b7d74dce17c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 19172 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 19172/5000000 s; frequency = 5000000/19172 = 260.796996 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 19172, "hz": 260.7969956186105}, "prompt_sha1": "cee3b4ef434928546fc3b4e277bc03151e94a5f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/470 = 0.000212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 470, "tau": 0.00021276595744680854}, "prompt_sha1": "a4e2bed440a55fdbe4fe0c8c1fc417355bb3ac9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 13739 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 13739/1000000 s; frequency = 1000000/13739 = 72.785501 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 13739, "hz": 72.78550112817527}, "prompt_sha1": "7b67d2095a478af7e4ae9986d4ceb1f907777a2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (128×8) = 195312.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 128, "pps": 195312.5}, "prompt_sha1": "64c7137dd1d432a0f504bf5596f1f26c979280b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.73.80.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.73.80.0\nBroadcast address: 10.73.80.255\nUsable host range: 10.73.80.1 to 10.73.80.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.73.80.0/24", "usable": 254, "first": "10.73.80.1", "last": "10.73.80.254", "broadcast": "10.73.80.255"}, "prompt_sha1": "cb94168ea1e44d88b0202f221e28a2dbd179a8de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=1 ms,T=20 ms, C=1 ms,T=20 ms, C=1 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 1/20 + 1/20 + 1/50 = 0.320000 = 32.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [1, 20], [1, 20], [1, 50]], "utilization": 0.32}, "prompt_sha1": "726e5c4821bba10ebfc9ba9e65849b5a218494a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (768×8) = 16276041.666667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 768, "pps": 16276041.666666666}, "prompt_sha1": "ab56b2e30a4a7d20168a37fc085289147fee7568", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8728` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8728 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8728"}, "prompt_sha1": "b36e5fa9f40df706b2fbe0a2cc10269f92a7e298", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(6000/968) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 6000, "max_payload": 968, "fragments": 7}, "prompt_sha1": "2ffdf08df039c7fcefe2950de9d02b81875c6787", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=2.2 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/100 = -0.022000.\nVout = A_v×Vin = -0.022000×0.5 = -0.011000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 2.2, "vin": 0.5, "gain": -0.022000000000000002, "vout": -0.011000000000000001}, "prompt_sha1": "1f1eb99c1bedb808a22e327f6de13fc8260e941d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 31-bit left-shift register module `shiftreg_left_31`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `31-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_31 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [30:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[29:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_31", "width": 31, "direction": "left"}, "prompt_sha1": "1df8c87874897165fa96f4cfd9dd501a06e3391a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.8 V source drives a 3300 ohm resistor in series with an LED whose forward voltage is assumed to be 2.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.8-2.8 = 13 V.\nI = V/R = 13/3300 A = 3.9394 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.8, "vf": 2.8, "r": 3300, "current_a": 0.00393939393939394}, "prompt_sha1": "6c8a6e5d1e0f6670ee026e40183e95ace6d59075", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 22-bit right-shift register module `shiftreg_right_22`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `22-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_22 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [21:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[21:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_22", "width": 22, "direction": "right"}, "prompt_sha1": "4fda9a1a7a8fadd79c54f201860832ac0012d838", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [30, 29, 8, 11]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [74, 78, 33, 49].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [30, 29, 8, 11], "finish": [74, 78, 33, 49]}, "prompt_sha1": "f2acdaf628e934f7110a53f846d29253e9087412", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 20 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 20 = 23.\nClock pulses = 23×9 = 207.\nTime = 207/100000 s = 2070.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 20, "clocks": 207, "time_s": 0.00207}, "prompt_sha1": "5c3d8fcdbd4cf8d607ef1a7e32a462943ce0791a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 4800 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×4800×10^6×6 = 172.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 4800, "channels": 6, "gbps": 172.8}, "prompt_sha1": "711997793ba19644a310cb0cf31d3bb2e31860c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_216` generating a one-clock-cycle `tick` every 216 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_216 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 215) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_216", "divide": 216}, "prompt_sha1": "a86a5d522a45113e8aceacab94d308d3726e790e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 40000 Hz satisfies it.", "output": "Nyquist minimum is 2×20000 = 40000 Hz. Proposed rate 40000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20000, "min_fs": 40000, "proposed": 40000}, "prompt_sha1": "d89e338001cfd1dd43f2b43cb557414e42deb5ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/4700=0.00510638298 A. P=V²/R=24²/4700=0.122553191 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 4700, "i": 0.005106382978723404, "p": 0.1225531914893617}, "prompt_sha1": "1d42e5158dda6a2ca2b494ac2fb2f4cb5e93f229", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 113 and initial occupancy is 82. In an abstract batch, producer attempts to enqueue 59 items first, dropping any excess beyond capacity; then consumer removes up to 174 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=113, dropped=28; consumed=113; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 113, "start": 82, "prod": 59, "cons": 174, "dropped": 28, "consumed": 113, "final": 0}, "prompt_sha1": "4167eb9d7d2708e0877b7eae587330cdf3819294", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 640.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+8 = 648.5. Period = 648.5/2000000 = 0.00032425 s. Maximum rate = 1/period = 3084.040093 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 640.5, "conv_cycles": 8, "period": 0.00032425, "rate": 3084.040092521203}, "prompt_sha1": "02986250a5ea4d647cda0fb2c7d61217fdbfcd97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock B then L1; T2 acquires L1 then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds B while waiting for L1, while T2 holds L1 while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before L1. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "8a0ed20da24cfaa40f61cf48fc9ec42fcee4a147", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `items` elements of type `double`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n acc += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `buf[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n acc += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "1a027e93d7a87ccda928691a9d06b6d6232b993a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 40 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "48179d1ade3fdfdd3c7d6b40ff4456086b6d64e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_1646` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_1646 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_1646", "width": 32}, "prompt_sha1": "6b218217780d39d7890a18e5fc0b62cd3f6d8dd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (1024×8) = 4882812.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 1024, "pps": 4882812.5}, "prompt_sha1": "04b4c59a6bb6411c255740bf54eb6c5096b5c5e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(1×10^6) s = 256.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 256, "time_us": 256.0}, "prompt_sha1": "a9f24b6cca5490e461717724af0baf76c10f0106", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_4194` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_4194 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_4194"}, "prompt_sha1": "61d95d88ea9dabc22d7872ec42bdaea1f7b77021", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 3.3 V reference and returns code 772. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 772/4095 × 3.3 V = 0.622125 V.\nThus the estimated input is about 0.6221 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 3.3, "code": 772, "volts": 0.622124542124542}, "prompt_sha1": "7002403f8b1c02a6fc03aa81c391fa20c2c596a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 48174. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 48174/65535 × 5 V = 3.675441 V.\nThus the estimated input is about 3.6754 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 48174, "volts": 3.6754406042572674}, "prompt_sha1": "aa27a0634906f0c1d1344f0a871c84be44fa9370", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 14-bit left-shift register module `shiftreg_left_14`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `14-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_14 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [13:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[12:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_14", "width": 14, "direction": "left"}, "prompt_sha1": "696e718237d18b0868ea1c86e24d5c413832238a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 56 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 56-18 = 38.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 56, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 38}, "prompt_sha1": "d5b55ee798aade1994c823287437db269dc3d15d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=47000 ohm and C=1200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=47000×1200×10^-12 s = 5.64e-05 s.\nf_c=1/(2πRC)=1/(2π×47000×1200×10^-12) = 2821.8962 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 47000, "c_f": 1.2e-09, "tau": 5.64e-05, "fc": 2821.8961541116196}, "prompt_sha1": "2982ee8a9d773f12b6fcb460951a823124274cce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3752787061, carries 26740 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 26740+1+0 = 26741. ACK = (3752787061+26741) mod 2^32 = 3752813802.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3752787061, "payload": 26740, "syn": 1, "fin": 0, "ack": 3752813802}, "prompt_sha1": "9e24b5dd3c62b5a02ab17c494ea210c48a78165c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×2048 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 2048, "reach": 134217728}, "prompt_sha1": "126520e5824dc1828248f99a23c255bcf85e8273", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 2-way set-associative cache uses 16-byte lines and 52-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/16 = 4096.\nSets = 4096/2 = 2048.\nOffset bits = log2(16) = 4; index bits = log2(2048) = 11; tag bits = 52-4-11 = 37.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 16, "ways": 2, "addr_bits": 52, "lines": 4096, "sets": 2048, "offset": 4, "index": 11, "tag": 37}, "prompt_sha1": "df0270b3d0cb1cb5cfc395342afd0811f8e6469a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_7961` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_7961 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_7961", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "7b52089aec591770b7630e77bd632686b6e36a78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 4 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×50×10^6 = 200000000 B/s. Time = 16384/200000000 = 8.192e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 4, "rate_mhz": 50, "sec": 8.192e-05}, "prompt_sha1": "91ac8ee7170af9a9de3c1127d75f7a66c3f9681f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 256-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/256 = 512.\nOffset bits = log2(256) = 8.\nIndex bits = log2(512) = 9.\nTag bits = 40-9-8 = 23.\nCheck: 23+9+8 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 256, "addr_bits": 40, "lines": 512, "offset_bits": 8, "index_bits": 9, "tag_bits": 23}, "prompt_sha1": "2f04b5baf5aa8502ab09a414d5e0af6a569cf164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 3.6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3.6/2^11 V = 0.0017578125 V = 1757.812500 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 3.6, "step": 0.0017578125}, "prompt_sha1": "3b9e3595acec392296f43e64f56e2af9b3e3bd7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 64-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/64 = 16.\nOffset bits = log2(64) = 6.\nIndex bits = log2(16) = 4.\nTag bits = 36-4-6 = 26.\nCheck: 26+4+6 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 64, "addr_bits": 36, "lines": 16, "offset_bits": 6, "index_bits": 4, "tag_bits": 26}, "prompt_sha1": "8a6cdc3cd6f5fab91e3188a23525bda5dc64a29c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 9 and tail index 20, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (9-20) mod 32 = 21. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 9, "tail": 20, "occupancy": 21}, "prompt_sha1": "7d1a39859824835bc9b8789ed6e06d60ebcd9a19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 2-way set-associative cache uses 64-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/64 = 4096.\nSets = 4096/2 = 2048.\nOffset bits = log2(64) = 6; index bits = log2(2048) = 11; tag bits = 40-6-11 = 23.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 64, "ways": 2, "addr_bits": 40, "lines": 4096, "sets": 2048, "offset": 6, "index": 11, "tag": 23}, "prompt_sha1": "c3897e27894305e7ebab9d283d6521b8e2946ae3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xD303DCD4. Extract the 5-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xD303DCD4 >> 3) & 0x1F = 0x1A (26).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 3, "value": 3540245716, "mask": 31, "field": 26}, "prompt_sha1": "4e5061babdbf9e48050ac7bd506507a23b0fb838", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1448 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1448/(1448+20+8) = 0.981030 = 98.10%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1448, "iphdr": 20, "eff": 0.981029810298103}, "prompt_sha1": "2af60d73d9c3a4563ff4985761330bbea1cae871", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 7-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^7 V = 0.03515625 V = 35156.250000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 7, "vref": 4.5, "step": 0.03515625}, "prompt_sha1": "628c40127652e6f7f7783b6bd684621ea8edcebf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 200 Mbit/s and RTT 5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 200×10^6×5/1000/8 = 125000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "rtt_ms": 5, "bytes": 125000.0}, "prompt_sha1": "18b448745c64b9daca20159deac87bdd484e4f8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 160 MHz CPU services an interrupt at 1000 Hz. Each ISR consumes 2672 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 1000×2672/(160×10^6) = 0.0167 = 1.670000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 160, "irq_hz": 1000, "cycles": 2672, "load": 0.0167}, "prompt_sha1": "6399a86de7b26e3438316827a54d69c4c2eea484", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×48²=5.4144 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 48, "energy": 5.4144000000000005}, "prompt_sha1": "f12867903fe557417eb2cbe06650b28ac6383f2b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 3 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×3/(1×10^9) = 0.006 s = 6.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 3.0, "ghz": 1.0, "sec": 0.006}, "prompt_sha1": "c44807618effc7e522e0362b61900479cd7ba7a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 21 and initial occupancy is 21. In an abstract batch, producer attempts to enqueue 55 items first, dropping any excess beyond capacity; then consumer removes up to 51 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=21, dropped=55; consumed=21; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 21, "start": 21, "prod": 55, "cons": 51, "dropped": 55, "consumed": 21, "final": 0}, "prompt_sha1": "193238d5f4bfcad939bc7b7131dd476bf3c75134", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_43` for a synchronous sampled input `noisy`. Update output `clean` only after observing 43 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_43 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 42) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_43", "stable_samples": 43}, "prompt_sha1": "5ce492027d4c85b0d7fabdedd02b80f56b6ddc78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10001010111110100111011 using generator polynomial bits 10101. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 21, "msg_bits": 23, "msg": 4554043, "remainder": 7}, "prompt_sha1": "146a6d16134e81f755d28cf2a56e49d8532fc9d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 180000 Hz satisfies it.", "output": "Nyquist minimum is 2×100000 = 200000 Hz. Proposed rate 180000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100000, "min_fs": 200000, "proposed": 180000.0}, "prompt_sha1": "6ef19937db9567c1e13b20477e2bdb524ecffe51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_9705(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_9705(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_9705([1, 2]) == 1.5\nassert mean_9705([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_9705"}, "prompt_sha1": "4381c79523d1c94e5230e2c639f3509b860dd2b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 2` on one shared integer without synchronization. Assume `credits` initially equals 286. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 286; T2 reads 286; both compute 288; T1 writes 288; T2 writes 288. The observed final value is 288, but two serial increments would produce 290.\n\n```\nlock(mutex)\ncredits = credits + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "4c068b508fe434e7d0a6923b268f0a6d72585b79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_3118` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_3118 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_3118", "width": 12}, "prompt_sha1": "605af9098d20b0e8b1acea26125b38e460f21dc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×1.8²=7.614e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 1.8, "energy": 7.614e-05}, "prompt_sha1": "ec0692628206ea051a30bbea5a5ce842c5e2ff8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 32 payload bytes plus 40 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 32/(32+40) = 0.444444 = 44.44%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 32, "overhead": 40, "efficiency": 0.4444444444444444}, "prompt_sha1": "d8aec88a2544e1fb1b01b00cc351eafb234544d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4550` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4550 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4550"}, "prompt_sha1": "c96e6c9101a6122a67fe5943ffdd1eec7bcb4660", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_8325` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_8325 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_8325"}, "prompt_sha1": "8d0b7b140a99190e0a9aa733147ba1a40a86f516", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 62.5 Hz satisfies it.", "output": "Nyquist minimum is 2×50 = 100 Hz. Proposed rate 62.5 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50, "min_fs": 100, "proposed": 62.5}, "prompt_sha1": "11292a01a6532df6a8fce8664425a13a29b4b1cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 12.5 V source drives a 390 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 12.5-3.4 = 9.1 V.\nI = V/R = 9.1/390 A = 23.3333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 12.5, "vf": 3.4, "r": 390, "current_a": 0.02333333333333333}, "prompt_sha1": "02895f57e41d6a692a9ec1b72d66662fee915690", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 0. Apply operations ['V', 'P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 0, "ops": ["V", "P", "V", "V", "V", "V"], "value": 4, "blocked": 0}, "prompt_sha1": "7440c880abad6504d8f3f01e838b73dafa04a1e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 28-bit right-shift register module `shiftreg_right_28`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `28-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_28 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [27:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[27:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_28", "width": 28, "direction": "right"}, "prompt_sha1": "90202c8240a923bfe235bc1836e9a43d611e34b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x7C895991DB in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: DB 91 59 89 7C.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 534880293339, "endian": "little", "bytes": [219, 145, 89, 137, 124]}, "prompt_sha1": "2e4a2a4abea11e9747db4e37d17c3c93b4ec78d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 26847 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 26847/5000000 s; frequency = 5000000/26847 = 186.240548 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 26847, "hz": 186.24054829217417}, "prompt_sha1": "471aea76ab9928755c27706daf78bdf81e6bff74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_3286` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_3286 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_3286"}, "prompt_sha1": "51e4c7ee7dcc5f117948508bdc352669b534e6f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 16-bit up/down counter `updown_16_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_16_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [15:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 16'd65535) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_16_sat", "width": 16, "wrap": false}, "prompt_sha1": "30e738e7baf7520148e705e2740bb044f9460029", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 8 = 4.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 8, "spi_hz": 4500000.0}, "prompt_sha1": "149bd7db01135207226069c69b9f1fb0eb390e8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×8 KiB = 256 KiB = 262144 bytes = 0.250000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 8, "reach": 262144}, "prompt_sha1": "43e7d2976e2788ef912171121c01e8235e4ee621", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [13, 8, 1, 13, 14, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [46, 16, 17, 51, 57, 69].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [13, 8, 1, 13, 14, 20], "finish": [46, 16, 17, 51, 57, 69]}, "prompt_sha1": "25c2e769e92a7a7d6bdd4692765826fb094eaa26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(2×10^6) s = 64.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 128, "time_us": 64.0}, "prompt_sha1": "be2acd5f98864db057a9306a2e0d1c13afedb0a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 21-bit left-shift register module `shiftreg_left_21`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `21-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_21 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [20:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[19:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_21", "width": 21, "direction": "left"}, "prompt_sha1": "340a9888dea936d03f9fd0c20f977dab4ef205f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 12 = 0.270000.\nEffective CPI = 1.2 + 0.270000 = 1.470000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.15, "penalty": 12, "result": 1.47}, "prompt_sha1": "32bb3e3c7ff455063341e9ff42ac9ce0905a639f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 480 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 480 = 240. Verification: 240/480 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 480, "duty": 50, "high": 240}, "prompt_sha1": "853eaad0aa9fed2fef7cfea0a425d1cad36ca511", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD40B4F57A727 in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: D4 0B 4F 57 A7 27.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 233145040873255, "endian": "big", "bytes": [212, 11, 79, 87, 167, 39]}, "prompt_sha1": "f7448238f60b1b8b9383074735a9f2ddbf6d9a96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8636-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8636×8 = 69088 bits.\nSerialization delay = bits/rate = 69088/(5000×10^6) s = 1.38176e-05 s = 13.817600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8636, "rate_mbps": 5000, "delay_s": 1.38176e-05}, "prompt_sha1": "3d779d5ab5de8170b0897e571d5f56be8d7c78f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock B then DESC; consumer acquires DESC then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds B while waiting for DESC, while consumer holds DESC while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "e590d22874605da0d4e2d7ccf91bd5146cbe741b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1250 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 1250 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 1250.0}, "prompt_sha1": "a7e72028b3c095ad7241c0cec03d15e17f570e69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 7 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 15 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+1 = 9. Total bits = 15×9 = 135. Time = 135/460800 = 0.00029296875 s = 0.292969 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 7, "parity": 0, "stop": 1, "frames": 15, "seconds": 0.00029296875}, "prompt_sha1": "c10418b11045ec184d2a897040b3471ef09ff1e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 12 MHz, prescaler divisor is 45, and period is 29471 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 12000000/(45×29471) = 9.048443 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 12000000, "prescaler": 45, "period": 29471, "hz": 9.048443102258718}, "prompt_sha1": "31b7b9bb2431cda5da03900a4607b62e9b842256", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 39 bits wide and the system uses 4 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 4096 bytes = 2^12 bytes.\nOffset bits = 12.\nVPN bits = 39-12 = 27.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 39, "page_bytes": 4096, "offset_bits": 12, "vpn_bits": 27}, "prompt_sha1": "e1244fbf061afa366f3d7373b85a0140296bb81c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 000100001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 2 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "000100001", "ones": 2, "parity": 0}, "prompt_sha1": "4b26e178261af361824c0f13705a35ee394a24ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact cutoff frequency of an RC low-pass when R=22000 ohm but capacitance is unspecified.", "output": "A numeric cutoff is underdetermined because C is missing. For a first-order RC low-pass, f_c=1/(2πRC). With R=22000 ohm, the capacitance is still required; I would request C rather than assume it.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "9083bfb380760a1ae3561775a73d8822919ba8fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8716-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8716×8 = 69728 bits.\nSerialization delay = bits/rate = 69728/(10×10^6) s = 0.0069728 s = 6972.800000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8716, "rate_mbps": 10, "delay_s": 0.0069728}, "prompt_sha1": "1605d7c1cd7c536c8f8135733066c1ed49d7042b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×2/1000/8 = 25000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 2, "bytes": 25000000.0}, "prompt_sha1": "f3c7138e19e95711412679e700a5b27551baef51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xA183 in 2 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 83 A1.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 41347, "endian": "little", "bytes": [131, 161]}, "prompt_sha1": "fd1cc861a340e42af3fd4eeecf0986c6a93eb630", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 7.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+12 = 19.5. Period = 19.5/16000000 = 1.21875e-06 s. Maximum rate = 1/period = 820512.820513 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 7.5, "conv_cycles": 12, "period": 1.21875e-06, "rate": 820512.8205128205}, "prompt_sha1": "a2e01e8d9b859fd6cf17049fdb6ac265ec11a293", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 40 MHz. Sampling consumes 12.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+8 = 20.5. Period = 20.5/40000000 = 5.125e-07 s. Maximum rate = 1/period = 1951219.512195 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 40000000.0, "sample_cycles": 12.5, "conv_cycles": 8, "period": 5.125e-07, "rate": 1951219.5121951222}, "prompt_sha1": "b2306edbec9a971dae0b6ae451337aa689b70751", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 180 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 180000000/4000 = 45000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 45000 that also keeps the period count within 16 bits is 7500.\nPeriod count = 45000/7500 = 6.\nPSC register = 7500-1 = 7499.\nARR register = 6-1 = 5.\nVerification: 180000000/(7500×6) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 180000000, "target_hz": 4000, "total_division": 45000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 7500, "period": 6, "psc_reg": 7499, "arr_reg": 5}, "prompt_sha1": "e11752b5a7f48c7660be547f5891304d09c9a42c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 960 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 960 = 192. Verification: 192/960 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 960, "duty": 20, "high": 192}, "prompt_sha1": "110992d295f04f802760e7a5f743a821f7d3241f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20×10^6 × 3/1000 = 60000 bits = 7500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20, "rtt_ms": 3, "bits": 60000.0, "bytes": 7500.0}, "prompt_sha1": "932d60d95bd64e8afd6e11f57596b43f48ed228e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 22 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-05×100²=0.11 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-05, "v": 100, "energy": 0.11}, "prompt_sha1": "e00ebadca505ff18aa5ced9c2f76e6a5523d1282", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=50 ms, C=4 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/50 + 4/100 = 0.060000 = 6.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 50], [4, 100]], "utilization": 0.06}, "prompt_sha1": "a26be05c09d97677c8ba1888592f624e36962bed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock A then D; worker_2 acquires D then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds A while waiting for D, while worker_2 holds D while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before D. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "c79e6e8105c6d2149d65a12edb91c972d6612d72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1200 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1200/(1200+36) = 0.970874 = 97.09%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1200, "overhead": 36, "efficiency": 0.970873786407767}, "prompt_sha1": "2c8689fd6485c4108f0062bdda63e296df42bf22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 48 and initial occupancy is 2. In an abstract batch, producer attempts to enqueue 110 items first, dropping any excess beyond capacity; then consumer removes up to 119 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=48, dropped=64; consumed=48; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 48, "start": 2, "prod": 110, "cons": 119, "dropped": 64, "consumed": 48, "final": 0}, "prompt_sha1": "b90df60531c8f075185cbb23b912bd544d5607f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(40×10^6) s = 51.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 2048, "time_us": 51.199999999999996}, "prompt_sha1": "886c05a26f193f0290fbc2e6bddab80c192fa2d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 4000 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×4000×10^6×2 = 8.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 4000, "channels": 2, "gbps": 8.0}, "prompt_sha1": "74067a23dd0329f911e81ae436701607e92fe5ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.4 V source drives a 330 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.4-3.3 = 13.1 V.\nI = V/R = 13.1/330 A = 39.6970 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.4, "vf": 3.3, "r": 330, "current_a": 0.03969696969696969}, "prompt_sha1": "2a63fe3ccbe44c16ab1ed8db9e205c973cc88ed4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-40 = 960 bytes.\nRound down to an 8-byte multiple: floor((960)/8)×8 = 960 bytes.\nFragments required = ceil(4000/960) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 40, "payload": 4000, "max_payload": 960, "fragments": 5}, "prompt_sha1": "9768ea71e33c765cd7b2290d95a51539d1b59234", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [12, 15, 27, 20, 11, 28]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [57, 74, 109, 97, 68, 113].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [12, 15, 27, 20, 11, 28], "finish": [57, 74, 109, 97, 68, 113]}, "prompt_sha1": "683353b7f6dbe69d3237ea6f35e6a04d36cea15b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w3_m4` with clk, asynchronous active-low rst_n, active-high enable, and output logic [2:0] count. On reset count=0. When enabled it increments until 4 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w3_m4 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [2:0] count\n);\n localparam logic [2:0] LIMIT = 3'd4;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w3_m4", "width": 3, "max": 4}, "prompt_sha1": "e9a67e216e0b23f56ad3e65b36a787680b610be6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 001011100111101001010011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 13 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001011100111101001010011", "ones": 13, "parity": 1}, "prompt_sha1": "100efbee05375290160d9af1d42b0f201bb2fd03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 14 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 14×8 = 112. Time = 112/115200 = 0.000972222222 s = 0.972222 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 6, "parity": 0, "stop": 1, "frames": 14, "seconds": 0.0009722222222222222}, "prompt_sha1": "12b743a763090e8ab5ef5a3641a8f1af3652fa41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['V', 'P', 'P', 'P', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 4 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["V", "P", "P", "P", "P", "P", "P"], "value": 0, "blocked": 4}, "prompt_sha1": "89de92012c93b2b917ebb55ee2e2f907c4d3b78c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 1` on one shared integer without synchronization. Assume `jobs` initially equals 459. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 459; T2 reads 459; both compute 460; T1 writes 460; T2 writes 460. The observed final value is 460, but two serial increments would produce 461.\n\n```\nlock(mutex)\njobs = jobs + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "d58c299d59b59644cdbf802eab773b6f17cf0607", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xC7, clear bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 1)`. Result = 0xC5.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 199, "bit": 1, "op": "clear", "result": 197}, "prompt_sha1": "3cd3f65bb45e72d2efd4dbf33c5490c3078ae839", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_789176` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_789176 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_789176"}, "prompt_sha1": "317a4dec37430c1b5c1224f549a02d0da1f6e9de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×9²=0.0891 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 9, "energy": 0.08909999999999998}, "prompt_sha1": "c4c42d2845bdadd900f9603b7ce51ff27c640a17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.83. Using Amdahl's law, compute the theoretical speedup on 20 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.83) + 0.83/20) = 4.728132.\nThe theoretical speedup is about 4.728×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.83, "n": 20, "result": 4.7281323877068555}, "prompt_sha1": "b4d0248797d57d91650e9852ba4af7a899f4bb0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NNTTNTTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on N; 1->N on T; 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 0, 1, 1, 0, 1, 1, 1, 0, 1], "final_state": 3}, "prompt_sha1": "a1a68fb3a9c663f3d73340fdfe5521acdf464c51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock STATE then DESC; task_B acquires DESC then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds STATE while waiting for DESC, while task_B holds DESC while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "d04a6dac6c20352b7dc5ceb1f9cc9e9827ee4a18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 16-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^16 V = 3.125e-05 V = 31.250000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 16, "vref": 2.048, "step": 3.125e-05}, "prompt_sha1": "638e2a3bc6e7593a7c8556cca631fafeff0a3d64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock RX then STATE; T2 acquires STATE then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds RX while waiting for STATE, while T2 holds STATE while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire RX before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "180eeceb7c640e1e46acd75dbabdf9ab405f3884", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-32 = 1468 bytes.\nRound down to an 8-byte multiple: floor((1468)/8)×8 = 1464 bytes.\nFragments required = ceil(2000/1464) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 32, "payload": 2000, "max_payload": 1464, "fragments": 2}, "prompt_sha1": "e5b90cc5d966de68434667ca3db1608a4495b8f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10000100110100100 using generator polynomial bits 111001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 01001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 57, "msg_bits": 17, "msg": 68004, "remainder": 9}, "prompt_sha1": "2c180510c51094b2d73fcae39563fa0421dfaf70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 12769 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 12769/100000 s; frequency = 100000/12769 = 7.831467 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 12769, "hz": 7.831466833737959}, "prompt_sha1": "24cff4b896807420b0946afdff1ac62d70008e9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=10 nF and is stepped to 2.5 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=2.5(1-e^-3)=2.375532 V; τ=4.7e-05 s and t=0.000141 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1e-08, "multiple": 3, "vin": 2.5, "vc": 2.37553232908034}, "prompt_sha1": "aecfcf46685767c26ae1fea1532af23f644a96c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 32 = 2.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 32, "spi_hz": 2250000.0}, "prompt_sha1": "9071d8753c2f22c3be8580f76c9739835feb31a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.227.172.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.227.172.0\nBroadcast address: 10.227.172.15\nUsable host range: 10.227.172.1 to 10.227.172.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.227.172.0/28", "usable": 14, "first": "10.227.172.1", "last": "10.227.172.14", "broadcast": "10.227.172.15"}, "prompt_sha1": "97b1ef57ae11dc7ef27cb440458dc726a3f28e9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 417 elements. Review loop `for i in range(417+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(417+1)` includes index 417, which is out of range for a length-417 sequence. Correct loop: `for i in range(417):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 417, "variant": "one_past"}, "prompt_sha1": "bfb9983c7d5fb8c578979cde60bf248af2675e0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 20 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 160 Hz satisfies it.", "output": "Nyquist minimum is 2×20 = 40 Hz. Proposed rate 160 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 20, "min_fs": 40, "proposed": 160}, "prompt_sha1": "ccf29052483c3b42cb534aed407a630e703190fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 512 payload bytes plus 44 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 512/(512+44) = 0.920863 = 92.09%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 512, "overhead": 44, "efficiency": 0.920863309352518}, "prompt_sha1": "9a905334639942332db151295bb2a2d3079d6ca7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x106AE8C9. Extract the 8-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x106AE8C9 >> 4) & 0xFF = 0x8C (140).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 8, "lsb": 4, "value": 275441865, "mask": 255, "field": 140}, "prompt_sha1": "eb114629a0fe1e1297313c739f0c976b7907b568", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (1024×8) = 244.140625 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 1024, "pps": 244.140625}, "prompt_sha1": "ef7cf1ae6af86d68044befef5f4a4499a9b79529", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_1120` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_1120 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_1120", "width": 5}, "prompt_sha1": "52013a73a2274f239da50ad5cb92a26c71011fb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 8044 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 8044/1000000 s; frequency = 1000000/8044 = 124.316261 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 8044, "hz": 124.31626056688215}, "prompt_sha1": "adf133b2363ba39da4aba474fc187fde5e7d395f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_49` generating a one-clock-cycle `tick` every 49 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_49 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 48) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_49", "divide": 49}, "prompt_sha1": "975b7dfe12a0e77a7194e0246fdc1f2074b75983", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w20_signed` comparing two 20-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w20_signed (\n input logic signed [19:0] a,\n input logic signed [19:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w20_signed", "width": 20, "signed": true}, "prompt_sha1": "934729424675b12a2dbc19fbf0f8b56edc2f0dfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 25000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 25000×10^6 / (256×8) = 12207031.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "frame_bytes": 256, "pps": 12207031.25}, "prompt_sha1": "5561ba154d5e67baf70d9ca57f4557090e6499cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_37_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 37 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_37_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd37;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_37_ignore", "cycles": 37, "retrigger": false}, "prompt_sha1": "4aac147b0773cfd490026d2b87081aa0c1d77592", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_6_3609` converting a 6-bit binary input `bin` to 6-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_6_3609 (\n input logic [5:0] bin,\n output logic [5:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_6_3609", "width": 6}, "prompt_sha1": "9918f9bed7305f0250920bd4db85cbe5c7b7ecdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 101110101111010000111101001 using generator polynomial bits 10111001. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1011000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 185, "msg_bits": 27, "msg": 98017769, "remainder": 88}, "prompt_sha1": "7f7cb9231315fb042ba34ede5f1bc5e9f75b121f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 31-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^31/2^20 = 2^11 = 2048 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 31, "page_exp": 20, "entries": 2048}, "prompt_sha1": "713edbc85b8c09032016e95cd2d0bec9e7afe655", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [25, 17, 13, 13, 12, 8]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [88, 75, 78, 81, 83, 58].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [25, 17, 13, 13, 12, 8], "finish": [88, 75, 78, 81, 83, 58]}, "prompt_sha1": "e6034dd7b03bf1d600f32d6a811ec5d4b63cfba6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 160 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 160 MHz / 8 = 20.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 160000000.0, "divider": 8, "spi_hz": 20000000.0}, "prompt_sha1": "d46988986d4a2b4b246ce7db2818b3de78c62a50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1000 Mbit/s and RTT 100 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1000×10^6 × 100/1000 = 1e+08 bits = 1.25e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1000, "rtt_ms": 100, "bits": 100000000.0, "bytes": 12500000.0}, "prompt_sha1": "adec90b590a86799994835e5e397a9bfa0fc96c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_759002` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_759002 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_759002"}, "prompt_sha1": "cd831ea35d6503e00f3dd2568544897339e7d17e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×560)/(1000+560) = 358.974359 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 560, "req": 358.974358974359}, "prompt_sha1": "7818ec0c7922a3e7169a04c8cae2899543842034", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/4700=0.010212766 A. P=V²/R=48²/4700=0.490212766 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 4700, "i": 0.010212765957446808, "p": 0.4902127659574468}, "prompt_sha1": "5c24214cd5428c5d5076db6a90349d4bc94df8be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=2.2 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×10/(2.2+10) = 7.377049 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 2.2, "r2": 10, "vout": 7.3770491803278695}, "prompt_sha1": "52faaa955213790de06dae8d4a9da067ee1abcc9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×1.8²=1.62e-08 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 1.8, "energy": 1.6200000000000003e-08}, "prompt_sha1": "0e872fdaf371366d2a6e2cc681c3453d6690b4b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_9152` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_9152 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_9152"}, "prompt_sha1": "1f61affac64974e3c6fbfe5e365988ae1293edde", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 1, 0], "final_state": 0}, "prompt_sha1": "305ea825773121ead1d558a517d3d3ec8fdaff30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×100²=0.235 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 100, "energy": 0.23499999999999996}, "prompt_sha1": "86679bbfb7efa83c1ba4dc05d7ff2eb11dbaca58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_16_8_14` with RED, GREEN, YELLOW states. Hold RED for 16 clock cycles, GREEN for 8, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_16_8_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 15) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 7) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_16_8_14", "red": 16, "green": 8, "yellow": 14}, "prompt_sha1": "f7eb18c0799b8933a4ccb39e3df5c5cf146c033e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `samples` elements of type `float`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n total += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `items[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n total += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "258c04e669f0e01255688502cb0e0d6de58dcac9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 49-bit right-shift register module `shiftreg_right_49`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `49-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_49 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [48:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[48:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_49", "width": 49, "direction": "right"}, "prompt_sha1": "d8220f030f3c361343bd354e2f035c76f8c523ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 60-bit up/down counter `updown_60_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_60_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [59:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_60_wrap", "width": 60, "wrap": true}, "prompt_sha1": "dd2e5077589ae3d67d7af8b59cb451e636471808", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(5000/968) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 5000, "max_payload": 968, "fragments": 6}, "prompt_sha1": "f8c12d7723797f1036bc35c5d188869a2c96b7b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 64-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/64 = 256.\nOffset bits = log2(64) = 6.\nIndex bits = log2(256) = 8.\nTag bits = 64-8-6 = 50.\nCheck: 50+8+6 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 64, "addr_bits": 64, "lines": 256, "offset_bits": 6, "index_bits": 8, "tag_bits": 50}, "prompt_sha1": "82f313396bbccc80d45937722b661f406e7596b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_2_2` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 2, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_2_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 1) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_2_2", "red": 20, "green": 2, "yellow": 2}, "prompt_sha1": "e378367e8a9394a396f64702c9cabed103a42058", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 61 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 61-10 = 51.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 61, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 51}, "prompt_sha1": "48602fe99ae7c1fdcda6d5a144e52f524b3af7e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0100101111100010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 8 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0100101111100010", "ones": 8, "parity": 0}, "prompt_sha1": "469fadaa3bf3294d4292bdeb0551611d87368d6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w50_nocin` implementing a 50-bit unsigned adder with inputs `a`, `b` and outputs `50-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w50_nocin (\n input logic [49:0] a,\n input logic [49:0] b,\n output logic [49:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w50_nocin", "width": 50, "cin": false}, "prompt_sha1": "1a66b68d26a063c87ef43bb94600de2533e3f461", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.52. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.52) + 0.52/8) = 1.834862.\nThe theoretical speedup is about 1.835×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.52, "n": 8, "result": 1.8348623853211012}, "prompt_sha1": "e04e8bc10597a407fdd4e1ea9eeb0d62a363b6e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 20-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^20 V = 1.19209289551e-06 V = 1.192093 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 20, "vref": 1.25, "step": 1.1920928955078125e-06}, "prompt_sha1": "46a6ee9eac6947359745276dc58886505285616a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 64 = 1.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 64, "spi_hz": 1125000.0}, "prompt_sha1": "851c600b4d4f17213272d9cd4bd7e7c4d6107d4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 95%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.060×(10+0.050×200) = 1.700000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.94, "l2": 10, "l2_hit": 0.95, "mem": 200, "amat": 1.7000000000000015}, "prompt_sha1": "1595d8094bfb52c0cb87e7de88e7b12fcb92a18c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-20 = 1980 bytes.\nRound down to an 8-byte multiple: floor((1980)/8)×8 = 1976 bytes.\nFragments required = ceil(3000/1976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 20, "payload": 3000, "max_payload": 1976, "fragments": 2}, "prompt_sha1": "ca16d253edbba0e23069541cf65b457888419bbb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 1162 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 50000×1162/(16×10^6) = 3.63125 = 363.125000%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 50000, "cycles": 1162, "load": 3.63125}, "prompt_sha1": "99cd621433a49e8425fbbf24897309efbcc9c72a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "a8c4d693093c62385086f54243fc72223ef84fac", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "9b4e48df06eb99167980472d6b0906184b04da66c2d8a6f18907985cd1b19f8d", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 6202, "original_row_sha256": "38cbaec7a89a95bc863e3c271e30c2243864adbc1b327be8aaff01b47caf3bc1", "version": "v1.0.0-rc1"}}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 40 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 40000000/(16×38400) = 65.104167.\nNearest integer divisor D = 65.\nActual baud = 40000000/(16×65) = 38461.538 baud.\nError = (38461.538-38400)/38400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 40000000, "oversample": 16, "baud": 38400, "divisor": 65, "actual": 38461.53846153846, "error_pct": 0.1602564102564088}, "prompt_sha1": "7a1f6286a46c384e28284dd3b5320888563df8f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w50_signed` comparing two 50-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w50_signed (\n input logic signed [49:0] a,\n input logic signed [49:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w50_signed", "width": 50, "signed": true}, "prompt_sha1": "cf5ff5003f1afff97b2096b9e45653f552f4811e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x8D210BA0. Extract the 2-bit field starting at bit 18 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0x8D210BA0 >> 18) & 0x3 = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 2, "lsb": 18, "value": 2367753120, "mask": 3, "field": 0}, "prompt_sha1": "cfa1874df9a1bd8bf5e163d58ceb2738bde39b87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 9 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 19 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+1 = 12. Total bits = 19×12 = 228. Time = 228/2400 = 0.095 s = 95.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 9, "parity": 1, "stop": 1, "frames": 19, "seconds": 0.095}, "prompt_sha1": "288ce7b767a77da2d95c8774fdadbcbe52bea0a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 320 counts per period. What compare/high-time count produces exactly 85% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.85 × 320 = 272. Verification: 272/320 = 0.85, which is 85%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 320, "duty": 85, "high": 272}, "prompt_sha1": "7d53d2549b18cf93dd88eae2150cf186a86f758a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 36 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 36000000/(4×1000000) = 9.000000.\nNearest integer divisor D = 9.\nActual baud = 36000000/(4×9) = 1000000.000 baud.\nError = (1000000.000-1000000)/1000000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 36000000, "oversample": 4, "baud": 1000000, "divisor": 9, "actual": 1000000.0, "error_pct": 0.0}, "prompt_sha1": "bf85e1bd8a1230d496308670d3d567a24bcec39d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_6_lsb` for `6-bit in`. The lowest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_6_lsb (\n input logic [5:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 5; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_6_lsb", "width": 6, "priority": "low"}, "prompt_sha1": "292978bb713f85435baea6a8ecba41d02823540d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 36 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 36000000/(8×28800) = 156.250000.\nNearest integer divisor D = 156.\nActual baud = 36000000/(8×156) = 28846.154 baud.\nError = (28846.154-28800)/28800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 36000000, "oversample": 8, "baud": 28800, "divisor": 156, "actual": 28846.153846153848, "error_pct": 0.1602564102564151}, "prompt_sha1": "9010399eadba7727ec4ce9e42acd3647d5106257", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3932-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3932×8 = 31456 bits.\nSerialization delay = bits/rate = 31456/(5000×10^6) s = 6.2912e-06 s = 6.291200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3932, "rate_mbps": 5000, "delay_s": 6.2912e-06}, "prompt_sha1": "8c53cebe1b7927c8e16a82c60a564271e7b3069d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=4.7 nF and is stepped to 2.5 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=2.5(1-e^-1)=1.580301 V; τ=2.209e-06 s and t=2.209e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 4.700000000000001e-09, "multiple": 1, "vin": 2.5, "vc": 1.5803013970713942}, "prompt_sha1": "d6213262473360c42df62d803b95e4105b336eeb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×1000000 = 2000000 Hz. Proposed rate 1e+06 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000000, "min_fs": 2000000, "proposed": 1000000}, "prompt_sha1": "aef7741b8495f80f97ad525244e59bd01c467d3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2102(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2102(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2102([1, 2]) == 1.5\nassert mean_2102([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2102"}, "prompt_sha1": "47ca4c48189d03a4807d9e478084382dd643e43a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 195 elements. Review loop `for i in range(195-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(195-1)` produces indices 0 through 193, so index 194 is skipped. Correct loop: `for i in range(195):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 195, "variant": "miss_last"}, "prompt_sha1": "d7ebb9bc6e5cadac45694bc1f5c4a1c9a1561d68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w57_signed` comparing two 57-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w57_signed (\n input logic signed [56:0] a,\n input logic signed [56:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w57_signed", "width": 57, "signed": true}, "prompt_sha1": "167433ddafe280bcd62f4a968799b48062eef72c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 2.56 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.56/2^6 V = 0.04 V = 40000.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 2.56, "step": 0.04}, "prompt_sha1": "1a25057ce957890bcbd097ea21ca994af28a5394", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_35` generating a one-clock-cycle `tick` every 35 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_35 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 34) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_35", "divide": 35}, "prompt_sha1": "e8260e42d550892801bdd5e54d3422fa463c8e86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_119_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 119 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_119_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd119;\n end else begin\n if (pulse_in)\n count <= 7'd119;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_119_retrig", "cycles": 119, "retrigger": true}, "prompt_sha1": "23595e3b3dbbd92d95a85a5ecdfb90ce6262f9f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_75487` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_75487 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_75487"}, "prompt_sha1": "7a9a52c5c39edb8815584e07da4475905e17f950", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (9000×8) = 1388.888889 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 9000, "pps": 1388.888888888889}, "prompt_sha1": "ef4f5840170a6101903f3483bdec398ae27849df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xE8B4. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xE8B4 >> 3) & 0xF = 0x6 (6).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 4, "lsb": 3, "value": 59572, "mask": 15, "field": 6}, "prompt_sha1": "314b3b179ab2af90dcd0dde4e5b5349dfda48b5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 80 MHz CPU services an interrupt at 100 Hz. Each ISR consumes 2737 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 100×2737/(80×10^6) = 0.00342125 = 0.342125%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 80, "irq_hz": 100, "cycles": 2737, "load": 0.00342125}, "prompt_sha1": "1c450fbed39a4661abd8e635633add01d683a5f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.70. Using Amdahl's law, compute the theoretical speedup on 10 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.70) + 0.70/10) = 2.702703.\nThe theoretical speedup is about 2.703×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.7, "n": 10, "result": 2.702702702702702}, "prompt_sha1": "8bb1d0eb1089831c96f8694aba3695224d340093", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_110` for a synchronous sampled input `noisy`. Update output `clean` only after observing 110 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_110 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 109) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_110", "stable_samples": 110}, "prompt_sha1": "eae8f743315639312f351a483aabcd869c647f96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 110100110 using generator polynomial bits 101110011. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01101110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 371, "msg_bits": 9, "msg": 422, "remainder": 110}, "prompt_sha1": "9e4c8bb82a504a930a10a02775ceda4d28e95672", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=47 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×2.2/(47+2.2) = 1.073171 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 47, "r2": 2.2, "vout": 1.0731707317073171}, "prompt_sha1": "833bb94048940879e4f216de081358617f7b0c8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 2.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+20 = 22.5. Period = 22.5/2000000 = 1.125e-05 s. Maximum rate = 1/period = 88888.888889 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 2.5, "conv_cycles": 20, "period": 1.125e-05, "rate": 88888.88888888889}, "prompt_sha1": "79e1162163ee70efccf35e4eefa6cb5e75419507", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×2.5²=3.125e-08 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 2.5, "energy": 3.125e-08}, "prompt_sha1": "7221b05e015af6127ba5d0fb363d2b5f5afb3b90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 3.3 V reference and returns code 185. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 185/255 × 3.3 V = 2.394118 V.\nThus the estimated input is about 2.3941 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 3.3, "code": 185, "volts": 2.3941176470588235}, "prompt_sha1": "9ec9840178013c7f05430fed90f6f9b4a6aa6d84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'P', 'V', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "P", "V", "V", "V", "V", "P"], "value": 6, "blocked": 0}, "prompt_sha1": "0f419f33bc49d9374e985acb1f038e511b2b31c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 37 and tail index 39, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (37-39) mod 64 = 62. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 37, "tail": 39, "occupancy": 62}, "prompt_sha1": "8cfd91ea71ab74e1da507bc1b2ea89abb4ca731c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 65 and initial occupancy is 38. In an abstract batch, producer attempts to enqueue 105 items first, dropping any excess beyond capacity; then consumer removes up to 57 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=65, dropped=78; consumed=57; final occupancy=8.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 65, "start": 38, "prod": 105, "cons": 57, "dropped": 78, "consumed": 57, "final": 8}, "prompt_sha1": "2b38c06baaf2ae4402034eff574ccbb7fdca29bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=4.7 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/1 = -4.700000.\nVout = A_v×Vin = -4.700000×0.1 = -0.470000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 4.7, "vin": 0.1, "gain": -4.7, "vout": -0.47000000000000003}, "prompt_sha1": "7a446ec59804f295a03cc5a35f633ba356b30368", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 25 and initial occupancy is 11. In an abstract batch, producer attempts to enqueue 64 items first, dropping any excess beyond capacity; then consumer removes up to 139 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=25, dropped=50; consumed=25; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 25, "start": 11, "prod": 64, "cons": 139, "dropped": 50, "consumed": 25, "final": 0}, "prompt_sha1": "f0b51e6d10d62175a10e0439653a5b1fc0acf178", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_4576` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_4576 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_4576"}, "prompt_sha1": "c82e0528e38e01ebb05951c5007be0a51e1565df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m25540` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 25540 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m25540 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd25540;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m25540", "width": 16, "max": 25540}, "prompt_sha1": "e27823f2ab6f2d67517d9011385c25fd6d6a27ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_4_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 4 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_4_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 3'd4;\n end else begin\n if (pulse_in)\n count <= 3'd4;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_4_retrig", "cycles": 4, "retrigger": true}, "prompt_sha1": "2cbd2b42780a7ce5c3d56b884dc404dcd840018f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xE5. Extract the 5-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xE5 >> 1) & 0x1F = 0x12 (18).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 1, "value": 229, "mask": 31, "field": 18}, "prompt_sha1": "63eaaf491d05a592a9459f79cf40c3233ab194f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_16_3540` implementing a 2-to-1 multiplexer for two 16-bit inputs `a` and `b`, select `sel`, and 16-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_16_3540 (\n input logic [15:0] a,\n input logic [15:0] b,\n input logic sel,\n output logic [15:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_16_3540"}, "prompt_sha1": "f7d669e69b0c77763e41bae8d6c65aff5130fc6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 85% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.85 × 1000 = 850. Verification: 850/1000 = 0.85, which is 85%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 85, "high": 850}, "prompt_sha1": "c1b2694c68704c3a333e0ce960713c8311cb4303", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 200 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×200×10^6×8 = 8.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 200, "channels": 8, "gbps": 8.0}, "prompt_sha1": "d32c0501fb65d85bb6770a5dda7f2b7ab9f08f5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 102 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "6f5b3f9d54ab0acc66d8b2419be8e86d86a4d55d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x7A<<1)|1 = 0xF5 = 11110101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 122, "rw": 1, "byte": 245}, "prompt_sha1": "fc2c3a0fbc22bf4d33df2e45a54e2683a428ab64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(8×10^6) s = 4.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 32, "time_us": 4.0}, "prompt_sha1": "fb0f2693ba27287700d8e32db3848058c065c8d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 834438095, carries 34379 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 34379+1+0 = 34380. ACK = (834438095+34380) mod 2^32 = 834472475.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 834438095, "payload": 34379, "syn": 1, "fin": 0, "ack": 834472475}, "prompt_sha1": "b8da3057ccbe81bfba1574c163e6991fc7e457f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_29553` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_29553 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_29553"}, "prompt_sha1": "6754e6e82b4429e5de035ea1c350b8c6d70f0d87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_45` for a 45-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_45 (\n input logic [44:0] data,\n input logic [5:0] shamt,\n output logic [44:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_45", "width": 45, "direction": "right", "arithmetic": false}, "prompt_sha1": "c5871d1b80e2941620a1188c9c680a33eaff2c1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 2 = 8.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 2, "spi_hz": 8000000.0}, "prompt_sha1": "3b2fbdfdd334af6e92d69111bafb477e064236bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_117` for a synchronous sampled input `noisy`. Update output `clean` only after observing 117 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_117 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 116) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_117", "stable_samples": 117}, "prompt_sha1": "b154db7346ca43bd77ff8d94e5cc76fe824eb9b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=1000 nF and is stepped to 5 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=5(1-e^-2)=4.323324 V; τ=0.0022 s and t=0.0044 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 1.0000000000000002e-06, "multiple": 2, "vin": 5, "vc": 4.323323583816936}, "prompt_sha1": "419124216f2250366f60a2713f1016e8aceb6253", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x24, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x24<<1)|0 = 0x48 = 01001000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 36, "rw": 0, "byte": 72}, "prompt_sha1": "422cbdac84a1898feaf25ef3277d1562260dc380", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock B then STATE; T2 acquires STATE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds B while waiting for STATE, while T2 holds STATE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "1dca8155559f514cb1181b47f9c852e74168523e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 10%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.100 × 2 = 0.010000.\nEffective CPI = 1.2 + 0.010000 = 1.210000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.1, "penalty": 2, "result": 1.21}, "prompt_sha1": "1d0b6badaaa33e50109c78bf73e33515b674288c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_23` for a 23-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_23 (\n input logic [22:0] data,\n input logic [4:0] shamt,\n output logic [22:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_23", "width": 23, "direction": "left", "arithmetic": false}, "prompt_sha1": "aaf3bf46a305a0398084f013ea6baa42c17dbf09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2312-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2312×8 = 18496 bits.\nSerialization delay = bits/rate = 18496/(25000×10^6) s = 7.3984e-07 s = 0.739840 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2312, "rate_mbps": 25000, "delay_s": 7.3984e-07}, "prompt_sha1": "753e6511c9157730ba212340d002a46c80a97024", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_42` for a 42-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_42 (\n input logic signed [41:0] data,\n input logic [5:0] shamt,\n output logic signed [41:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_42", "width": 42, "direction": "right", "arithmetic": true}, "prompt_sha1": "c92898631d9da99c82d9fd5d0bec449c1c0eac8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_3502` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_3502 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_3502"}, "prompt_sha1": "a05d7bd867e54bcafc7ad44369734f70a62c322e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 250 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 250 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 250.0}, "prompt_sha1": "50706c70083ca8be8aad6fa6230e6692653a88b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 2 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×40×10^6 = 80000000 B/s. Time = 131072/80000000 = 0.0016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 2, "rate_mhz": 40, "sec": 0.0016384}, "prompt_sha1": "b24f885a4d0970fb8d9f99bd4be0f7f4e1bcb099", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w28_signed` comparing two 28-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w28_signed (\n input logic signed [27:0] a,\n input logic signed [27:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w28_signed", "width": 28, "signed": true}, "prompt_sha1": "232d217eda806e143798bb3ca4cbe239e30b7cb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 220 ohm has 5 V across it. Compute current and dissipated power.", "output": "I=V/R=5/220=0.0227272727 A. P=V²/R=5²/220=0.113636364 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 5, "r": 220, "i": 0.022727272727272728, "p": 0.11363636363636363}, "prompt_sha1": "027cb8f65edb85144a31664ac324871810927587", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [1, 11, 20, 22]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [1, 32, 47, 54].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [1, 11, 20, 22], "finish": [1, 32, 47, 54]}, "prompt_sha1": "3955bdd6edcb78953d13058c433b0054ea8beb31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_38_16_9` with RED, GREEN, YELLOW states. Hold RED for 38 clock cycles, GREEN for 16, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_38_16_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 37) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 15) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_38_16_9", "red": 38, "green": 16, "yellow": 9}, "prompt_sha1": "157bdc8df9ffb1fd94cc1d16f946686ec8a748c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_547671` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_547671 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_547671"}, "prompt_sha1": "5363b616cce7fdc32c7aa156420b47ea59a02e52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xFB. Extract the 4-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xFB >> 3) & 0xF = 0xF (15).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 3, "value": 251, "mask": 15, "field": 15}, "prompt_sha1": "c9868f21a74e95fad1c656e7fd44dac4abaa06a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_236` generating a one-clock-cycle `tick` every 236 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_236 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 235) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_236", "divide": 236}, "prompt_sha1": "7efe50a1fb88df4b71bb78e8e0ec7f52d0153977", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 22.6 V source drives a 3300 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 22.6-3.3 = 19.3 V.\nI = V/R = 19.3/3300 A = 5.8485 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 22.6, "vf": 3.3, "r": 3300, "current_a": 0.0058484848484848485}, "prompt_sha1": "05daca1fdec3fc80121940213136b09228c9b443", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m10` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 10 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m10 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd10;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m10", "width": 5, "max": 10}, "prompt_sha1": "b3f66c5f4191651e84d56e837802000c4cbe45f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 75%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.060×(12+0.250×150) = 4.170000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.94, "l2": 12, "l2_hit": 0.75, "mem": 150, "amat": 4.170000000000003}, "prompt_sha1": "5ce70e5bb0e1f4f196d26f19fda0c053b132ad68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 240 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 2918 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×2918/(240×10^6) = 0.0243166667 = 2.431667%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 240, "irq_hz": 2000, "cycles": 2918, "load": 0.024316666666666667}, "prompt_sha1": "2c487b2a28a8333de707ae5d450f010610784920", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x20_write_bypass` with 4 entries of 20 bits. Inputs: `clk`, `we`, `2-bit waddr`, `20-bit wdata`, `2-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x20_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [19:0] wdata,\n input logic [1:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x20_write_bypass", "entries": 4, "width": 20, "mode": "write_bypass"}, "prompt_sha1": "a8e0f84c8d9d88b3d0195fff9ec86718acae5048", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 20 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 20 MHz / 4 = 5.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 20000000.0, "divider": 4, "spi_hz": 5000000.0}, "prompt_sha1": "ad3813518496ed5322457fa02c0f62700f211c05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 36 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 36000000/1000 = 36000.\nWith prescaler divisor limited to at most 4096, the largest divisor of 36000 that also keeps the period count within 16 bits is 4000.\nPeriod count = 36000/4000 = 9.\nPSC register = 4000-1 = 3999.\nARR register = 9-1 = 8.\nVerification: 36000000/(4000×9) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 36000000, "target_hz": 1000, "total_division": 36000, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 4000, "period": 9, "psc_reg": 3999, "arr_reg": 8}, "prompt_sha1": "445846873809f0afa28586aa5413dc3705cac8a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9839` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9839 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9839"}, "prompt_sha1": "8212343c852989a365a20ea9e62ca5b4138b156e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 55 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 55 = 58.\nClock pulses = 58×9 = 522.\nTime = 522/1000000 s = 522.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 55, "clocks": 522, "time_s": 0.000522}, "prompt_sha1": "39cec267fe07033f78d7b0d6c7749fa6901b5e28", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_250` generating a one-clock-cycle `tick` every 250 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_250 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 249) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_250", "divide": 250}, "prompt_sha1": "bcd4f12fde259bc5cd2609f53306ce3249e45f6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×32 KiB = 2048 KiB = 2097152 bytes = 2.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 32, "reach": 2097152}, "prompt_sha1": "7675b195fc1d6f3ff50760d0b5a0112b83b139d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 1894. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 1894/16383 × 3 V = 0.346823 V.\nThus the estimated input is about 0.3468 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 1894, "volts": 0.3468229262039919}, "prompt_sha1": "74fa8ec2bb1a17a2614791afe190f6004069c5c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_5788` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_5788 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_5788"}, "prompt_sha1": "ab5d251dda18eac6c9a657589214f6f908a6f656", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 8-way set-associative cache uses 256-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/256 = 4096.\nSets = 4096/8 = 512.\nOffset bits = log2(256) = 8; index bits = log2(512) = 9; tag bits = 57-8-9 = 40.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 256, "ways": 8, "addr_bits": 57, "lines": 4096, "sets": 512, "offset": 8, "index": 9, "tag": 40}, "prompt_sha1": "b7b52d6514741f6d9bf0bd17287cc35a9b196046", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 926, and period is 38401 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(926×38401) = 2.024785 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 926, "period": 38401, "hz": 2.0247852841755214}, "prompt_sha1": "56196e73bb44416f2cbcb6b14577efdf0bee01de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 2000 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 2000/(2000+8) = 0.996016 = 99.60%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 2000, "overhead": 8, "efficiency": 0.9960159362549801}, "prompt_sha1": "3576669e578edb7a49f479df9671fbf214436a94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 24 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 24 = 26.\nClock pulses = 26×9 = 234.\nTime = 234/1000000 s = 234.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 24, "clocks": 234, "time_s": 0.000234}, "prompt_sha1": "bdf044acfee52c69ba738410ece8567e95ced9de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 64-byte lines and 40-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/64 = 512.\nOffset bits = log2(64) = 6.\nIndex bits = log2(512) = 9.\nTag bits = 40-9-6 = 25.\nCheck: 25+9+6 = 40 = 40 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 64, "addr_bits": 40, "lines": 512, "offset_bits": 6, "index_bits": 9, "tag_bits": 25}, "prompt_sha1": "9cebc86a4f8d0245c742c072459b7c6638062dfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w54_signed` comparing two 54-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w54_signed (\n input logic signed [53:0] a,\n input logic signed [53:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w54_signed", "width": 54, "signed": true}, "prompt_sha1": "5103752b3826f1ce8aca63b9897e0c7330d22c92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 233; x = x + 83;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 233+83 = 316. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (316) mod 2^8 = 60. So `x` stores 60. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 233, "add": 83, "result": 60}, "prompt_sha1": "6387033ea4b1b4ed7e726c7631ab91e5b68ceaaa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 80%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.050×(10+0.200×200) = 3.000000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.95, "l2": 10, "l2_hit": 0.8, "mem": 200, "amat": 3.0000000000000018}, "prompt_sha1": "92531b21be28610a2868118f9eee9eeda9238c80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_56` for a 56-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_56 (\n input logic [55:0] data,\n input logic [5:0] shamt,\n output logic [55:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_56", "width": 56, "direction": "left", "arithmetic": false}, "prompt_sha1": "4c2ccbd72b681343919e9656e223989dd82d96c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(4×2400) = 15000.000000.\nNearest integer divisor D = 15000.\nActual baud = 144000000/(4×15000) = 2400.000 baud.\nError = (2400.000-2400)/2400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 4, "baud": 2400, "divisor": 15000, "actual": 2400.0, "error_pct": 0.0}, "prompt_sha1": "8641d13d2a98c1faa290af3052662d3524d5c59d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_4197(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_4197(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_4197([1, 2]) == 1.5\nassert mean_4197([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_4197"}, "prompt_sha1": "e49aca52600379e24216397c5095e02e720dfd31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 248. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 248/1023 × 2.5 V = 0.606061 V.\nThus the estimated input is about 0.6061 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 248, "volts": 0.6060606060606061}, "prompt_sha1": "c4ad865b351952b9864cf23a6cf517917cf4f306", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 2.5 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×2.5/(1×10^9) = 0.05 s = 50.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 2.5, "ghz": 1.0, "sec": 0.05}, "prompt_sha1": "80e93e5030423cd4f9158040001ad190feb8d775", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x40_write_bypass` with 8 entries of 40 bits. Inputs: `clk`, `we`, `3-bit waddr`, `40-bit wdata`, `3-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [39:0] wdata,\n input logic [2:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x40_write_bypass", "entries": 8, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "9f83c0e1ece68255f747f000e6a965032ce6f01e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1987785222, carries 40956 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 40956+1+1 = 40958. ACK = (1987785222+40958) mod 2^32 = 1987826180.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1987785222, "payload": 40956, "syn": 1, "fin": 1, "ack": 1987826180}, "prompt_sha1": "284a3dac733347288e1431473298de97205d076f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 533 elements. Review loop `for i in range(533-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(533-1)` produces indices 0 through 531, so index 532 is skipped. Correct loop: `for i in range(533):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 533, "variant": "miss_last"}, "prompt_sha1": "7c988d4ac16e3d10f11e700051fa9a1e37dd1132", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.237.114.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.237.114.0\nBroadcast address: 10.237.114.7\nUsable host range: 10.237.114.1 to 10.237.114.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.237.114.0/29", "usable": 6, "first": "10.237.114.1", "last": "10.237.114.6", "broadcast": "10.237.114.7"}, "prompt_sha1": "1ed21b87baaf3acdb8cbe6b172c1196fab1de4e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `words` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n acc += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `samples[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n acc += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "2394943752393772f278a8142f00371785da6982", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1280 bytes, IP header 20 bytes, and TCP header 28 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-20-28 = 1232 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 20, "tcphdr": 28, "mss": 1232}, "prompt_sha1": "096027efb2ad720f5e3d551612a85698f88c1a17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `entries` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n result += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `data[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n result += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "864e046d6cf194c31c3f2b0bdb1f9ea04acdc87e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 943 elements. Review loop `for i in range(943-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(943-1)` produces indices 0 through 941, so index 942 is skipped. Correct loop: `for i in range(943):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 943, "variant": "miss_last"}, "prompt_sha1": "279702c52fd1ead512ef0d1a4766e4f1132d182d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=22 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×100/(22+100) = 9.836066 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 22, "r2": 100, "vout": 9.836065573770492}, "prompt_sha1": "eea797661303be00ce04c3e4135a3d993d833d79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3815(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3815(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3815([1, 2]) == 1.5\nassert mean_3815([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3815"}, "prompt_sha1": "51ca96bda5f87b3ae75a1e6178e722a6038a17b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3657205645, carries 5541 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5541+0+1 = 5542. ACK = (3657205645+5542) mod 2^32 = 3657211187.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3657205645, "payload": 5541, "syn": 0, "fin": 1, "ack": 3657211187}, "prompt_sha1": "0041e339df340893d1dfd3363d0e2f8a7d176533", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 4` on one shared integer without synchronization. Assume `credits` initially equals 433. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 433; T2 reads 433; both compute 437; T1 writes 437; T2 writes 437. The observed final value is 437, but two serial increments would produce 441.\n\n```\nlock(mutex)\ncredits = credits + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "3d3c9201dc58f0756adb83604360648257341ad4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 32 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 32×11 = 352. Time = 352/115200 = 0.00305555556 s = 3.055556 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 8, "parity": 0, "stop": 2, "frames": 32, "seconds": 0.0030555555555555557}, "prompt_sha1": "f1bb0e1027d63528e3e4eb0c93c3a38c4687ddb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (768×8) = 813.802083 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 768, "pps": 813.8020833333334}, "prompt_sha1": "0f31a398fcc887be8fd7777c9a0004226c924b05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x64_write_bypass` with 4 entries of 64 bits. Inputs: `clk`, `we`, `2-bit waddr`, `64-bit wdata`, `2-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x64_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [63:0] wdata,\n input logic [1:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x64_write_bypass", "entries": 4, "width": 64, "mode": "write_bypass"}, "prompt_sha1": "bd77236bf796e0f6700779686ba910d04f23b202", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_45` for a 45-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_45 (\n input logic signed [44:0] data,\n input logic [5:0] shamt,\n output logic signed [44:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_45", "width": 45, "direction": "right", "arithmetic": true}, "prompt_sha1": "abb28422fb98c2a16e609a94c53ded8585df1fbc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 75%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.100×(15+0.250×80) = 5.500000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.9, "l2": 15, "l2_hit": 0.75, "mem": 80, "amat": 5.499999999999999}, "prompt_sha1": "0d2e81f46a64b4179e7592872f0ced169a640222", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 6-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^6 V = 0.01953125 V = 19531.250000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 6, "vref": 1.25, "step": 0.01953125}, "prompt_sha1": "57405af0f7ec8b6ca4e88d0510d4baf7b768bab5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_3817` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_3817 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_3817"}, "prompt_sha1": "c92eb8aa42c1e9df0942ebd39670a61c0dee0f2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x20_write_bypass` with 128 entries of 20 bits. Inputs: `clk`, `we`, `7-bit waddr`, `20-bit wdata`, `7-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x20_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [19:0] wdata,\n input logic [6:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x20_write_bypass", "entries": 128, "width": 20, "mode": "write_bypass"}, "prompt_sha1": "6d61af076d197e457f84dc17c0f905f038826bdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 235 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×235/(24×10^6) = 0.0489583333 = 4.895833%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 5000, "cycles": 235, "load": 0.04895833333333333}, "prompt_sha1": "a9d65951a13e9d0bc446bcca9f210f2d01709cab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock DMA then STATE; T2 acquires STATE then DMA. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds DMA while waiting for STATE, while T2 holds STATE while waiting for DMA; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DMA before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "25b898b8917e605e116c901bb00df7694bb4f3d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5958` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5958 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5958"}, "prompt_sha1": "dfb5d9230dacdd8d6713ffa4cb16d662e641a081", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w17_unsigned` comparing two 17-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w17_unsigned (\n input logic [16:0] a,\n input logic [16:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w17_unsigned", "width": 17, "signed": false}, "prompt_sha1": "a32b7d20c0cf5764ec09eb8b8c63b1f41b9adbd5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 3` on one shared integer without synchronization. Assume `counter` initially equals 379. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 379; T2 reads 379; both compute 382; T1 writes 382; T2 writes 382. The observed final value is 382, but two serial increments would produce 385.\n\n```\nlock(mutex)\ncounter = counter + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "31e7ee0fd080b0439c504c34d9b276a42b4390c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6874-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6874×8 = 54992 bits.\nSerialization delay = bits/rate = 54992/(2500×10^6) s = 2.19968e-05 s = 21.996800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6874, "rate_mbps": 2500, "delay_s": 2.19968e-05}, "prompt_sha1": "69073eb0831b7e2a9a58ab9887984e71e1743a49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 7.1 V source drives a 4700 ohm resistor in series with an LED whose forward voltage is assumed to be 1.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 7.1-1.6 = 5.5 V.\nI = V/R = 5.5/4700 A = 1.1702 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 7.1, "vf": 1.6, "r": 4700, "current_a": 0.001170212765957447}, "prompt_sha1": "69e4562cb06a63736401d525fc8a150c92e1282f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 8 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×80×10^6 = 640000000 B/s. Time = 1048576/640000000 = 0.0016384 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 8, "rate_mhz": 80, "sec": 0.0016384}, "prompt_sha1": "db32933eea0a983f4f1becca35add5a0c7db961d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 640.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 640.5+16 = 656.5. Period = 656.5/10000000 = 6.565e-05 s. Maximum rate = 1/period = 15232.292460 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 640.5, "conv_cycles": 16, "period": 6.565e-05, "rate": 15232.292460015233}, "prompt_sha1": "46c211d3b6ca0253a0c3d0f97f7a2d4c98302d64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 4634 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 50000×4634/(72×10^6) = 3.21805556 = 321.805556%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 50000, "cycles": 4634, "load": 3.2180555555555554}, "prompt_sha1": "06758a61d7004cd7ae1b6b0660bb90c94f981cd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "4fc785e9d8378a87f64514389f142737de1a30b5", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "32936389616f79f659529746db083fb7c8a37fd4cb261ad51b50b0295210e524", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 6323, "original_row_sha256": "171773f528eaeacafb6298ce07bf085bf5d3e393f82e3ea81f80fb3ba562ac11", "version": "v1.0.0-rc1"}}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11100010110100111100 using generator polynomial bits 111000011. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11011100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 451, "msg_bits": 20, "msg": 929084, "remainder": 220}, "prompt_sha1": "6b527ecc0e5f24180e5f3c7f5ea467e05f36d668", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5950-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5950×8 = 47600 bits.\nSerialization delay = bits/rate = 47600/(100×10^6) s = 0.000476 s = 476.000000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5950, "rate_mbps": 100, "delay_s": 0.000476}, "prompt_sha1": "e13f49c3b15c71c1971b511be24073c2bdca0421", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['V', 'V', 'V', 'V', 'V', 'V', 'V', 'V', 'V', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 12 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["V", "V", "V", "V", "V", "V", "V", "V", "V", "P", "P", "V", "V", "V", "P", "V", "P", "P", "P"], "value": 12, "blocked": 0}, "prompt_sha1": "b3c5b7d5a05a6ad5f0f73599308f1d64bf2696b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1024 bytes over a datapath transferring 8 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×4×10^6 = 32000000 B/s. Time = 1024/32000000 = 3.2e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1024, "width": 8, "rate_mhz": 4, "sec": 3.2e-05}, "prompt_sha1": "30d67301b4d1eb73d2bc7d363451a03bd07b3240", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_4591` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_4591 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_4591", "width": 8}, "prompt_sha1": "8a7f1ba32d49a0926ec22b39b8be9ca933ca16b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 1.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+10 = 11.5. Period = 11.5/64000000 = 1.796875e-07 s. Maximum rate = 1/period = 5565217.391304 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 1.5, "conv_cycles": 10, "period": 1.796875e-07, "rate": 5565217.391304348}, "prompt_sha1": "051f5c12294b943b236c8f43af154b41e811947e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 7443. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 7443/65535 × 3.3 V = 0.374791 V.\nThus the estimated input is about 0.3748 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 7443, "volts": 0.3747905699244678}, "prompt_sha1": "ec320bc1c10365123e5ea8b14c0bc2f5dc1bf12e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `count` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n result += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `a[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n result += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b45d9033ab8120b60737d17f492a4586ab4e66b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6443(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6443(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6443([1, 2]) == 1.5\nassert mean_6443([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6443"}, "prompt_sha1": "88eb928e4b6e2d7c89f217a880ed362817db26ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 28801 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 28801/1000 s; frequency = 1000/28801 = 0.034721 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 28801, "hz": 0.034721016631366966}, "prompt_sha1": "3997645712710baa106bcb55e565575621096cc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.40. Using Amdahl's law, compute the theoretical speedup on 96 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.40) + 0.40/96) = 1.655172.\nThe theoretical speedup is about 1.655×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.4, "n": 96, "result": 1.6551724137931036}, "prompt_sha1": "1c54ef22243d040ab3126adeac9fa418623aa246", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x20_no_bypass` with 128 entries of 20 bits. Inputs: `clk`, `we`, `7-bit waddr`, `20-bit wdata`, `7-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x20_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [19:0] wdata,\n input logic [6:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x20_no_bypass", "entries": 128, "width": 20, "mode": "no_bypass"}, "prompt_sha1": "1db987a869bb36a520f42c807f8d2e95252a99d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1800 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 1800 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 1800.0}, "prompt_sha1": "958f85c447c8986e1f7c39d1fab92ba4d01e1b4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w64_4552` implementing a dual-clock asynchronous FIFO with depth 32 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w64_4552 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 64,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w64_4552", "depth": 32, "width": 64, "ptr_w": 5}, "prompt_sha1": "a4f0cec4dfbeb11ce8aeeccd50293853cadc5772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2500 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2500×10^6×80/1000/8 = 25000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2500, "rtt_ms": 80, "bytes": 25000000.0}, "prompt_sha1": "aa492dcf13aceee691b69bf9ece16e2aa9b472ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNNNNTNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 0, 0, 0, 1, 0, 1, 0], "final_state": 0}, "prompt_sha1": "cefa3fd15d5fff2e5a57f34a44f6f8dc3e18a4a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 1024. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/50 = 3360000.\nWith prescaler divisor limited to at most 1024, the largest divisor of 3360000 that also keeps the period count within 16 bits is 1000.\nPeriod count = 3360000/1000 = 3360.\nPSC register = 1000-1 = 999.\nARR register = 3360-1 = 3359.\nVerification: 168000000/(1000×3360) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 50, "total_division": 3360000, "max_prescaler": 1024, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1000, "period": 3360, "psc_reg": 999, "arr_reg": 3359}, "prompt_sha1": "ec25c687a39adb872a13f46f74a097de8c66964d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_7` generating a one-clock-cycle `tick` every 7 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_7 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 6) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_7", "divide": 7}, "prompt_sha1": "b7f8494655f369eba08dd9179532516e9d725d31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 20-bit ADC spanning 0 to 4.096 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.096/2^20 V = 3.90625e-06 V = 3.906250 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 20, "vref": 4.096, "step": 3.90625e-06}, "prompt_sha1": "28f7d62ad360ab614d0f31d09ed620850bb9d686", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_100_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 100 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_100_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd100;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_100_ignore", "cycles": 100, "retrigger": false}, "prompt_sha1": "5bc18cdfde6a58523bc64e32e264419173e49fb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 240 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 240 MHz / 4 = 60.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 240000000.0, "divider": 4, "spi_hz": 60000000.0}, "prompt_sha1": "b4bb951ac73bd7c513eb578794ee8f8700eb40ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 256 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 256/(32×10^6) s = 8.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 256, "time_us": 8.0}, "prompt_sha1": "7a26109acf0e646a9254a8a8b67e678217ea6816", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_5_5444` converting a 5-bit binary input `bin` to 5-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_5_5444 (\n input logic [4:0] bin,\n output logic [4:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_5_5444", "width": 5}, "prompt_sha1": "100116a66a280793cbd8d7f0cb146736236b0a71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 1000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×1000×10^6×8 = 32.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 1000, "channels": 8, "gbps": 32.0}, "prompt_sha1": "8bd42cae4cf62815c7407bf36b6f6ee03598acd5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 10%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.100 × 2 = 0.050000.\nEffective CPI = 1.2 + 0.050000 = 1.250000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.1, "penalty": 2, "result": 1.25}, "prompt_sha1": "c6fe9832c8ad62cfb13d2eee574d462644b71ea9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 256-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/256 = 512.\nOffset bits = log2(256) = 8.\nIndex bits = log2(512) = 9.\nTag bits = 52-9-8 = 35.\nCheck: 35+9+8 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 256, "addr_bits": 52, "lines": 512, "offset_bits": 8, "index_bits": 9, "tag_bits": 35}, "prompt_sha1": "1d3a68824cacd9a50c1387b18345f56767b32ffb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1125 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0688800a097562db8fc06a4f9b932d351d782f36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xAB0B8CBD. Extract the 2-bit field starting at bit 29 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xAB0B8CBD >> 29) & 0x3 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 2, "lsb": 29, "value": 2869660861, "mask": 3, "field": 1}, "prompt_sha1": "2d496b10891ba1919dd832749e7a0173b301a0b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x16_write_bypass` with 64 entries of 16 bits. Inputs: `clk`, `we`, `6-bit waddr`, `16-bit wdata`, `6-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [15:0] wdata,\n input logic [5:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x16_write_bypass", "entries": 64, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "0f1a257a0e4ebe8c4926137bf51eb3e8aef28ecb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_2509` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_2509 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_2509", "width": 24}, "prompt_sha1": "3cb6a4bd5234e598bd1182e570dac7019d49477c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 6000 payload bytes plus 44 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 6000/(6000+44) = 0.992720 = 99.27%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 6000, "overhead": 44, "efficiency": 0.9927200529450695}, "prompt_sha1": "f7c0eabfdccbd413e51aebba3afaefb368e1ded6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_18_lsb` for `18-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_18_lsb (\n input logic [17:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 17; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_18_lsb", "width": 18, "priority": "low"}, "prompt_sha1": "3d9fffd6561e6478d1ee92a5c9e744cef785fa26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x40_no_bypass` with 128 entries of 40 bits. Inputs: `clk`, `we`, `7-bit waddr`, `40-bit wdata`, `7-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [39:0] wdata,\n input logic [6:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x40_no_bypass", "entries": 128, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "561386f60dab28e5560eedad1712806d5245db73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock TX then IO; consumer acquires IO then TX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds TX while waiting for IO, while consumer holds IO while waiting for TX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "d12889cfda9426ee167a153c31f8fc6d4cb932c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2684 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "53729fb4ffc6e840c2650dc89aa1e58432142b97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 256 = 0.031250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 256, "spi_hz": 31250.0}, "prompt_sha1": "29be5209c223c19d7ee89d7ef8bf39b55af49eb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_90_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 90 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_90_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd90;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_90_ignore", "cycles": 90, "retrigger": false}, "prompt_sha1": "2525c0ab90793c1ef935b62c9638aa2fd37ec462", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock B then CACHE; task_B acquires CACHE then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds B while waiting for CACHE, while task_B holds CACHE while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "255cc24b080cdc5980365250c7fe7139336ad9cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 4194563751, carries 5368 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 5368+1+1 = 5370. ACK = (4194563751+5370) mod 2^32 = 4194569121.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 4194563751, "payload": 5368, "syn": 1, "fin": 1, "ack": 4194569121}, "prompt_sha1": "9726d3038955cae08d29fb5c1f30a77d74a3559b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1F3273210A97752B in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 1F 32 73 21 0A 97 75 2B.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 2247985749760111915, "endian": "big", "bytes": [31, 50, 115, 33, 10, 151, 117, 43]}, "prompt_sha1": "84140bc5280025d2f36baa6e588f2c9d5999be48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_35_52_18` with RED, GREEN, YELLOW states. Hold RED for 35 clock cycles, GREEN for 52, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_35_52_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 34) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 51) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_35_52_18", "red": 35, "green": 52, "yellow": 18}, "prompt_sha1": "b8fb75c18c7ec234aee6baf760f0eb7b248379be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 120 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 120000000/(16×38400) = 195.312500.\nNearest integer divisor D = 195.\nActual baud = 120000000/(16×195) = 38461.538 baud.\nError = (38461.538-38400)/38400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 120000000, "oversample": 16, "baud": 38400, "divisor": 195, "actual": 38461.53846153846, "error_pct": 0.1602564102564088}, "prompt_sha1": "52ac601cbc814038cc6537638fbd6edad4c74ec0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22000 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/22000=0.000113636364 A. P=V²/R=2.5²/22000=0.000284090909 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 22000, "i": 0.00011363636363636364, "p": 0.0002840909090909091}, "prompt_sha1": "340675a7ba6406ce84ff1bb3bd7a1d93343b09a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 6000 payload bytes plus 96 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 6000/(6000+96) = 0.984252 = 98.43%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 6000, "overhead": 96, "efficiency": 0.984251968503937}, "prompt_sha1": "b9e9b62bec26d56898443300aef2642f78afa7f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.40. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.40) + 0.40/32) = 1.632653.\nThe theoretical speedup is about 1.633×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.4, "n": 32, "result": 1.63265306122449}, "prompt_sha1": "ec66eee6426c03d1e5838626e0da99cd4a234543", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.181.21.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.181.21.0\nBroadcast address: 10.181.21.15\nUsable host range: 10.181.21.1 to 10.181.21.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.181.21.0/28", "usable": 14, "first": "10.181.21.1", "last": "10.181.21.14", "broadcast": "10.181.21.15"}, "prompt_sha1": "5a6acc91068daebd49400ee2ad5fa858618dd2c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=2.2 nF and is stepped to 2.5 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=2.5(1-e^-0.5)=0.983673 V; τ=1.034e-05 s and t=5.17e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 2.2000000000000003e-09, "multiple": 0.5, "vin": 2.5, "vc": 0.9836733507184164}, "prompt_sha1": "0ed135319dd49e8d8ea6092e47a8d1ca22275678", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w9_unsigned` comparing two 9-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w9_unsigned (\n input logic [8:0] a,\n input logic [8:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w9_unsigned", "width": 9, "signed": false}, "prompt_sha1": "a6719cf44ddc7a4ad7d9e15152c7e4825be02558", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 16-way set-associative cache uses 32-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/32 = 32768.\nSets = 32768/16 = 2048.\nOffset bits = log2(32) = 5; index bits = log2(2048) = 11; tag bits = 36-5-11 = 20.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 32, "ways": 16, "addr_bits": 36, "lines": 32768, "sets": 2048, "offset": 5, "index": 11, "tag": 20}, "prompt_sha1": "7cc793f7cae44bdc9815114cfc84404fa8e69bb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 42-bit right-shift register module `shiftreg_right_42`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `42-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_42 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [41:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[41:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_42", "width": 42, "direction": "right"}, "prompt_sha1": "20f186171a83ba577b89a4bac3481f8211b49c96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 17-bit up/down counter `updown_17_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_17_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [16:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 17'd131071) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_17_sat", "width": 17, "wrap": false}, "prompt_sha1": "fd15798d7ca1701fd632cfccfc5ba7289831e283", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_64_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 64 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_64_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd64;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_64_ignore", "cycles": 64, "retrigger": false}, "prompt_sha1": "3a7af22159b7bb5f8daed940db54b19c3c509a7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 39.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+20 = 59.5. Period = 59.5/8000000 = 7.4375e-06 s. Maximum rate = 1/period = 134453.781513 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 39.5, "conv_cycles": 20, "period": 7.4375e-06, "rate": 134453.78151260503}, "prompt_sha1": "24d92a6a75b90b4487882810ee0a56758973e84f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_6675(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_6675(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_6675([1, 2]) == 1.5\nassert mean_6675([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_6675"}, "prompt_sha1": "33bd961220e0a804c093290811b797542f9ef5cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 1.5 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×1.5/(3.5×10^9) = 0.0428571429 s = 42.857143 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 1.5, "ghz": 3.5, "sec": 0.04285714285714286}, "prompt_sha1": "441dffc78a2b1d506fbb4175707f9956ce378b5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 256 payload bytes plus 96 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 256/(256+96) = 0.727273 = 72.73%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 256, "overhead": 96, "efficiency": 0.7272727272727273}, "prompt_sha1": "e92ddc28b89dbd4a5b49bb8b1480627236e6029c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=10 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/100 = -0.100000.\nVout = A_v×Vin = -0.100000×0.1 = -0.010000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 10, "vin": 0.1, "gain": -0.1, "vout": -0.010000000000000002}, "prompt_sha1": "3bc3c684a809203dade1bc3c51338aada1bffbc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m31023` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 31023 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m31023 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd31023;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m31023", "width": 16, "max": 31023}, "prompt_sha1": "afca2007649f17dd179a2530a762553cfd71cf8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1×10^6 × 3/1000 = 3000 bits = 375 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1, "rtt_ms": 3, "bits": 3000.0, "bytes": 375.0}, "prompt_sha1": "96a1ebc619f85aab589b1e2398197475610c5e77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 100110110110011111111111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 18 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "100110110110011111111111", "ones": 18, "parity": 0}, "prompt_sha1": "ed79aa24e17e58f0799f7843e03ca3cfcaae9908", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 4` on one shared integer without synchronization. Assume `requests` initially equals 211. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 211; T2 reads 211; both compute 215; T1 writes 215; T2 writes 215. The observed final value is 215, but two serial increments would produce 219.\n\n```\nlock(mutex)\nrequests = requests + 4\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "0b18a552b5e26716ccd2e9bbea6dc5f79ce3bf0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w32_8543` implementing a dual-clock asynchronous FIFO with depth 8 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w32_8543 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 32,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w32_8543", "depth": 8, "width": 32, "ptr_w": 3}, "prompt_sha1": "b49e0ac04b93745ae49bf3bd80a6573317acebd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x16_write_bypass` with 16 entries of 16 bits. Inputs: `clk`, `we`, `4-bit waddr`, `16-bit wdata`, `4-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_16x16_write_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [15:0] wdata,\n input logic [3:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x16_write_bypass", "entries": 16, "width": 16, "mode": "write_bypass"}, "prompt_sha1": "ace85246721ea5da4909d57bb2323b7218cc5e8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2500 Mbit/s and RTT 120 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2500×10^6 × 120/1000 = 3e+08 bits = 3.75e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2500, "rtt_ms": 120, "bits": 300000000.0, "bytes": 37500000.0}, "prompt_sha1": "4bf81806464b62ef82b8af3e29fe4b732219f4fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 20 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 20 MHz / 8 = 2.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 20000000.0, "divider": 8, "spi_hz": 2500000.0}, "prompt_sha1": "65d39d0c6a1333d9fcaea8574aad92ec6253dc0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w27_cin` implementing a 27-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `27-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w27_cin (\n input logic [26:0] a,\n input logic [26:0] b,\n input logic cin,\n output logic [26:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w27_cin", "width": 27, "cin": true}, "prompt_sha1": "7eb18cd35553eea34a4eeef8124916124fe1f438", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_7029(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_7029(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_7029([1, 2]) == 1.5\nassert mean_7029([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_7029"}, "prompt_sha1": "6389d680cc573ab99404c088542914ddc8554a97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 300/1000 = 6e+08 bits = 7.5e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 300, "bits": 600000000.0, "bytes": 75000000.0}, "prompt_sha1": "3c29f88d74e4c59507562607013db7cec91a9270", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 3799 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×3799/(64×10^6) = 0.0296796875 = 2.967969%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 500, "cycles": 3799, "load": 0.0296796875}, "prompt_sha1": "07c3d76f8507b0ab25ee3880d8dec1063d013d07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock BUF then DMA; T2 acquires DMA then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds BUF while waiting for DMA, while T2 holds DMA while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before DMA. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "1af01e101812033380b0e248ee5cbaad594a7a95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 34-bit up/down counter `updown_34_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_34_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [33:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_34_wrap", "width": 34, "wrap": true}, "prompt_sha1": "9a2874b06b4b31257c991bf88c85ef5c02cca255", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w42_cin` implementing a 42-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `42-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w42_cin (\n input logic [41:0] a,\n input logic [41:0] b,\n input logic cin,\n output logic [41:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w42_cin", "width": 42, "cin": true}, "prompt_sha1": "92ca3b71a7f0ab8b4f2a5031071c28c5c9d5561d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x24_write_bypass` with 32 entries of 24 bits. Inputs: `clk`, `we`, `5-bit waddr`, `24-bit wdata`, `5-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x24_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [23:0] wdata,\n input logic [4:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x24_write_bypass", "entries": 32, "width": 24, "mode": "write_bypass"}, "prompt_sha1": "29bc086f3bf7e44f2a30c569c13647076f093063", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock RX then BUF; worker_2 acquires BUF then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds RX while waiting for BUF, while worker_2 holds BUF while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "04c867fc3c89d6c3c596f2d9b6868e4c22cae05d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x2F, set bit 5 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 5)`. Result = 0x2F.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 47, "bit": 5, "op": "set", "result": 47}, "prompt_sha1": "a87c73f831d1b2bc2fdb85e2dc1cd205631fe4da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5711 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5711/(5711+40+8) = 0.991665 = 99.17%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5711, "iphdr": 40, "eff": 0.9916652196561903}, "prompt_sha1": "5173653c8a4d3c0f6ca8f4169707db9b21b69316", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 330 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/330=0.0272727273 A. P=V²/R=9²/330=0.245454545 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 330, "i": 0.02727272727272727, "p": 0.24545454545454545}, "prompt_sha1": "f1778241e63533fc4a8fae68bb264fcd0e95f089", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "P", "P", "V", "P", "V", "P", "V", "P", "V", "V", "V", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "e9b427840b0a91da5bc0922000f7a6d346d3786e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2949(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2949(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2949([1, 2]) == 1.5\nassert mean_2949([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2949"}, "prompt_sha1": "7621cdd73f39bac41c7b473b9a352d96e1206f37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 13 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 13 = 15.\nClock pulses = 15×9 = 135.\nTime = 135/1000000 s = 135.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 13, "clocks": 135, "time_s": 0.000135}, "prompt_sha1": "28932c47316af9db4f2ec93799a8127c252fda91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 5e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×500000 = 1000000 Hz. Proposed rate 5e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500000, "min_fs": 1000000, "proposed": 5000000}, "prompt_sha1": "e580eec0a6ab8c72b64137f0adb3076065312b68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 10 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×10/1000/8 = 12500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 10, "bytes": 12500.0}, "prompt_sha1": "e0a8fb57d033c0c78c7c876261cab0c22ccee11b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NNNNTNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 0, 0, 0, 1, 0, 0, 0], "final_state": 0}, "prompt_sha1": "31e87dfc134721c959e8b267620d276e44055ae0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 9 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×9²=0.0019035 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 9, "energy": 0.0019034999999999998}, "prompt_sha1": "0ba31e5210f62fc67207aa371d59172e74a232b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=1 nF and is stepped to 2.5 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=2.5(1-e^-0.5)=0.983673 V; τ=0.0001 s and t=5e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 1e-09, "multiple": 0.5, "vin": 2.5, "vc": 0.9836733507184164}, "prompt_sha1": "5ee161da8067c451e40dc2e85406c041c47b3e34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=100 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/2.2 = -45.454545.\nVout = A_v×Vin = -45.454545×0.1 = -4.545455 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 100, "vin": 0.1, "gain": -45.45454545454545, "vout": -4.545454545454546}, "prompt_sha1": "e9d7decf6413c375d2c337c9272195ac89628d3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×820)/(47000+820) = 805.938938 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 820, "req": 805.9389376829779}, "prompt_sha1": "36edf7de4ed5fcd663b1f742516c87dd28cd4c7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w33_unsigned` comparing two 33-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w33_unsigned (\n input logic [32:0] a,\n input logic [32:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w33_unsigned", "width": 33, "signed": false}, "prompt_sha1": "56d62bdff6246b7364364ef441a925d4c269fbfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 800 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 4515 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×4515/(800×10^6) = 0.0112875 = 1.128750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 800, "irq_hz": 2000, "cycles": 4515, "load": 0.0112875}, "prompt_sha1": "bb8bc6f12f47519e4f7c1e9d1ad9d4dbc1a8b532", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 4 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×4/(5×10^9) = 0.08 s = 80.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 4.0, "ghz": 5.0, "sec": 0.08}, "prompt_sha1": "1e321c9b419b7ef34365d97df40cb64b744d73ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 576 bytes, IP header 20 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 576-20-52 = 504 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 576, "iphdr": 20, "tcphdr": 52, "mss": 504}, "prompt_sha1": "343516cb39f7b7ecb1508189474f1a50de2cd892", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w38_nocin` implementing a 38-bit unsigned adder with inputs `a`, `b` and outputs `38-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w38_nocin (\n input logic [37:0] a,\n input logic [37:0] b,\n output logic [37:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w38_nocin", "width": 38, "cin": false}, "prompt_sha1": "f0bfc1fa27aa538d13122b86c4370f0dc79b15b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1200 baud with 1 start bit, 6 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 19 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+0+1 = 8. Total bits = 19×8 = 152. Time = 152/1200 = 0.126666667 s = 126.666667 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1200, "data": 6, "parity": 0, "stop": 1, "frames": 19, "seconds": 0.12666666666666668}, "prompt_sha1": "173d2332c0cc402e4f3fd5037c5ad57a69236d6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0111100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0111100", "ones": 4, "parity": 0}, "prompt_sha1": "51fd483d0c5967c5358f5ee05737ea4889056f11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 81 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 81/(81+20+8) = 0.743119 = 74.31%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 81, "iphdr": 20, "eff": 0.7431192660550459}, "prompt_sha1": "c1a22dcb101156f0e28a2033e7bfb58e077dc498", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(1×10^6) s = 512.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 512, "time_us": 512.0}, "prompt_sha1": "d6c1950853a3b3771385259b4d59379f4353008c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x6E87 in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 6E 87.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 28295, "endian": "big", "bytes": [110, 135]}, "prompt_sha1": "c699f3d81527c4bd93f259e42a604994b059883e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4543 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4543/(4543+40+8) = 0.989545 = 98.95%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4543, "iphdr": 40, "eff": 0.9895447614898715}, "prompt_sha1": "c227df203a90572779484e3f3cc7e56fd8c376dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=5 ms, C=1 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/5 + 1/100 = 0.410000 = 41.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 5], [1, 100]], "utilization": 0.41000000000000003}, "prompt_sha1": "49ff9f686735cac9f0c5b05975ef95faae4a7bf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 240 MHz and must generate an exact 100 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 240000000/100 = 2400000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 2400000 that also keeps the period count within 16 bits is 2000.\nPeriod count = 2400000/2000 = 1200.\nPSC register = 2000-1 = 1999.\nARR register = 1200-1 = 1199.\nVerification: 240000000/(2000×1200) = 100 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 240000000, "target_hz": 100, "total_division": 2400000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 2000, "period": 1200, "psc_reg": 1999, "arr_reg": 1199}, "prompt_sha1": "10e58331d046bea6aa096df9ef31632fe977bbb1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-24 = 1476 bytes.\nRound down to an 8-byte multiple: floor((1476)/8)×8 = 1472 bytes.\nFragments required = ceil(3000/1472) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 24, "payload": 3000, "max_payload": 1472, "fragments": 3}, "prompt_sha1": "fba0ce15267adf887e1d64e5ae6b3be6d5ed2eb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m141` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 141 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m141 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd141;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m141", "width": 8, "max": 141}, "prompt_sha1": "46a147e3a85a51bee7fc2b14705ec8e30a4d428f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 7 and initial occupancy is 5. In an abstract batch, producer attempts to enqueue 93 items first, dropping any excess beyond capacity; then consumer removes up to 22 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=7, dropped=91; consumed=7; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 7, "start": 5, "prod": 93, "cons": 22, "dropped": 91, "consumed": 7, "final": 0}, "prompt_sha1": "2edbe9c0110c9b76cfc30d28eb4b005f836a7f71", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w64_3529` implementing a dual-clock asynchronous FIFO with depth 64 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w64_3529 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 64,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w64_3529", "depth": 64, "width": 64, "ptr_w": 6}, "prompt_sha1": "b78a5f4387c2cb800defd01a86ef4b2c25a0d978", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x9997110F16 in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 99 97 11 0F 16.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 659664473878, "endian": "big", "bytes": [153, 151, 17, 15, 22]}, "prompt_sha1": "18d54b73fba645d06fc1a6503a74fae19fc1ce09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 160 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 631 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×631/(160×10^6) = 0.01971875 = 1.971875%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 160, "irq_hz": 5000, "cycles": 631, "load": 0.01971875}, "prompt_sha1": "5bda49c3e38bafb69e8b6f20ad39c414ef13b70d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-40 = 1360 bytes.\nRound down to an 8-byte multiple: floor((1360)/8)×8 = 1360 bytes.\nFragments required = ceil(6000/1360) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 40, "payload": 6000, "max_payload": 1360, "fragments": 5}, "prompt_sha1": "f7bbbd19de7121deba1a6db3ec6b004a261291af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5355` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5355 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5355"}, "prompt_sha1": "b699d5794ba9fe7295bcdcdb1229c9fda106e2d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 736, and period is 13949 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(736×13949) = 15.584723 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 736, "period": 13949, "hz": 15.584723230900142}, "prompt_sha1": "08a6340bd6bb100fa08528830e770df6dc7fa77e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock L1 then STATE; worker_2 acquires STATE then L1. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds L1 while waiting for STATE, while worker_2 holds STATE while waiting for L1; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire L1 before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "12e106caadf33bfdbb730ea8739a04e17b30bad7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_3_45_17` with RED, GREEN, YELLOW states. Hold RED for 3 clock cycles, GREEN for 45, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_3_45_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 2) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 44) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_3_45_17", "red": 3, "green": 45, "yellow": 17}, "prompt_sha1": "9b570dc3ec827406fb4b0c3c67e1370383a95e2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_3029` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_3029 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_3029", "width": 24}, "prompt_sha1": "5c4fda94fd81b50f3111a2a5acd5f507022fc299", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3 V reference and returns code 2347. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 2347/65535 × 3 V = 0.107439 V.\nThus the estimated input is about 0.1074 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.0, "code": 2347, "volts": 0.1074387731746395}, "prompt_sha1": "08b040696d3db9c4ad0894caeccb64ed20bbaac6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_76` for a synchronous sampled input `noisy`. Update output `clean` only after observing 76 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_76 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 75) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_76", "stable_samples": 76}, "prompt_sha1": "8224322d09bb5fa7afd013cf18ebdc39339aaf1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m29` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 29 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m29 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd29;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m29", "width": 5, "max": 29}, "prompt_sha1": "475e8261e7f31b2861fc7d0b30377f4ed9c03ac0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=4.7 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/22 = -0.213636.\nVout = A_v×Vin = -0.213636×0.05 = -0.010682 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 4.7, "vin": 0.05, "gain": -0.21363636363636365, "vout": -0.010681818181818183}, "prompt_sha1": "80aabe6d406c2ecb05dadf30cf50ca678e8c4f37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 672 elements. Review loop `for i in range(672-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(672-1)` produces indices 0 through 670, so index 671 is skipped. Correct loop: `for i in range(672):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 672, "variant": "miss_last"}, "prompt_sha1": "d67279e9cdec50a05911228efc5122ed6f5b5310", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_17_23_18` with RED, GREEN, YELLOW states. Hold RED for 17 clock cycles, GREEN for 23, and YELLOW for 18; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_17_23_18 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 16) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 22) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 17) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_17_23_18", "red": 17, "green": 23, "yellow": 18}, "prompt_sha1": "20a63c41844f9d17c6c0e2429c671417003b993d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1871 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "f770948c0cbf4857e20e54a6189a50d726ddfce1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_77` generating a one-clock-cycle `tick` every 77 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_77 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 76) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_77", "divide": 77}, "prompt_sha1": "036986b765f5237d4030a01199e571358929bf84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=27000 ohm and C=8200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=27000×8200000×10^-12 s = 0.2214 s.\nf_c=1/(2πRC)=1/(2π×27000×8200000×10^-12) = 0.7189 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 27000, "c_f": 8.2e-06, "tau": 0.22139999999999999, "fc": 0.7188570148685427}, "prompt_sha1": "411de6c6e95c651fbac7a0eb134a620d2fdf28d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 192 data bits per transfer at 2400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 192/8 = 24. Bandwidth = 24×2400×10^6×4 = 230.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 192, "rate_mt": 2400, "channels": 4, "gbps": 230.4}, "prompt_sha1": "a5c288108eee63aadcdbbbd0a761dbfeb9e9a6dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w32_2683` implementing a dual-clock asynchronous FIFO with depth 16 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w32_2683 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 32,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w32_2683", "depth": 16, "width": 32, "ptr_w": 4}, "prompt_sha1": "58415bb1d01cd485a17b05633535a6e6f8c20422", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 5.1 V source drives a 2200 ohm resistor in series with an LED whose forward voltage is assumed to be 2.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 5.1-2.3 = 2.8 V.\nI = V/R = 2.8/2200 A = 1.2727 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 5.1, "vf": 2.3, "r": 2200, "current_a": 0.0012727272727272726}, "prompt_sha1": "45b2b83544f145ae5e0aff1d621712e9bfec0a83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 16 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 2921 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×2921/(16×10^6) = 0.09128125 = 9.128125%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 16, "irq_hz": 500, "cycles": 2921, "load": 0.09128125}, "prompt_sha1": "d93b130ecffdf79973001b21bf67bab040c7fb15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'V', 'P', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "V", "V", "V", "P", "P", "P", "P", "V", "P", "P", "P", "P", "P", "P", "V", "V", "P"], "value": 5, "blocked": 0}, "prompt_sha1": "44342cf10849a4fb1b99a82f03bb95ef14ca5ec3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4883-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4883×8 = 39064 bits.\nSerialization delay = bits/rate = 39064/(10×10^6) s = 0.0039064 s = 3906.400000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4883, "rate_mbps": 10, "delay_s": 0.0039064}, "prompt_sha1": "1eab2efd9c7aeab80fb792a69624eded5a3c07dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 2 MHz, prescaler divisor is 965, and period is 21922 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 2000000/(965×21922) = 0.094542 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 2000000, "prescaler": 965, "period": 21922, "hz": 0.09454150442950583}, "prompt_sha1": "82c237870f58393e367a6c6702416b16c1951359", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 382 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×382/(72×10^6) = 0.00106111111 = 0.106111%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 200, "cycles": 382, "load": 0.0010611111111111112}, "prompt_sha1": "d32ca46525c90da6bc3c9ee4a5da78f015b8de7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_36_48_2` with RED, GREEN, YELLOW states. Hold RED for 36 clock cycles, GREEN for 48, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_36_48_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 35) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 47) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_36_48_2", "red": 36, "green": 48, "yellow": 2}, "prompt_sha1": "ea5c246a388949aaca55c2d93f644da0757c5777", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22×12000)/(22+12000) = 21.959740 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22, "r2": 12000, "req": 21.959740475794376}, "prompt_sha1": "b810350a260995595b253f8db1eee23a2ff43b95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 180 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16384. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 180000000/800 = 225000.\nWith prescaler divisor limited to at most 16384, the largest divisor of 225000 that also keeps the period count within 16 bits is 15000.\nPeriod count = 225000/15000 = 15.\nPSC register = 15000-1 = 14999.\nARR register = 15-1 = 14.\nVerification: 180000000/(15000×15) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 180000000, "target_hz": 800, "total_division": 225000, "max_prescaler": 16384, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 15000, "period": 15, "psc_reg": 14999, "arr_reg": 14}, "prompt_sha1": "3f02b03fab2581d6cd49b112064dd57fd25e68d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 10 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-05×12²=0.00072 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-06, "v": 12, "energy": 0.0007199999999999999}, "prompt_sha1": "fcdb94f745caf59ffcc44fc6f08023a2e744cc3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_758047` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_758047 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_758047"}, "prompt_sha1": "ed115125042e5b2a5e13dda5ea61189000c69dca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=22000 ohm and C=5600000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=22000×5600000×10^-12 s = 0.1232 s.\nf_c=1/(2πRC)=1/(2π×22000×5600000×10^-12) = 1.2918 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 22000, "c_f": 5.6e-06, "tau": 0.12319999999999999, "fc": 1.291842070551099}, "prompt_sha1": "f88e22afdfe70a3bf9b89691aee304f60655952f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 205 and tail index 281, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (205-281) mod 1024 = 948. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 205, "tail": 281, "occupancy": 948}, "prompt_sha1": "b4801f4a578fd7adb1331599b336ac4519ed6746", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xED6E38AA90915E59 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 59 5E 91 90 AA 38 6E ED.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 17108674339648134745, "endian": "little", "bytes": [89, 94, 145, 144, 170, 56, 110, 237]}, "prompt_sha1": "6a6c394570dcffe22c738edb6714e0d201339f85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x010250DC. Extract the 5-bit field starting at bit 18 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x10250DC >> 18) & 0x1F = 0x0 (0).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 18, "value": 16928988, "mask": 31, "field": 0}, "prompt_sha1": "45224ed4386d72e2b75215ea7b23543568046848", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22000 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/22000=0.00015 A. P=V²/R=3.3²/22000=0.000495 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 22000, "i": 0.00015, "p": 0.000495}, "prompt_sha1": "980709c0c3a3e5c276298c2d54f744df1c2a940f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_11_38_2` with RED, GREEN, YELLOW states. Hold RED for 11 clock cycles, GREEN for 38, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_11_38_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 10) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_11_38_2", "red": 11, "green": 38, "yellow": 2}, "prompt_sha1": "5d0516414a02b55b3b2c016bdcae61f6f31ce5c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 52-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^52/2^12 = 2^40 = 1099511627776 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 52, "page_exp": 12, "entries": 1099511627776}, "prompt_sha1": "1255661b15f7c61842eb104015bd80e6df5299c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x58, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x58<<1)|0 = 0xB0 = 10110000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 88, "rw": 0, "byte": 176}, "prompt_sha1": "5a70652601a392ab8fc33efcec23eb922207796a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/4.7 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 4.7, "tau": 0.01}, "prompt_sha1": "a24980a267003a7f0e6852037c1bf4e13612279e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 20 Mbit/s and RTT 100 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 20×10^6×100/1000/8 = 250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "rtt_ms": 100, "bytes": 250000.0}, "prompt_sha1": "811b581d32de9284e593d84d07fa4ffc47955252", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.001 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-09×1.8²=1.62e-09 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-09, "v": 1.8, "energy": 1.6200000000000002e-09}, "prompt_sha1": "9dcb260eb078ab0d406ce7a41d6a29d9a6ebea62", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_10_7_12` with RED, GREEN, YELLOW states. Hold RED for 10 clock cycles, GREEN for 7, and YELLOW for 12; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_10_7_12 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 9) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 6) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 11) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_10_7_12", "red": 10, "green": 7, "yellow": 12}, "prompt_sha1": "f9711082e060bfb6d7a9e9c4c9643edb03a312c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 0.5 on a 3.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×0.5/(3.2×10^9) = 0.0015625 s = 1.562500 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 0.5, "ghz": 3.2, "sec": 0.0015625}, "prompt_sha1": "2f3ec85f460343deedb8ee5d8b9687fb92984432", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `count` elements of type `float`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n total += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `table[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n total += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "43e2a567c336043752d3e5a5594ba848a44c0299", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/10=0.18 A. P=V²/R=1.8²/10=0.324 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 10, "i": 0.18, "p": 0.324}, "prompt_sha1": "3f86f8f4542cb2ac936fa7416ded99c793d8f3f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 001001011011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "001001011011", "ones": 6, "parity": 0}, "prompt_sha1": "b013a763e86f705c1b1a56c2b076afbe63ba782d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-28 = 3972 bytes.\nRound down to an 8-byte multiple: floor((3972)/8)×8 = 3968 bytes.\nFragments required = ceil(6000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 28, "payload": 6000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "f6a5a91e074e40f6117bdb9ae3254b61030e6104", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1×10^6 × 0.5/1000 = 500 bits = 62.5 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1, "rtt_ms": 0.5, "bits": 500.0, "bytes": 62.5}, "prompt_sha1": "49546ed265990715a6f4b218a5f9ea9f3fd36ac9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w13_unsigned` comparing two 13-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w13_unsigned (\n input logic [12:0] a,\n input logic [12:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w13_unsigned", "width": 13, "signed": false}, "prompt_sha1": "02ec99a63bb921e68bbc63de3d891b99d5abf21e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 200 Hz. Each ISR consumes 4522 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 200×4522/(64×10^6) = 0.01413125 = 1.413125%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 200, "cycles": 4522, "load": 0.01413125}, "prompt_sha1": "4977ca780103c0483900b16cb00fc29057f780f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1450 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-20-24 = 1406 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 20, "tcphdr": 24, "mss": 1406}, "prompt_sha1": "0da743fd68accf0588d29d211da52b618b29dc73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_679217` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_679217 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_679217"}, "prompt_sha1": "db83e4e479b6dc14b24be73136921149cc981b1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_45_lsb` for `45-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_45_lsb (\n input logic [44:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 44; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_45_lsb", "width": 45, "priority": "low"}, "prompt_sha1": "d6ead01a13a0651221ca4668bb3a033bbdd82db9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 6` on one shared integer without synchronization. Assume `jobs` initially equals 116. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 116; T2 reads 116; both compute 122; T1 writes 122; T2 writes 122. The observed final value is 122, but two serial increments would produce 128.\n\n```\nlock(mutex)\njobs = jobs + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "cd6b78d146e404ae87765b94509d1c8cf7a61735", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 52-bit left-shift register module `shiftreg_left_52`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `52-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_52 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [51:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[50:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_52", "width": 52, "direction": "left"}, "prompt_sha1": "48a947c4132cc0fbee2fd35768516ec9a60d1ce2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 28 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 28-13 = 15.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 28, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 15}, "prompt_sha1": "de8768ad083cf979d5b61e1604feea87efce46bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_67_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 67 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_67_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd67;\n end else begin\n if (pulse_in)\n count <= 7'd67;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_67_retrig", "cycles": 67, "retrigger": true}, "prompt_sha1": "c7f22b097d7e743e2169205e5fe93d5895c3b1ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 20.1 V source drives a 820 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 20.1-2.2 = 17.9 V.\nI = V/R = 17.9/820 A = 21.8293 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 20.1, "vf": 2.2, "r": 820, "current_a": 0.02182926829268293}, "prompt_sha1": "0f4e48d6fef6b4783457c9653284c78dfe155d1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_57_lsb` for `57-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_57_lsb (\n input logic [56:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 56; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_57_lsb", "width": 57, "priority": "low"}, "prompt_sha1": "81282c82af09a0c9be03f367861e9c5756af089c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=24 V, R1=1 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 24×2.2/(1+2.2) = 16.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 24, "r1": 1, "r2": 2.2, "vout": 16.5}, "prompt_sha1": "36b74f26ff9d9df69b47391a551f87db3c27aa96", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w42_nocin` implementing a 42-bit unsigned adder with inputs `a`, `b` and outputs `42-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w42_nocin (\n input logic [41:0] a,\n input logic [41:0] b,\n output logic [41:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w42_nocin", "width": 42, "cin": false}, "prompt_sha1": "47dd673a44d4936069131072eabf14a1abc8a32f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=200 ms, C=2 ms,T=50 ms, C=3 ms,T=25 ms, C=5 ms,T=200 ms, C=4 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/200 + 2/50 + 3/25 + 5/200 + 4/40 = 0.300000 = 30.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 200], [2, 50], [3, 25], [5, 200], [4, 40]], "utilization": 0.3}, "prompt_sha1": "4f58a614f95df9ddd8185ebc4f74a1d9dcfd49cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_9927` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_9927 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_9927"}, "prompt_sha1": "0db81a457a3fcc6eb297df19ecda0fd6c23790d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w52_cin` implementing a 52-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `52-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w52_cin (\n input logic [51:0] a,\n input logic [51:0] b,\n input logic cin,\n output logic [51:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w52_cin", "width": 52, "cin": true}, "prompt_sha1": "474e21bbc10806f1162f51a6117df8813f5c4ac1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x4C239D45, toggle bit 26 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 26)`. Result = 0x48239D45.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 1277402437, "bit": 26, "op": "toggle", "result": 1210293573}, "prompt_sha1": "c39c280078b22c94842105cad337905071e09dae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 49 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 49×11 = 539. Time = 539/57600 = 0.00935763889 s = 9.357639 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 7, "parity": 1, "stop": 2, "frames": 49, "seconds": 0.00935763888888889}, "prompt_sha1": "fcdb69d0d005f2ee2b5d9e5a423bbe10f1e4cfc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 25000 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 25000×10^6×20/1000/8 = 62500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "rtt_ms": 20, "bytes": 62500000.0}, "prompt_sha1": "71fe0111e484e11209b5a74d0a3d259e18bc37c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 32 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 32 MHz / 2 = 16.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 32000000.0, "divider": 2, "spi_hz": 16000000.0}, "prompt_sha1": "d90a80d9b5f0bc3d141614218a227f31901f5a6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x20_no_bypass` with 64 entries of 20 bits. Inputs: `clk`, `we`, `6-bit waddr`, `20-bit wdata`, `6-bit raddr`; output `20-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_64x20_no_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [19:0] wdata,\n input logic [5:0] raddr,\n output logic [19:0] rdata\n);\n logic [19:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x20_no_bypass", "entries": 64, "width": 20, "mode": "no_bypass"}, "prompt_sha1": "b83f80821bdd968f89c08dabfb069bf5c0668552", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_2073` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_2073 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_2073"}, "prompt_sha1": "7eb75f6c63c7bae8d48fddf65a440022712e6f4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [18, 5, 4]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [27, 14, 15].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [18, 5, 4], "finish": [27, 14, 15]}, "prompt_sha1": "6c85bebc9f36f0b3be95a88734ff3c1e3566da90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 5 = 0.012500.\nEffective CPI = 1.1 + 0.012500 = 1.112500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.05, "penalty": 5, "result": 1.1125}, "prompt_sha1": "d83b479b10d3b622504ae74ee6b81df38c173ec7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 825692688, carries 20143 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 20143+0+0 = 20143. ACK = (825692688+20143) mod 2^32 = 825712831.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 825692688, "payload": 20143, "syn": 0, "fin": 0, "ack": 825712831}, "prompt_sha1": "e6283ffb107df944088eb5d046aefd998fa71d6a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_1304` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_1304 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_1304", "width": 10}, "prompt_sha1": "8632ed43e58207e84ab2ca655bde7eee4b1cfe39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 1, 1], "final_state": 3}, "prompt_sha1": "126f15f7e37de702262b3f21aa505c61ce8e5e25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1296 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1296-40-24 = 1232 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1296, "iphdr": 40, "tcphdr": 24, "mss": 1232}, "prompt_sha1": "55c90e9b75828810ef23ed80e630e63866df3faf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497, "historical_prompt_sha1": "a0e4c73c28837ca5bf3ca58230f8688644eeeff1", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "57fafced97135a01f4f262f16d3899150b8a5695d2604f186b791de156f21ba0", "release_correction": {"kind": "ipv6_mtu_minimum", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 6503, "original_row_sha256": "5fd059ca02a068793f732d127843e7bb35336dd9d196ba1dcacbe0e34776ade9", "version": "v1.0.0-rc1"}}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.25 ns hit time, 96.5% hit rate, and a 200 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.965 = 0.035.\nAMAT = hit time + miss rate × miss penalty\n= 4.25 ns + 0.035×200 ns = 11.2500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.25, "hit_rate": 0.965, "penalty": 200, "result": 11.250000000000007}, "prompt_sha1": "cae2d593e30a323d3a63c03e6d52bb265b075465", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1500 ohm and C=2200000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1500×2200000×10^-12 s = 0.0033 s.\nf_c=1/(2πRC)=1/(2π×1500×2200000×10^-12) = 48.2288 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1500, "c_f": 2.2e-06, "tau": 0.0033, "fc": 48.22877063390768}, "prompt_sha1": "b555665c0a0da334bc9f574c3697375cfe1b4718", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 1.5 on a 1 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×1.5/(1×10^9) = 0.015 s = 15.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 1.5, "ghz": 1.0, "sec": 0.015}, "prompt_sha1": "bc80da0633db167dd7341365350a268ccc7155fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 50-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^50/2^15 = 2^35 = 34359738368 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 50, "page_exp": 15, "entries": 34359738368}, "prompt_sha1": "7bf311d0f8795e5fe47c4f0a0ad1ce974b025095", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 48 data bits per transfer at 4800 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 48/8 = 6. Bandwidth = 6×4800×10^6×1 = 28.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 48, "rate_mt": 4800, "channels": 1, "gbps": 28.8}, "prompt_sha1": "941803ea71ad42c6e9c746f181515c5cf0b2d67f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_23` for a 23-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_23 (\n input logic signed [22:0] data,\n input logic [4:0] shamt,\n output logic signed [22:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_23", "width": 23, "direction": "right", "arithmetic": true}, "prompt_sha1": "1edce275ffa6ea7cd6cb4d8053e9b2aafde57a01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w24_signed` comparing two 24-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w24_signed (\n input logic signed [23:0] a,\n input logic signed [23:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w24_signed", "width": 24, "signed": true}, "prompt_sha1": "c2a3518f83b4b3c309d832a7e291f535e6e1b831", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 5 and tail index 0, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (5-0) mod 8 = 5. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 5, "tail": 0, "occupancy": 5}, "prompt_sha1": "94b227ef76f21fa76d657f3af851df3904427749", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-24 = 976 bytes.\nRound down to an 8-byte multiple: floor((976)/8)×8 = 976 bytes.\nFragments required = ceil(10000/976) = 11.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 24, "payload": 10000, "max_payload": 976, "fragments": 11}, "prompt_sha1": "e82396f1a432b596cadb651542d9b7b90445f8fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-60 = 8920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 60, "mss": 8920}, "prompt_sha1": "1b64b00fbe228374d10c34a77168211d9315fde6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w2_cin` implementing a 2-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `2-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w2_cin (\n input logic [1:0] a,\n input logic [1:0] b,\n input logic cin,\n output logic [1:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w2_cin", "width": 2, "cin": true}, "prompt_sha1": "ab0c6b58ccb2021783361dba9616a79cec368ffd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 216 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 216000000/800 = 270000.\nWith prescaler divisor limited to at most 4096, the largest divisor of 270000 that also keeps the period count within 16 bits is 3750.\nPeriod count = 270000/3750 = 72.\nPSC register = 3750-1 = 3749.\nARR register = 72-1 = 71.\nVerification: 216000000/(3750×72) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 216000000, "target_hz": 800, "total_division": 270000, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 3750, "period": 72, "psc_reg": 3749, "arr_reg": 71}, "prompt_sha1": "26f49934e94796c638727547ed6a52a7eb285509", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6983` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6983 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6983"}, "prompt_sha1": "e0ac779bbc684f3fadf3b87aee20f6e356e58df3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 128-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (128×8) = 488281.250000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 128, "pps": 488281.25}, "prompt_sha1": "20f91f484598d74b101b84873bdcc71abb1bc851", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w27_nocin` implementing a 27-bit unsigned adder with inputs `a`, `b` and outputs `27-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w27_nocin (\n input logic [26:0] a,\n input logic [26:0] b,\n output logic [26:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w27_nocin", "width": 27, "cin": false}, "prompt_sha1": "8baf266e595cc898e63e8a5f4fdc02af662b7242", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 85.0% hit rate, and a 160 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.850 = 0.150.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.150×160 ns = 25.7500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.85, "penalty": 160, "result": 25.750000000000004}, "prompt_sha1": "25e46319c73b4bef447cb2df286d34529ed6b587", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.142.192.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.142.192.0\nBroadcast address: 10.142.192.7\nUsable host range: 10.142.192.1 to 10.142.192.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.142.192.0/29", "usable": 6, "first": "10.142.192.1", "last": "10.142.192.6", "broadcast": "10.142.192.7"}, "prompt_sha1": "d26bbfb5c012432c1706addd3639385e158ff4a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_98` for a synchronous sampled input `noisy`. Update output `clean` only after observing 98 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_98 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 97) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_98", "stable_samples": 98}, "prompt_sha1": "ae2cf4b03b22d7588a1a0c3eb215506883679dad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [30, 15, 26, 22]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [93, 54, 90, 85].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [30, 15, 26, 22], "finish": [93, 54, 90, 85]}, "prompt_sha1": "9d658b9754814cf34052a98c4453c5d2d662ccc0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 10-bit up/down counter `updown_10_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_10_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [9:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_10_wrap", "width": 10, "wrap": true}, "prompt_sha1": "28c60cd83313096566e3d07e3cefc0a54d467948", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_19` for a 19-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_19 (\n input logic [18:0] data,\n input logic [4:0] shamt,\n output logic [18:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_19", "width": 19, "direction": "left", "arithmetic": false}, "prompt_sha1": "2a29ccdef2713d3789229fd32bd25ccbfc549588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 8 MHz and must generate an exact 250 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32768. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 8000000/250 = 32000.\nWith prescaler divisor limited to at most 32768, the largest divisor of 32000 that also keeps the period count within 16 bits is 32000.\nPeriod count = 32000/32000 = 1.\nPSC register = 32000-1 = 31999.\nARR register = 1-1 = 0.\nVerification: 8000000/(32000×1) = 250 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 8000000, "target_hz": 250, "total_division": 32000, "max_prescaler": 32768, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32000, "period": 1, "psc_reg": 31999, "arr_reg": 0}, "prompt_sha1": "73019ee03583bcefeeb42960ad5068adcd5299a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 512 KiB 4-way set-associative cache uses 16-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 524288/16 = 32768.\nSets = 32768/4 = 8192.\nOffset bits = log2(16) = 4; index bits = log2(8192) = 13; tag bits = 36-4-13 = 19.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 512, "line": 16, "ways": 4, "addr_bits": 36, "lines": 32768, "sets": 8192, "offset": 4, "index": 13, "tag": 19}, "prompt_sha1": "f78f7ca8980a95f236e69952fd3d53d70102bc3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 491, and period is 31245 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(491×31245) = 1.564405 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 491, "period": 31245, "hz": 1.5644050909652674}, "prompt_sha1": "bdbe8d890f7e8dc05950bf6f6bfa08a68ccf5aab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 44-bit left-shift register module `shiftreg_left_44`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `44-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_44 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [43:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[42:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_44", "width": 44, "direction": "left"}, "prompt_sha1": "990cc290d8ed40ae2b956c98a9b25403c467de25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 200 MHz, prescaler divisor is 343, and period is 18456 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 200000000/(343×18456) = 31.593540 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 200000000, "prescaler": 343, "period": 18456, "hz": 31.59354025838461}, "prompt_sha1": "1d85f2e511e4e325a8f78a0949071c499bc4ef78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 913, and period is 36607 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(913×36607) = 2.154257 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 913, "period": 36607, "hz": 2.1542573316034246}, "prompt_sha1": "5e132bf2b78e55a36a99ebd0fb3a13512904db10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [2, 20, 23]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [4, 41, 45].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [2, 20, 23], "finish": [4, 41, 45]}, "prompt_sha1": "ecf47f04894e31d33a8deeb88b1acb6a39856eca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 27-bit left-shift register module `shiftreg_left_27`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `27-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_27 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [26:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[25:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_27", "width": 27, "direction": "left"}, "prompt_sha1": "c64c638dd5e311931d4188a9ea5e62ecbacc40e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 10000 counts per period. What compare/high-time count produces exactly 20% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.2 × 10000 = 2000. Verification: 2000/10000 = 0.2, which is 20%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 10000, "duty": 20, "high": 2000}, "prompt_sha1": "4826161f3da4057a90ba938d444559a48eb491f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 5` on one shared integer without synchronization. Assume `credits` initially equals 154. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 154; T2 reads 154; both compute 159; T1 writes 159; T2 writes 159. The observed final value is 159, but two serial increments would produce 164.\n\n```\nlock(mutex)\ncredits = credits + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "ac66e920abc6b585239626f3053bc5895a1afa9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.7 V source drives a 1800 ohm resistor in series with an LED whose forward voltage is assumed to be 3.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.7-3.2 = 3.5 V.\nI = V/R = 3.5/1800 A = 1.9444 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.7, "vf": 3.2, "r": 1800, "current_a": 0.0019444444444444444}, "prompt_sha1": "40ed5756937441ce82e1544289724da6c61c02ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTNNTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 0, 0, 1, 1, 0], "final_state": 1}, "prompt_sha1": "09be624fd75106615cc3aa22337d8c1b77022a1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xFEEDA5B558AF in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: FE ED A5 B5 58 AF.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 280296640829615, "endian": "big", "bytes": [254, 237, 165, 181, 88, 175]}, "prompt_sha1": "34c1e81cb6844041e703f4eee2c1c5bcbfe5b694", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTTNNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 1, 0, 0, 1], "final_state": 2}, "prompt_sha1": "f685e691860398d255f0ff3deab816ad5f8c8647", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-40 = 1240 bytes.\nRound down to an 8-byte multiple: floor((1240)/8)×8 = 1240 bytes.\nFragments required = ceil(6000/1240) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 40, "payload": 6000, "max_payload": 1240, "fragments": 5}, "prompt_sha1": "f263f23c0dfc8ded60410a7ef4743247fc478dd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-32 = 968 bytes.\nRound down to an 8-byte multiple: floor((968)/8)×8 = 968 bytes.\nFragments required = ceil(10000/968) = 11.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 32, "payload": 10000, "max_payload": 968, "fragments": 11}, "prompt_sha1": "dc5f679e62985470936c2a1f5ed890bfe1bd1356", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/470 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 470, "tau": 0.001}, "prompt_sha1": "26352355043f093de2075aa5a8d7478bf919fb53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×1²=1.1e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 1, "energy": 1.1e-06}, "prompt_sha1": "dd4a903b217cd008027e32d4e49f6cd737f93553", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 125 and initial occupancy is 9. In an abstract batch, producer attempts to enqueue 54 items first, dropping any excess beyond capacity; then consumer removes up to 20 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=63, dropped=0; consumed=20; final occupancy=43.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 125, "start": 9, "prod": 54, "cons": 20, "dropped": 0, "consumed": 20, "final": 43}, "prompt_sha1": "95550f5010ae264dec968c12c9c7e3f2b68f6d7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_16` generating a one-clock-cycle `tick` every 16 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_16 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 15) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_16", "divide": 16}, "prompt_sha1": "a9c0c2215e17c583ad899202ec9f4dc200e265ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x4A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x4A<<1)|1 = 0x95 = 10010101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 74, "rw": 1, "byte": 149}, "prompt_sha1": "9581c729e00745229469545f7f4bb9729f0a6dbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x60, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x60<<1)|1 = 0xC1 = 11000001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 96, "rw": 1, "byte": 193}, "prompt_sha1": "91cb0ad6fd0b42004a79309a8255520eb0f663ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/47=0.0531914894 A. P=V²/R=2.5²/47=0.132978723 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 47, "i": 0.05319148936170213, "p": 0.13297872340425532}, "prompt_sha1": "8567278cfcdc229f5f4cf7822e28c59bfbc34831", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_3030` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_3030 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_3030", "width": 12}, "prompt_sha1": "5a135dbc8c400116bda160b78128e9dbb318a0a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 48 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 48 MHz / 128 = 0.375000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 48000000.0, "divider": 128, "spi_hz": 375000.0}, "prompt_sha1": "9a8f7015a9c24686dc2cf2498f229f22c83be4a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_32_10_5` with RED, GREEN, YELLOW states. Hold RED for 32 clock cycles, GREEN for 10, and YELLOW for 5; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_32_10_5 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 31) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 9) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 4) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_32_10_5", "red": 32, "green": 10, "yellow": 5}, "prompt_sha1": "c65cc7b3f80491f5b518eb1b15b437fd1d27d2d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 20%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.200 × 8 = 0.240000.\nEffective CPI = 1 + 0.240000 = 1.240000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.2, "penalty": 8, "result": 1.24}, "prompt_sha1": "5f94c728616f38c15050e42779848552204664f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Compute the exact UART baud-rate divisor for target 19200 bit/s, but the peripheral clock and divisor/oversampling convention are not provided. Give the final register value.", "output": "An exact register value cannot be computed from the target baud rate alone. The peripheral clock and the UART baud-generator convention/oversampling mode are required. I would request those inputs, then evaluate the documented divisor formula and baud error rather than inventing a value.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0ab9d1ca6b72dfe40b44d716b2cd50d4d1c10499", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTNTTNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on T; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 0, 1, 1, 0, 0, 1, 1], "final_state": 3}, "prompt_sha1": "2737fd744c94c6c541e66062872adf36199a2d6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=27000 ohm and C=3900 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=27000×3900×10^-12 s = 0.0001053 s.\nf_c=1/(2πRC)=1/(2π×27000×3900×10^-12) = 1511.4430 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 27000, "c_f": 3.9e-09, "tau": 0.00010530000000000001, "fc": 1511.4429543389872}, "prompt_sha1": "d481ab5bea43442e316b91f149d2ec15260ec9d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xC5BDE0 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C5 BD E0.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 12959200, "endian": "big", "bytes": [197, 189, 224]}, "prompt_sha1": "18fd60a6b9edefd0af9a5ff376bcb21e1ec0187e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m1887` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 1887 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m1887 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd1887;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m1887", "width": 12, "max": 1887}, "prompt_sha1": "19d6e85462833c3681db705a45431350a05b05cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 50 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 50000000/(4×1000000) = 12.500000.\nNearest integer divisor D = 12.\nActual baud = 50000000/(4×12) = 1041666.667 baud.\nError = (1041666.667-1000000)/1000000×100% = 4.1667%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 50000000, "oversample": 4, "baud": 1000000, "divisor": 12, "actual": 1041666.6666666666, "error_pct": 4.1666666666666625}, "prompt_sha1": "9b72d45b11ae4860afdce24e3b599d5aef8a54c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x98, toggle bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 6)`. Result = 0xD8.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 152, "bit": 6, "op": "toggle", "result": 216}, "prompt_sha1": "398e01ff88e173433a3f8596c5081eda7b5f9065", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock BUF then QUEUE; consumer acquires QUEUE then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds BUF while waiting for QUEUE, while consumer holds QUEUE while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "027cbe6a368fc6650aa983e34dd59f00f833c3b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.8 V source drives a 220 ohm resistor in series with an LED whose forward voltage is assumed to be 2.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.8-2.4 = 13.4 V.\nI = V/R = 13.4/220 A = 60.9091 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.8, "vf": 2.4, "r": 220, "current_a": 0.06090909090909091}, "prompt_sha1": "cb961426e3379f052a0e15d066625e33f4407bc9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1075 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "d0c537eed6a16e2672d0c96c57d58ed7a01904d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xFD08E41D, clear bit 8 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 8)`. Result = 0xFD08E41D.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 4245218333, "bit": 8, "op": "clear", "result": 4245218333}, "prompt_sha1": "21f04d3791b46abf3d31fa72b1a92e145cea9dd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=40 ms, C=1 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/40 + 1/25 = 0.065000 = 6.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 40], [1, 25]], "utilization": 0.065}, "prompt_sha1": "2ae2d38b5a7c28313e6f8db1b29caa300e90c00b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=12000 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=12000×12000×10^-12 s = 0.000144 s.\nf_c=1/(2πRC)=1/(2π×12000×12000×10^-12) = 1105.2427 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 12000, "c_f": 1.2e-08, "tau": 0.000144, "fc": 1105.2426603603844}, "prompt_sha1": "7cc9e7adb0c9fff1584c7710032749e05bd21f26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.207.9.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.207.9.0\nBroadcast address: 10.207.9.31\nUsable host range: 10.207.9.1 to 10.207.9.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.207.9.0/27", "usable": 30, "first": "10.207.9.1", "last": "10.207.9.30", "broadcast": "10.207.9.31"}, "prompt_sha1": "c4237420eb65699e4ae23236f1266c31ce00f6aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 3 on a 4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×3/(4×10^9) = 0.00075 s = 0.750000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 3.0, "ghz": 4.0, "sec": 0.00075}, "prompt_sha1": "cd9e91bb3593b695223653fc9778d32e1bae7e3d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 27000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×27000)/(680+27000) = 663.294798 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 27000, "req": 663.2947976878613}, "prompt_sha1": "019747e2156df2ddacb38c8a5d872479ff3e5f58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.5 V source drives a 1000 ohm resistor in series with an LED whose forward voltage is assumed to be 3.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.5-3.2 = 3.3 V.\nI = V/R = 3.3/1000 A = 3.3000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.5, "vf": 3.2, "r": 1000, "current_a": 0.0033}, "prompt_sha1": "0f83233f61b0c1ebd266eb20c48711d81dfb402c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 2200 ohm and 56 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (2200×56)/(2200+56) = 54.609929 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 2200, "r2": 56, "req": 54.60992907801419}, "prompt_sha1": "431a1add789e989d2ab853ba64f2735832943bd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 20-bit up/down counter `updown_20_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_20_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [19:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 20'd1048575) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_20_sat", "width": 20, "wrap": false}, "prompt_sha1": "731e067d37d8018a525a3f6e0032de31d634b32e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 48 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 9600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 48000000/(16×9600) = 312.500000.\nNearest integer divisor D = 312.\nActual baud = 48000000/(16×312) = 9615.385 baud.\nError = (9615.385-9600)/9600×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 48000000, "oversample": 16, "baud": 9600, "divisor": 312, "actual": 9615.384615384615, "error_pct": 0.1602564102564088}, "prompt_sha1": "4a88ae41c6b9bc0b5786259c302d7de6063537cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=4700 ohm and C=2700000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=4700×2700000×10^-12 s = 0.01269 s.\nf_c=1/(2πRC)=1/(2π×4700×2700000×10^-12) = 12.5418 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 4700, "c_f": 2.7e-06, "tau": 0.01269, "fc": 12.541760684940531}, "prompt_sha1": "617eef58d1bdfd79c4b4b69e4728dcfac4b2c421", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 4000 bytes, IP header 40 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-40-32 = 3928 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 40, "tcphdr": 32, "mss": 3928}, "prompt_sha1": "43f8e3027bfaf0d7ee7ec1afe6078e02c8eb6c5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 20 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×20/1000/8 = 5000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 20, "bytes": 5000.0}, "prompt_sha1": "a4d9c8c73a7005aa915f5751dac5310c07ae1391", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 1 and all processes arrive at time 0 with CPU bursts [6, 25, 1, 29, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [22, 76, 3, 81, 67].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 1, "bursts": [6, 25, 1, 29, 20], "finish": [22, 76, 3, 81, 67]}, "prompt_sha1": "4562a3dad336c6ec18d6d749adbd810266427da1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [20, 11, 19]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [47, 35, 50].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [20, 11, 19], "finish": [47, 35, 50]}, "prompt_sha1": "2d4de85b00dc6e8f3b749a22303152857036efe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2769(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2769(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2769([1, 2]) == 1.5\nassert mean_2769([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2769"}, "prompt_sha1": "0ecbd5c11a458ca3e34a2c256fd205c01c0b3d33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 5%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.050 × 5 = 0.037500.\nEffective CPI = 1.2 + 0.037500 = 1.237500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.05, "penalty": 5, "result": 1.2375}, "prompt_sha1": "c03015bafd99416f6f7bd8a549c7c987f0cf2b81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×200000 = 400000 Hz. Proposed rate 2e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200000, "min_fs": 400000, "proposed": 2000000}, "prompt_sha1": "5982a24a5fa45fb251a1a3a65c07975e5ab8f1f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 2000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-28 = 548 bytes.\nRound down to an 8-byte multiple: floor((548)/8)×8 = 544 bytes.\nFragments required = ceil(2000/544) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 28, "payload": 2000, "max_payload": 544, "fragments": 4}, "prompt_sha1": "c08d5e50add858b4da4c3ed0808c9234e3e88ff0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2978-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2978×8 = 23824 bits.\nSerialization delay = bits/rate = 23824/(2500×10^6) s = 9.5296e-06 s = 9.529600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2978, "rate_mbps": 2500, "delay_s": 9.5296e-06}, "prompt_sha1": "dee050ff8bd5a27425fdfe93b3c6b20aa914f30e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=50 ms, C=3 ms,T=200 ms, C=5 ms,T=100 ms, C=1 ms,T=200 ms, C=3 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/50 + 3/200 + 5/100 + 1/200 + 3/200 = 0.105000 = 10.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 50], [3, 200], [5, 100], [1, 200], [3, 200]], "utilization": 0.105}, "prompt_sha1": "6f3f6ec772c16624d9e7a37002d37f317278cbac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_10_8028` converting a 10-bit binary input `bin` to 10-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_10_8028 (\n input logic [9:0] bin,\n output logic [9:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_10_8028", "width": 10}, "prompt_sha1": "f909f81bc4ea0c82efa86d52e9302d7e9671b84c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 8 MHz, prescaler divisor is 290, and period is 45878 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 8000000/(290×45878) = 0.601295 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 8000000, "prescaler": 290, "period": 45878, "hz": 0.6012948885424763}, "prompt_sha1": "77b896327219e23cc9f81cc8416669a045aa16b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-60 = 1180 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 60, "mss": 1180}, "prompt_sha1": "94531eaf14d2230bbdb4bb4110c93cab26e0d1c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 12.5 Hz satisfies it.", "output": "Nyquist minimum is 2×10 = 20 Hz. Proposed rate 12.5 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10, "min_fs": 20, "proposed": 12.5}, "prompt_sha1": "c0b7e77a1b6b55740cc2bd8ee36b51ac8d5d8220", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 98%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 85%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.020×(6+0.150×150) = 2.070000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.98, "l2": 6, "l2_hit": 0.85, "mem": 150, "amat": 2.0700000000000007}, "prompt_sha1": "e02b3f576b4a22cc7f4c6b2eb24e72d9bc1c7be7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_41_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 41 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_41_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd41;\n end else begin\n if (pulse_in)\n count <= 6'd41;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_41_retrig", "cycles": 41, "retrigger": true}, "prompt_sha1": "80e7a08973cf7a74cb3108d2e3117ec9d3c43310", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 8 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×40×10^6 = 320000000 B/s. Time = 256/320000000 = 8e-07 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 8, "rate_mhz": 40, "sec": 8e-07}, "prompt_sha1": "3e053d83a8780e123e85e1ab84226a1bf9149a43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 14 and tail index 40, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (14-40) mod 128 = 102. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 14, "tail": 40, "occupancy": 102}, "prompt_sha1": "e69721204d1770c7deb80b179f9757afec1bc9df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 11 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 11 = 13.\nClock pulses = 13×9 = 117.\nTime = 117/1000000 s = 117.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 11, "clocks": 117, "time_s": 0.000117}, "prompt_sha1": "6cfd8ac118c42a89dc8403aa1b406cbdd9d3efd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 51 and initial occupancy is 33. In an abstract batch, producer attempts to enqueue 15 items first, dropping any excess beyond capacity; then consumer removes up to 103 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=48, dropped=0; consumed=48; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 51, "start": 33, "prod": 15, "cons": 103, "dropped": 0, "consumed": 48, "final": 0}, "prompt_sha1": "1f19ee03a0a7c12cd6d8b3590932df778f2e8998", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1608973838, carries 29911 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 29911+1+0 = 29912. ACK = (1608973838+29912) mod 2^32 = 1609003750.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1608973838, "payload": 29911, "syn": 1, "fin": 0, "ack": 1609003750}, "prompt_sha1": "65d90a475b064e4551629bdd6f28bec0639676ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3773 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "fdbb86d7f86c0b5b660aca56798438f5235feb82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=15000 ohm and C=1800 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=15000×1800×10^-12 s = 2.7e-05 s.\nf_c=1/(2πRC)=1/(2π×15000×1800×10^-12) = 5894.6275 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 15000, "c_f": 1.8e-09, "tau": 2.7e-05, "fc": 5894.62752192205}, "prompt_sha1": "c929dcbea87147a63ba69c6cae03a317ec181c22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 680 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/680=0.00367647059 A. P=V²/R=2.5²/680=0.00919117647 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 680, "i": 0.003676470588235294, "p": 0.009191176470588236}, "prompt_sha1": "fecd636561395df9c1775fb3d94612db5f754c4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 25000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 25000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 25000.0}, "prompt_sha1": "1b94842f7e651e117c060fa57edf02c0f72fa515", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 73 and tail index 264, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (73-264) mod 512 = 321. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 73, "tail": 264, "occupancy": 321}, "prompt_sha1": "f99320177036bf9d24e9169fb5371f5fd14a85fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 63 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 63-15 = 48.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 63, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 48}, "prompt_sha1": "e6e0ecbb71f9fe70fdb6657b05ca056bf6972bd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=18000 ohm and C=10000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=18000×10000×10^-12 s = 0.00018 s.\nf_c=1/(2πRC)=1/(2π×18000×10000×10^-12) = 884.1941 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 18000, "c_f": 1e-08, "tau": 0.00018, "fc": 884.1941282883073}, "prompt_sha1": "38dd61eba22e0206524475ccfe4e6e698b045c60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 2816 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 20000×2816/(24×10^6) = 2.34666667 = 234.666667%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 20000, "cycles": 2816, "load": 2.3466666666666667}, "prompt_sha1": "2de846671fa4e91974b6ced0b02a5587e613ca26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "065ab302f2a5e6b0025ae3ead7be7a5ed626d707", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "2b721fb7c447734f41cc59425b66c3cb198e802e48c4864c5204ec25548929dc", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 6601, "original_row_sha256": "20c17b7c3f29aac3efe899b16d382eb9bdab1d4e4ab1064a9b9201bb129f079f", "version": "v1.0.0-rc1"}}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 18.9 V source drives a 820 ohm resistor in series with an LED whose forward voltage is assumed to be 2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 18.9-2 = 16.9 V.\nI = V/R = 16.9/820 A = 20.6098 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 18.9, "vf": 2.0, "r": 820, "current_a": 0.020609756097560973}, "prompt_sha1": "e781fc0954e4f5e8bfc3dce18011a5ef52d3932e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 2000 bytes, IP header 40 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-40-52 = 1908 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 40, "tcphdr": 52, "mss": 1908}, "prompt_sha1": "354466bd3ccb40a0e6a8a645b1fdfeb9fc44abb8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 2 MHz, prescaler divisor is 971, and period is 41119 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 2000000/(971×41119) = 0.050092 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 2000000, "prescaler": 971, "period": 41119, "hz": 0.05009198265545064}, "prompt_sha1": "ff833247a52e290ddbcf454bc027f425cccc4e70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 0001110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0001110", "ones": 3, "parity": 1}, "prompt_sha1": "904a2cfc91469ac41838a27a9d304062d66631cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 26-bit left-shift register module `shiftreg_left_26`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `26-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_26 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [25:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[24:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_26", "width": 26, "direction": "left"}, "prompt_sha1": "710561345726c3925f4f255b27d1a05fde2b4611", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-24 = 552 bytes.\nRound down to an 8-byte multiple: floor((552)/8)×8 = 552 bytes.\nFragments required = ceil(4000/552) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 24, "payload": 4000, "max_payload": 552, "fragments": 8}, "prompt_sha1": "869de196f905fde58ee19bacb329360dd18eb7ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 20.6 V source drives a 150 ohm resistor in series with an LED whose forward voltage is assumed to be 3.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 20.6-3.4 = 17.2 V.\nI = V/R = 17.2/150 A = 114.6667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 20.6, "vf": 3.4, "r": 150, "current_a": 0.11466666666666668}, "prompt_sha1": "2d8c63cf62c4cc41c227323fa736afd7a054f74c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551606; x = x + 458;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551606+458 = 18446744073709552064. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552064) mod 2^64 = 448. So `x` stores 448. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551606, "add": 458, "result": 448}, "prompt_sha1": "eae354fc41e2f1681cd915c96c2848deccffedef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 521 elements. Review loop `for i in range(521+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(521+1)` includes index 521, which is out of range for a length-521 sequence. Correct loop: `for i in range(521):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 521, "variant": "one_past"}, "prompt_sha1": "29644d2dd3e02e325bbcb8e2da020854c49decce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 128 bytes over a datapath transferring 4 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×20×10^6 = 80000000 B/s. Time = 128/80000000 = 1.6e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 128, "width": 4, "rate_mhz": 20, "sec": 1.6e-06}, "prompt_sha1": "c52e8f6858172d364d7a6dc459b743a700108a59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=1 ms,T=40 ms, C=3 ms,T=100 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 1/40 + 3/100 = 0.180000 = 18.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [1, 40], [3, 100]], "utilization": 0.18}, "prompt_sha1": "ca0fdb773d353605b46008d2470f5e7b89df6eec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `len` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n total += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `a[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n total += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "a50c687270fc48dbd32ea8fab57ec0a015311aff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 3000 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 3000/(3000+20) = 0.993377 = 99.34%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 3000, "overhead": 20, "efficiency": 0.9933774834437086}, "prompt_sha1": "81b593d4561ff005d345e9a1da7f479522d0dc52", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['P', 'P', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["P", "P", "V", "P", "V", "P"], "value": 5, "blocked": 0}, "prompt_sha1": "0a2b757d254d839a221c7438d4e75d22761ea9db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 3` on one shared integer without synchronization. Assume `events` initially equals 71. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 71; T2 reads 71; both compute 74; T1 writes 74; T2 writes 74. The observed final value is 74, but two serial increments would produce 77.\n\n```\nlock(mutex)\nevents = events + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "baca5d98d6dbc86bc98c471b178c8209e534b6c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_88_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 88 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_88_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd88;\n end else begin\n if (pulse_in)\n count <= 7'd88;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_88_retrig", "cycles": 88, "retrigger": true}, "prompt_sha1": "147c7351bd60e1d5d2196ac63782dcd9d4da81c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(5×10^6) s = 3.200000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 16, "time_us": 3.1999999999999997}, "prompt_sha1": "90f234ac19b48488b10b1e98c1cd66011f0c00d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 10 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 2400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 10000000/(4×2400) = 1041.666667.\nNearest integer divisor D = 1042.\nActual baud = 10000000/(4×1042) = 2399.232 baud.\nError = (2399.232-2400)/2400×100% = -0.0320%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 10000000, "oversample": 4, "baud": 2400, "divisor": 1042, "actual": 2399.2322456813818, "error_pct": -0.0319897632757602}, "prompt_sha1": "4e37189da397887a72eff092592babb9d3261758", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 7` on one shared integer without synchronization. Assume `credits` initially equals 23. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 23; T2 reads 23; both compute 30; T1 writes 30; T2 writes 30. The observed final value is 30, but two serial increments would produce 37.\n\n```\nlock(mutex)\ncredits = credits + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "e3c344a7cd0bc620e147d4c776110b4a9db8edfe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/200 = 250000.\nWith prescaler divisor limited to at most 128, the largest divisor of 250000 that also keeps the period count within 16 bits is 125.\nPeriod count = 250000/125 = 2000.\nPSC register = 125-1 = 124.\nARR register = 2000-1 = 1999.\nVerification: 50000000/(125×2000) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 200, "total_division": 250000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 2000, "psc_reg": 124, "arr_reg": 1999}, "prompt_sha1": "3efd7e75d5fa6cd75d1ba80a95f52c9ce3fafecb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock B then D; worker_2 acquires D then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds B while waiting for D, while worker_2 holds D while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before D. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "918b1a758d04cc0ca0974148a074e70781ba964f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=2.2 nF and is stepped to 1.8 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1.8(1-e^-0.5)=0.708245 V; τ=0.00022 s and t=0.00011 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 2.2000000000000003e-09, "multiple": 0.5, "vin": 1.8, "vc": 0.7082448125172599}, "prompt_sha1": "59b214f406f6f511460a3ce82b5d9c11b171914e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 3 on a 0.8 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×3/(0.8×10^9) = 0.01875 s = 18.750000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 3.0, "ghz": 0.8, "sec": 0.01875}, "prompt_sha1": "4af4831b644108cdb6fa454f3d728a1bf4a1ad81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 4646 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 4646/1000000 s; frequency = 1000000/4646 = 215.238915 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 4646, "hz": 215.2389151958674}, "prompt_sha1": "30b13c705a30d7305899fa6f278b5f22fdc5db4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w33_signed` comparing two 33-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w33_signed (\n input logic signed [32:0] a,\n input logic signed [32:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w33_signed", "width": 33, "signed": true}, "prompt_sha1": "3153e79568a32f19c53ea12c8a71d860be2226b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NNTNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 0, 1, 0, 1, 1], "final_state": 2}, "prompt_sha1": "738ee4b288ee6631554fae4fb7b218bc87d878da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.9 V source drives a 120 ohm resistor in series with an LED whose forward voltage is assumed to be 1.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.9-1.8 = 14.1 V.\nI = V/R = 14.1/120 A = 117.5000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.9, "vf": 1.8, "r": 120, "current_a": 0.1175}, "prompt_sha1": "53a552bea7eef93fc3e491b5ec0883a5231c3cac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 954 elements. Review loop `for i in range(954+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(954+1)` includes index 954, which is out of range for a length-954 sequence. Correct loop: `for i in range(954):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 954, "variant": "one_past"}, "prompt_sha1": "1a427afdab0dd6f2b5a5cb5842636a6ac7942705", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 64 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 64-10 = 54.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 64, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 54}, "prompt_sha1": "ec16af9026358cfde43ac35d8a8bf10e871e0f0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'V', 'P', 'P', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "V", "P", "P", "P", "P", "V", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "3929ec80200dc616c5f416918dc5f658a848ee32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 245 and tail index 211, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (245-211) mod 256 = 34. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 245, "tail": 211, "occupancy": 34}, "prompt_sha1": "7d84ac481b9da669bd0b9c8b3b87767749cc0113", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x40_write_bypass` with 4 entries of 40 bits. Inputs: `clk`, `we`, `2-bit waddr`, `40-bit wdata`, `2-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [39:0] wdata,\n input logic [1:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x40_write_bypass", "entries": 4, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "004ed3fab60ea455e742000438a20d0636a89c05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint32_t`, evaluate the stored result after `x = 4294967273; x = x + 314;`. The mathematical sum exceeds the maximum value representable by `uint32_t`. State the value stored back into `x` under conversion to the unsigned 32-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 4294967273+314 = 4294967587. Converting that result back to the unsigned 32-bit type reduces it modulo 2^32: (4294967587) mod 2^32 = 291. So `x` stores 291. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint32_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 32, "start": 4294967273, "add": 314, "result": 291}, "prompt_sha1": "37564d46aebd405e8fa346c2b46c66640954fc09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1 ns hit time, 90.3% hit rate, and a 125 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.903 = 0.097.\nAMAT = hit time + miss rate × miss penalty\n= 1 ns + 0.097×125 ns = 13.1250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.0, "hit_rate": 0.903, "penalty": 125, "result": 13.124999999999996}, "prompt_sha1": "9b47ad42af46d7bfdc1effb101a6811a68cb310f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2963` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2963 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2963"}, "prompt_sha1": "79f05d1936852871be39f4888714caf1760dfecf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.4 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 3.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.4-3.1 = 20.3 V.\nI = V/R = 20.3/560 A = 36.2500 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.4, "vf": 3.1, "r": 560, "current_a": 0.03625}, "prompt_sha1": "abb9dc1483ba10e0a6902c613564a7ae3bea90aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8778-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8778×8 = 70224 bits.\nSerialization delay = bits/rate = 70224/(2500×10^6) s = 2.80896e-05 s = 28.089600 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8778, "rate_mbps": 2500, "delay_s": 2.80896e-05}, "prompt_sha1": "c4f59c78a024726fc94237cb412d5acb7eb5b116", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 4-way set-associative cache uses 32-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/32 = 256.\nSets = 256/4 = 64.\nOffset bits = log2(32) = 5; index bits = log2(64) = 6; tag bits = 32-5-6 = 21.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 32, "ways": 4, "addr_bits": 32, "lines": 256, "sets": 64, "offset": 5, "index": 6, "tag": 21}, "prompt_sha1": "43943a235abd85fd197d6ec16455747decec6469", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.141.108.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.141.108.0\nBroadcast address: 10.141.108.63\nUsable host range: 10.141.108.1 to 10.141.108.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.141.108.0/26", "usable": 62, "first": "10.141.108.1", "last": "10.141.108.62", "broadcast": "10.141.108.63"}, "prompt_sha1": "cab8878d4d3fe5f6bd679a21a02dc3cf5b36135f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3.3 V reference and returns code 721. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 721/1023 × 3.3 V = 2.325806 V.\nThus the estimated input is about 2.3258 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.3, "code": 721, "volts": 2.325806451612903}, "prompt_sha1": "3939f31de12fa3e67e25044fbfabbad86482cdff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w47_cin` implementing a 47-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `47-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w47_cin (\n input logic [46:0] a,\n input logic [46:0] b,\n input logic cin,\n output logic [46:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w47_cin", "width": 47, "cin": true}, "prompt_sha1": "37dc083099bb4d4e2e49fd667ac2986935b11deb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_47` for a synchronous sampled input `noisy`. Update output `clean` only after observing 47 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_47 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 46) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_47", "stable_samples": 47}, "prompt_sha1": "80242836f5a49545a47ca38a1882e9dade0ae315", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xAA211D36AACB1C8E in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 8E 1C CB AA 36 1D 21 AA.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 12259111781310078094, "endian": "little", "bytes": [142, 28, 203, 170, 54, 29, 33, 170]}, "prompt_sha1": "a9e0cdbecba725d41bfd4f0523b566ed6161a67a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_7126` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_7126 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_7126", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "ca7690fab140cc5b8ef3cf348af380f9062c58e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [19, 11, 16, 28]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [64, 41, 60, 74].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [19, 11, 16, 28], "finish": [64, 41, 60, 74]}, "prompt_sha1": "089900893bbd2903b5f83df59cef8bccee1e883d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 59 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 59-10 = 49.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 59, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 49}, "prompt_sha1": "dd48a24a07d8b8c011721c9f49b5c93ed2c9d0be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_77` for a synchronous sampled input `noisy`. Update output `clean` only after observing 77 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_77 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 76) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_77", "stable_samples": 77}, "prompt_sha1": "5690c8ddb0757563cbf74bcb560951e755ec2eb7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NTTTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 1, 1, 1, 1, 1], "final_state": 3}, "prompt_sha1": "9f44b4d46a9d40df3be3726c4e127c34912382ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 21-bit right-shift register module `shiftreg_right_21`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `21-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_21 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [20:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[20:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_21", "width": 21, "direction": "right"}, "prompt_sha1": "836ce1956a5ef6a878d5b1c92959fd43490cac0d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_4853` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_4853 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_4853"}, "prompt_sha1": "87ea34ea85ec2c6841b4cc816cfe105908712971", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 250000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(8×250000) = 8.000000.\nNearest integer divisor D = 8.\nActual baud = 16000000/(8×8) = 250000.000 baud.\nError = (250000.000-250000)/250000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 8, "baud": 250000, "divisor": 8, "actual": 250000.0, "error_pct": 0.0}, "prompt_sha1": "891b4e2f789935d0b9cc6a287e6ff23edb6ca3d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w15_cin` implementing a 15-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `15-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w15_cin (\n input logic [14:0] a,\n input logic [14:0] b,\n input logic cin,\n output logic [14:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w15_cin", "width": 15, "cin": true}, "prompt_sha1": "39c04876decf18efb34e1ccbe87433e8b7d150b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_8610` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_8610 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_8610"}, "prompt_sha1": "d0a11ed90f56e37a8129d46274bf0b46b0b4fa99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xE2717AC0. Extract the 5-bit field starting at bit 27 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xE2717AC0 >> 27) & 0x1F = 0x1C (28).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 5, "lsb": 27, "value": 3799087808, "mask": 31, "field": 28}, "prompt_sha1": "efda3a42c238e879754c9f421d7ee0e41475f7b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 48 MHz, prescaler divisor is 422, and period is 31809 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 48000000/(422×31809) = 3.575846 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 48000000, "prescaler": 422, "period": 31809, "hz": 3.575845698682256}, "prompt_sha1": "eaa342a03036a2292acc5a0a70710c7d72855dc3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 56 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 56×9 = 504. Time = 504/57600 = 0.00875 s = 8.750000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 6, "parity": 1, "stop": 1, "frames": 56, "seconds": 0.00875}, "prompt_sha1": "03fa5c3e382f2f5409b67ccefbf5b628f7c56280", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 1605 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "2bad973e34a3cd8dcbef01499748735bd13b2099", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3648 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "2eac5ed88c5f437f59be20b83f9707ddfe703f6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 43 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 43 = 45.\nClock pulses = 45×9 = 405.\nTime = 405/100000 s = 4050.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 43, "clocks": 405, "time_s": 0.00405}, "prompt_sha1": "679d4d403e90fbf7d6e50a96b08087246c8cd263", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2 ns hit time, 92.1% hit rate, and a 75 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.921 = 0.079.\nAMAT = hit time + miss rate × miss penalty\n= 2 ns + 0.079×75 ns = 7.9250 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.0, "hit_rate": 0.921, "penalty": 75, "result": 7.924999999999997}, "prompt_sha1": "aabcbed36b803417563557bb29b40bef2421755b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 8-bit right-shift register module `shiftreg_right_8`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `8-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_8 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [7:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[7:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_8", "width": 8, "direction": "right"}, "prompt_sha1": "9a59ac045c088e7907302dfe020f04b5382ce0c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 24 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 74 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×74/(24×10^6) = 0.0154166667 = 1.541667%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 24, "irq_hz": 5000, "cycles": 74, "load": 0.015416666666666667}, "prompt_sha1": "62ae89333c8d9c18cf690ca1655a89c5706c4cf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 16-byte lines and 52-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/16 = 128.\nOffset bits = log2(16) = 4.\nIndex bits = log2(128) = 7.\nTag bits = 52-7-4 = 41.\nCheck: 41+7+4 = 52 = 52 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 16, "addr_bits": 52, "lines": 128, "offset_bits": 4, "index_bits": 7, "tag_bits": 41}, "prompt_sha1": "74587d8fe20f69055178b9032c40ea31a67e30dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w6_nocin` implementing a 6-bit unsigned adder with inputs `a`, `b` and outputs `6-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w6_nocin (\n input logic [5:0] a,\n input logic [5:0] b,\n output logic [5:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w6_nocin", "width": 6, "cin": false}, "prompt_sha1": "81f7ddbbe531383814c91fe0d3ef9a38d0872426", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 1.2 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×1.2/(2.5×10^9) = 0.024 s = 24.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 1.2, "ghz": 2.5, "sec": 0.024}, "prompt_sha1": "c15d0c20fcab9fcbccdc37f2f01c7591396569f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 8-bit data word is 01101001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01101001", "ones": 4, "parity": 0}, "prompt_sha1": "7b59f7e7cf4df22f2c1f08071353e8cb62caefcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 7 and initial occupancy is 4. In an abstract batch, producer attempts to enqueue 99 items first, dropping any excess beyond capacity; then consumer removes up to 32 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=7, dropped=96; consumed=7; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 7, "start": 4, "prod": 99, "cons": 32, "dropped": 96, "consumed": 7, "final": 0}, "prompt_sha1": "c8595e03e55769926e3ea23601a0e7da552c0544", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×300/1000/8 = 3750000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 300, "bytes": 3750000000.0}, "prompt_sha1": "0c6120e41feb75576756df3537406a5904601528", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 26 bits wide and the system uses 2 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2048 bytes = 2^11 bytes.\nOffset bits = 11.\nVPN bits = 26-11 = 15.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 26, "page_bytes": 2048, "offset_bits": 11, "vpn_bits": 15}, "prompt_sha1": "0d199ef2eefc7f4ebdfb0c01131fd0eb371fd06d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 9 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 38 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+1 = 11. Total bits = 38×11 = 418. Time = 418/230400 = 0.00181423611 s = 1.814236 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 9, "parity": 0, "stop": 1, "frames": 38, "seconds": 0.001814236111111111}, "prompt_sha1": "8c69a9772214de7b2b31d2bb453e58f63bbb1263", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x7AB3, clear bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 6)`. Result = 0x7AB3.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 31411, "bit": 6, "op": "clear", "result": 31411}, "prompt_sha1": "043ea38456104a89e5ae335cdf5ab75ee8f91d41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 34231 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 34231/50000000 s; frequency = 50000000/34231 = 1460.664310 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 34231, "hz": 1460.6643101282464}, "prompt_sha1": "9e5bdf008d54d2d058d7edfc12ff97d926116339", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 48 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 48×8 KiB = 384 KiB = 393216 bytes = 0.375000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 48, "page_kib": 8, "reach": 393216}, "prompt_sha1": "f4d9f9a802e33982f96f371052d22759f0cf7b24", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w22_signed` comparing two 22-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w22_signed (\n input logic signed [21:0] a,\n input logic signed [21:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w22_signed", "width": 22, "signed": true}, "prompt_sha1": "ae4cae49d3dcac0c4144093c093822206f3a0cd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 4 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×10×10^6 = 40000000 B/s. Time = 512/40000000 = 1.28e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 4, "rate_mhz": 10, "sec": 1.28e-05}, "prompt_sha1": "2a12920939f4cb16af39401c69089156cb566696", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_107` for a synchronous sampled input `noisy`. Update output `clean` only after observing 107 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_107 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 106) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_107", "stable_samples": 107}, "prompt_sha1": "2a51298f7d794f3cab21c13dee2b7e4d420a7994", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=2.2 nF and is stepped to 12 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=12(1-e^-4)=11.780212 V; τ=2.2e-07 s and t=8.8e-07 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 2.2000000000000003e-09, "multiple": 4, "vin": 12, "vc": 11.78021233333519}, "prompt_sha1": "cfea1c3195edc4b6b49791e0b54350063284d25e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 43 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 43 = 46.\nClock pulses = 46×9 = 414.\nTime = 414/400000 s = 1035.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 43, "clocks": 414, "time_s": 0.001035}, "prompt_sha1": "fa66103404d6f16ab03ef0da3cc36c1b294f3e03", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x5557DEE0, toggle bit 29 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 29)`. Result = 0x7557DEE0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 1431822048, "bit": 29, "op": "toggle", "result": 1968692960}, "prompt_sha1": "ee29400c0093b2faa6b13ebf50db2b1ee88a84c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=22 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/47 = -0.468085.\nVout = A_v×Vin = -0.468085×0.25 = -0.117021 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 22, "vin": 0.25, "gain": -0.46808510638297873, "vout": -0.11702127659574468}, "prompt_sha1": "c67e43d4a3f8a7f35ed752f939f41166cddeeecd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x7F19, set bit 11 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 11)`. Result = 0x7F19.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 32537, "bit": 11, "op": "set", "result": 32537}, "prompt_sha1": "c8f53134bc3d95475553ca5f79eb1d44ac8d1137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.163.3.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.163.3.0\nBroadcast address: 10.163.3.31\nUsable host range: 10.163.3.1 to 10.163.3.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.163.3.0/27", "usable": 30, "first": "10.163.3.1", "last": "10.163.3.30", "broadcast": "10.163.3.31"}, "prompt_sha1": "45f014cac8ebf00292aed24589117bd9ebe26f4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10000 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10000×10^6 / (4096×8) = 305175.781250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "frame_bytes": 4096, "pps": 305175.78125}, "prompt_sha1": "227c7dee2a33c0346b5fe4077e45b0b1253d5838", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3727-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3727×8 = 29816 bits.\nSerialization delay = bits/rate = 29816/(10×10^6) s = 0.0029816 s = 2981.600000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3727, "rate_mbps": 10, "delay_s": 0.0029816}, "prompt_sha1": "34becef73c91a0dbe0ff2d3c87bcc8e5af886c1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×12²=7.2e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 12, "energy": 7.2e-06}, "prompt_sha1": "12b31a101ef164b2eb8072a3873f7034cb17b7f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 0 and tail index 31, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (0-31) mod 32 = 1. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 0, "tail": 31, "occupancy": 1}, "prompt_sha1": "8a6a9770fdf3a19d49c7250b9e8d1691f0c59bcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.5 on a 5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.5/(5×10^9) = 0.0006 s = 0.600000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.5, "ghz": 5.0, "sec": 0.0006}, "prompt_sha1": "bf5345f0b3f5740377f634e653ef69ee5a9c88ab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×12²=7.2e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 12, "energy": 7.2e-05}, "prompt_sha1": "4499039076e754bf3fddb9e73ebcee77ea602475", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 18-bit ADC spanning 0 to 4.096 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.096/2^18 V = 1.5625e-05 V = 15.625000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 18, "vref": 4.096, "step": 1.5625e-05}, "prompt_sha1": "66c1e9497b8f51b987b58f87aa7e8b6565f3482b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_12_4778` converting a 12-bit binary input `bin` to 12-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_12_4778 (\n input logic [11:0] bin,\n output logic [11:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_12_4778", "width": 12}, "prompt_sha1": "4b3ff0f9feb4399209a1a64b0af6c6f500921690", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×256 KiB = 24576 KiB = 25165824 bytes = 24.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 256, "reach": 25165824}, "prompt_sha1": "e474e698c1219a780fb41132ba07028d0335da33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 32-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^32/2^16 = 2^16 = 65536 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 32, "page_exp": 16, "entries": 65536}, "prompt_sha1": "163ae7ce846b607c35340048388cc49dbe8591f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m60` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 60 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m60 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd60;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m60", "width": 7, "max": 60}, "prompt_sha1": "d75e0ff1665ea3aede54c230b0b3d5d14895cd5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551544; x = x + 117;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551544+117 = 18446744073709551661. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551661) mod 2^64 = 45. So `x` stores 45. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551544, "add": 117, "result": 45}, "prompt_sha1": "88edacc3711f2e3fcf723c4a1f6c7a53bd2c5784", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 2 KiB direct-mapped data cache with 256-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 2 KiB = 2048 bytes.\nLines = 2048/256 = 8.\nOffset bits = log2(256) = 8.\nIndex bits = log2(8) = 3.\nTag bits = 28-3-8 = 17.\nCheck: 17+3+8 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 2048, "line": 256, "addr_bits": 28, "lines": 8, "offset_bits": 8, "index_bits": 3, "tag_bits": 17}, "prompt_sha1": "f036b9364233315fc84c4e2f2113cd0d3fdd8d98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=3900 ohm and C=3300000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=3900×3300000×10^-12 s = 0.01287 s.\nf_c=1/(2πRC)=1/(2π×3900×3300000×10^-12) = 12.3664 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 3900, "c_f": 3.2999999999999997e-06, "tau": 0.01287, "fc": 12.366351444591714}, "prompt_sha1": "2fd9b1f8051cc31d6cf25f01c661c0377647e149", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25000 Mbit/s and RTT 120 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25000×10^6 × 120/1000 = 3e+09 bits = 3.75e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25000, "rtt_ms": 120, "bits": 3000000000.0, "bytes": 375000000.0}, "prompt_sha1": "cf9c778c80888c6ecf32004c8228a8bbd8fab893", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 12.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.125 × 1000 = 125. Verification: 125/1000 = 0.125, which is 12.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 12.5, "high": 125}, "prompt_sha1": "3a149ef5728bcab98bf08f2b6474bea315a58989", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 14-bit ADC spanning 0 to 1.25 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.25/2^14 V = 7.62939453125e-05 V = 76.293945 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 14, "vref": 1.25, "step": 7.62939453125e-05}, "prompt_sha1": "03d2dd363621bbda7a27dcf40a348cc5f8bcfeb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=4.7 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×2.2/(4.7+2.2) = 2.869565 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 4.7, "r2": 2.2, "vout": 2.869565217391304}, "prompt_sha1": "ce0459a087a416e971b8d48f891ae91b49aca303", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 100 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 100 MHz / 256 = 0.390625 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 100000000.0, "divider": 256, "spi_hz": 390625.0}, "prompt_sha1": "7a0ea24fe3ddb45fb199f724102f38c9aef99a0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 6` on one shared integer without synchronization. Assume `counter` initially equals 145. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 145; T2 reads 145; both compute 151; T1 writes 151; T2 writes 151. The observed final value is 151, but two serial increments would produce 157.\n\n```\nlock(mutex)\ncounter = counter + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "808be78294f85fa4d76bcf247a07f31457525cc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_10_lsb` for `10-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_10_lsb (\n input logic [9:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 9; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_10_lsb", "width": 10, "priority": "low"}, "prompt_sha1": "c79e36ccad313697c75e78b184600d69af5f140f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x209075FC198B46C5 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: C5 46 8B 19 FC 75 90 20.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 2346505131480794821, "endian": "little", "bytes": [197, 70, 139, 25, 252, 117, 144, 32]}, "prompt_sha1": "422c3fabc268740046921db0a61c224ea00fc629", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 25% of instructions, the branch misprediction rate is 10%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.100 × 5 = 0.125000.\nEffective CPI = 1.1 + 0.125000 = 1.225000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.25, "mispred": 0.1, "penalty": 5, "result": 1.225}, "prompt_sha1": "ba641ea9653ac74b11e903d3898e824233898010", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE5E640CD49F0 in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: F0 49 CD 40 E6 E5.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 252777092434416, "endian": "little", "bytes": [240, 73, 205, 64, 230, 229]}, "prompt_sha1": "cd6fa5a75b8f435e638523ada0971ce0c9c17922", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x1D, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x1D<<1)|1 = 0x3B = 00111011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 29, "rw": 1, "byte": 59}, "prompt_sha1": "6b6933152270e28f6680d4404236ab373ece5914", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_9` generating a one-clock-cycle `tick` every 9 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_9 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 8) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_9", "divide": 9}, "prompt_sha1": "1c625b3dd199e85799b07861371704ec24a155a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8834-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8834×8 = 70672 bits.\nSerialization delay = bits/rate = 70672/(5000×10^6) s = 1.41344e-05 s = 14.134400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8834, "rate_mbps": 5000, "delay_s": 1.41344e-05}, "prompt_sha1": "18d7ef93e7195163fd169c7cfdb94830e74d4c5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_14_33_19` with RED, GREEN, YELLOW states. Hold RED for 14 clock cycles, GREEN for 33, and YELLOW for 19; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_14_33_19 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 13) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 32) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 18) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_14_33_19", "red": 14, "green": 33, "yellow": 19}, "prompt_sha1": "fbb6dbaa06ab21bb13f58c80e9c19f5e540fcd43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65362; x = x + 404;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65362+404 = 65766. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65766) mod 2^16 = 230. So `x` stores 230. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65362, "add": 404, "result": 230}, "prompt_sha1": "8286fb3026b13bb04a6a0b4f9397cd6fd4775888", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 50 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 50 MHz / 8 = 6.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 50000000.0, "divider": 8, "spi_hz": 6250000.0}, "prompt_sha1": "5ab75de08f1ee4a3c38e644e33900eba0a6a2bb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 58-bit up/down counter `updown_58_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_58_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [57:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 58'd288230376151711743) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_58_sat", "width": 58, "wrap": false}, "prompt_sha1": "32ba8ec1ad41d23e59763ed72916613396a346e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1500 bytes, IP header 40 bytes, and TCP header 20 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-40-20 = 1440 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 40, "tcphdr": 20, "mss": 1440}, "prompt_sha1": "116c4a44d164f1ad761a2ed6f59b734cd0544c0c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 128 KiB cache with 64-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "6f92f688dc9ec78cc8031fc4a3765666a17cd2d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0xC8, set bit 7 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 7)`. Result = 0xC8.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 200, "bit": 7, "op": "set", "result": 200}, "prompt_sha1": "b28cc2edde910a60ace15f0023ec4cffc942d771", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 50 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 50×10^6 / (768×8) = 8138.020833 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "frame_bytes": 768, "pps": 8138.020833333333}, "prompt_sha1": "0aad704271a5879943c2ddef7ae282bd66037626", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 4-way set-associative cache uses 128-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/128 = 64.\nSets = 64/4 = 16.\nOffset bits = log2(128) = 7; index bits = log2(16) = 4; tag bits = 48-7-4 = 37.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 128, "ways": 4, "addr_bits": 48, "lines": 64, "sets": 16, "offset": 7, "index": 4, "tag": 37}, "prompt_sha1": "aaefa71c793b346c38cd756059b3de11914304aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.5 V source drives a 3900 ohm resistor in series with an LED whose forward voltage is assumed to be 1.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.5-1.8 = 21.7 V.\nI = V/R = 21.7/3900 A = 5.5641 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.5, "vf": 1.8, "r": 3900, "current_a": 0.005564102564102564}, "prompt_sha1": "2df171f30159ce0d3ab5a131594e553c3af00bcc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/1000=0.012 A. P=V²/R=12²/1000=0.144 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 1000, "i": 0.012, "p": 0.144}, "prompt_sha1": "4b5ebba3099a747bd35275758629c55b6ef77372", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(4×1200) = 3333.333333.\nNearest integer divisor D = 3333.\nActual baud = 16000000/(4×3333) = 1200.120 baud.\nError = (1200.120-1200)/1200×100% = 0.0100%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 4, "baud": 1200, "divisor": 3333, "actual": 1200.1200120012002, "error_pct": 0.01000100010001385}, "prompt_sha1": "d110a5851b53f42317c66427c72f9e82ee68edcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 4700 ohm has 1 V across it. Compute current and dissipated power.", "output": "I=V/R=1/4700=0.000212765957 A. P=V²/R=1²/4700=0.000212765957 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1, "r": 4700, "i": 0.0002127659574468085, "p": 0.0002127659574468085}, "prompt_sha1": "2e9f2a3a1ae5d23c96c44bc8cf20e62797988181", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 57 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 57-21 = 36.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 57, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 36}, "prompt_sha1": "cade03eb9899d2444940c526dc7ac5fa2b297933", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 214 and tail index 728, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (214-728) mod 1024 = 510. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 214, "tail": 728, "occupancy": 510}, "prompt_sha1": "328848827ad5498d72c43ba37c876389f83bd194", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_9749` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_9749 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_9749", "width": 32}, "prompt_sha1": "cee2c016fcc4c440c4b4baee69fe59bfb644e019", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 22565 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 22565/1000 s; frequency = 1000/22565 = 0.044316 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 22565, "hz": 0.044316419233325945}, "prompt_sha1": "1ea4d8a429569441390ded3c0cb3ee0ca1539945", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 48-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^48/2^12 = 2^36 = 68719476736 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 48, "page_exp": 12, "entries": 68719476736}, "prompt_sha1": "cdeeb5656545a2113d7c0026762d7aa84be63f00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=1 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×22/(1+22) = 8.608696 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 1, "r2": 22, "vout": 8.608695652173912}, "prompt_sha1": "c7ad80bb7e806b78d75db80000856e79452f968a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w36_nocin` implementing a 36-bit unsigned adder with inputs `a`, `b` and outputs `36-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w36_nocin (\n input logic [35:0] a,\n input logic [35:0] b,\n output logic [35:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w36_nocin", "width": 36, "cin": false}, "prompt_sha1": "3dca0167101e12d19edff464586c819e0c78afe8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4661 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4661/(4661+40+8) = 0.989807 = 98.98%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4661, "iphdr": 40, "eff": 0.9898067530261202}, "prompt_sha1": "19d9f91610d1f8fcf0b6d570a65f75f47ba579c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5592 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5592/(5592+40+8) = 0.991489 = 99.15%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5592, "iphdr": 40, "eff": 0.9914893617021276}, "prompt_sha1": "14d3f3b2e27e13741e5e3396394d8a90354e1569", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x452323E7. Extract the 4-bit field starting at bit 7 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x452323E7 >> 7) & 0xF = 0x7 (7).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 7, "value": 1159930855, "mask": 15, "field": 7}, "prompt_sha1": "2a335a04d35960fcb8d2eb17d949fc8794fc5c45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=2200 nF and is stepped to 2.5 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=2.5(1-e^-0.5)=0.983673 V; τ=0.22 s and t=0.11 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 2.2e-06, "multiple": 0.5, "vin": 2.5, "vc": 0.9836733507184164}, "prompt_sha1": "036e375fcc80165a2b75b298456a94786085a1ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 908 elements. Review loop `for i in range(908-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(908-1)` produces indices 0 through 906, so index 907 is skipped. Correct loop: `for i in range(908):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 908, "variant": "miss_last"}, "prompt_sha1": "f39f26f863dfd48ac6ef5734e721cd40d920a403", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 4250 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 4250/1000 s; frequency = 1000/4250 = 0.235294 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 4250, "hz": 0.23529411764705882}, "prompt_sha1": "66cc22e7525c380e087931849385d990735ebecc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7133 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7133/(7133+40+8) = 0.993316 = 99.33%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7133, "iphdr": 40, "eff": 0.9933156941930094}, "prompt_sha1": "381f48d01e74cfd876d4245014285a62ebcb21d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=10 ms, C=4 ms,T=5 ms, C=2 ms,T=50 ms, C=5 ms,T=200 ms, C=1 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/10 + 4/5 + 2/50 + 5/200 + 1/5 = 1.565000 = 156.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 10], [4, 5], [2, 50], [5, 200], [1, 5]], "utilization": 1.565}, "prompt_sha1": "6c2386e4cde1a8bfcacdc9a680b675e359526105", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 24 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 24/(32×10^6) s = 0.750000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 24, "time_us": 0.75}, "prompt_sha1": "5d940e5419241bff3ca48ec9a0c4ed87ac15b93c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 20%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.200 × 2 = 0.040000.\nEffective CPI = 1 + 0.040000 = 1.040000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.2, "penalty": 2, "result": 1.04}, "prompt_sha1": "1ca5309569e272b132aca0df4d90afc376a2887d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 90%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.010×(20+0.100×100) = 1.800000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.99, "l2": 20, "l2_hit": 0.9, "mem": 100, "amat": 1.8000000000000003}, "prompt_sha1": "1762e89bde4486c5e198e60da6c28cf274192bd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 16 KiB direct-mapped data cache with 16-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 16 KiB = 16384 bytes.\nLines = 16384/16 = 1024.\nOffset bits = log2(16) = 4.\nIndex bits = log2(1024) = 10.\nTag bits = 24-10-4 = 10.\nCheck: 10+10+4 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 16384, "line": 16, "addr_bits": 24, "lines": 1024, "offset_bits": 4, "index_bits": 10, "tag_bits": 10}, "prompt_sha1": "163ff036e1ed568526ee3fa9838f00f884b2b296", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 18-bit up/down counter `updown_18_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_18_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [17:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_18_wrap", "width": 18, "wrap": true}, "prompt_sha1": "1bb9bdad337de016dbaa55510b3779ec96185c18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_36_5_10` with RED, GREEN, YELLOW states. Hold RED for 36 clock cycles, GREEN for 5, and YELLOW for 10; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_36_5_10 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 35) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 4) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 9) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_36_5_10", "red": 36, "green": 5, "yellow": 10}, "prompt_sha1": "e4c3a66c558b00cd54bfbe75ffad23d5672f1286", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD5A07B8131 in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: D5 A0 7B 81 31.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 917520482609, "endian": "big", "bytes": [213, 160, 123, 129, 49]}, "prompt_sha1": "1bee591538eb33a82d45aa5190b03381ba2d7e87", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 2 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(2×10^6) s = 512.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 2, "bits": 1024, "time_us": 512.0}, "prompt_sha1": "f69057738e3a7980bd653eb04e8e804bb5ae7b6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [9, 3, 3, 7, 2]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [24, 7, 10, 23, 16].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [9, 3, 3, 7, 2], "finish": [24, 7, 10, 23, 16]}, "prompt_sha1": "d6c0c67114a71b5dede20fe40601a2d2305c888d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 110000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 110000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 110000.00000000001}, "prompt_sha1": "78221f2bbfc8c5c2202fae8be3ce2a5db7bab9f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 123 and initial occupancy is 78. In an abstract batch, producer attempts to enqueue 82 items first, dropping any excess beyond capacity; then consumer removes up to 156 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=123, dropped=37; consumed=123; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 123, "start": 78, "prod": 82, "cons": 156, "dropped": 37, "consumed": 123, "final": 0}, "prompt_sha1": "9f1a91498ab876328d886021cd030f483183c471", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1084-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1084×8 = 8672 bits.\nSerialization delay = bits/rate = 8672/(10000×10^6) s = 8.672e-07 s = 0.867200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1084, "rate_mbps": 10000, "delay_s": 8.672e-07}, "prompt_sha1": "d882e673b1b27293dd5d3be9c2db3515fed7e181", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 48 MHz, prescaler divisor is 697, and period is 46693 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 48000000/(697×46693) = 1.474880 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 48000000, "prescaler": 697, "period": 46693, "hz": 1.4748799824095982}, "prompt_sha1": "52e194cae04fee4f2075ba56677984e7f6fd7ff9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w45_unsigned` comparing two 45-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w45_unsigned (\n input logic [44:0] a,\n input logic [44:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w45_unsigned", "width": 45, "signed": false}, "prompt_sha1": "c2a5250b51bb6670d87627654322fc974909af36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4106 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4106/(4106+40+8) = 0.988445 = 98.84%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4106, "iphdr": 40, "eff": 0.9884448724121329}, "prompt_sha1": "24a49a24daf5dd868d9039d97e01aafb2c5e2b6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 43-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^43/2^12 = 2^31 = 2147483648 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 43, "page_exp": 12, "entries": 2147483648}, "prompt_sha1": "83da116b40259eae2b101def7bf682d70c868a7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 20% of instructions, the branch misprediction rate is 15%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.150 × 2 = 0.060000.\nEffective CPI = 1 + 0.060000 = 1.060000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.2, "mispred": 0.15, "penalty": 2, "result": 1.06}, "prompt_sha1": "ef0f9f88250123ce376d78a782b2d5569d1041a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w7_m66` with clk, asynchronous active-low rst_n, active-high enable, and output logic [6:0] count. On reset count=0. When enabled it increments until 66 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w7_m66 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [6:0] count\n);\n localparam logic [6:0] LIMIT = 7'd66;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w7_m66", "width": 7, "max": 66}, "prompt_sha1": "6c01590276e5f7332ea601f5aa318f5e93ae4791", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 250 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 250×10^6 × 300/1000 = 7.5e+07 bits = 9.375e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 250, "rtt_ms": 300, "bits": 75000000.0, "bytes": 9375000.0}, "prompt_sha1": "ee3bc03658694de47b753d6b22ac6ebfb5252096", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3267 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3267/(3267+20+8) = 0.991502 = 99.15%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3267, "iphdr": 20, "eff": 0.9915022761760243}, "prompt_sha1": "3e1238c6f10c2342942e2a96c115bce712184c00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/47=0.510638298 A. P=V²/R=24²/47=12.2553191 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 47, "i": 0.5106382978723404, "p": 12.25531914893617}, "prompt_sha1": "f25f9b34b0b17e7eac86a5a1ecc0d40113e05a3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1000 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.001×12²=0.072 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.001, "v": 12, "energy": 0.07200000000000001}, "prompt_sha1": "0b39ea24367005f05ed66dd2b700b170843ea51a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/1 = 0.022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 1, "tau": 0.022}, "prompt_sha1": "baf60d8d90f11a4ba2e591f739bd5d55e6479eb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 13.1 V source drives a 470 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 13.1-2.2 = 10.9 V.\nI = V/R = 10.9/470 A = 23.1915 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 13.1, "vf": 2.2, "r": 470, "current_a": 0.023191489361702126}, "prompt_sha1": "000dec914ccd5c575eccb27c963f1695c8062108", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=40 ms, C=1 ms,T=200 ms, C=2 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/40 + 1/200 + 2/40 = 0.180000 = 18.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 40], [1, 200], [2, 40]], "utilization": 0.18}, "prompt_sha1": "83e2adb95ea49d9baa82691aee3bc342b220515d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 64 data bits per transfer at 1000 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 64/8 = 8. Bandwidth = 8×1000×10^6×1 = 8.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 64, "rate_mt": 1000, "channels": 1, "gbps": 8.0}, "prompt_sha1": "7eda96837cc18a1d1235ca5b43818be8953d8b80", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65302; x = x + 393;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65302+393 = 65695. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65695) mod 2^16 = 159. So `x` stores 159. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65302, "add": 393, "result": 159}, "prompt_sha1": "013506f93cec5f18dc6294cf670f7e5321beabe8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 24 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 28800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 24000000/(16×28800) = 52.083333.\nNearest integer divisor D = 52.\nActual baud = 24000000/(16×52) = 28846.154 baud.\nError = (28846.154-28800)/28800×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 24000000, "oversample": 16, "baud": 28800, "divisor": 52, "actual": 28846.153846153848, "error_pct": 0.1602564102564151}, "prompt_sha1": "355b53221b4924d169a242461ca60b4a82610324", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w32_cin` implementing a 32-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `32-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w32_cin (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic cin,\n output logic [31:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w32_cin", "width": 32, "cin": true}, "prompt_sha1": "6eecac37c8fdc5a6d61bf734ef4a82370610b37f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3800 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "6c2ea32c1e20c20abbc9accdb9f43cd1feac1020", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_20_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 20 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_20_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd20;\n end else begin\n if (pulse_in)\n count <= 5'd20;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_20_retrig", "cycles": 20, "retrigger": true}, "prompt_sha1": "eb13325bae34be5a38fa0465e5ee9309d67450c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 20-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-20 = 3980 bytes.\nRound down to an 8-byte multiple: floor((3980)/8)×8 = 3976 bytes.\nFragments required = ceil(4000/3976) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 20, "payload": 4000, "max_payload": 3976, "fragments": 2}, "prompt_sha1": "f3dcec7a3cfbad6d3cc97cc6c2ab6a4f539c3823", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 2 register-address byte(s), and 35 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 35 = 38.\nClock pulses = 38×9 = 342.\nTime = 342/400000 s = 855.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 2, "payload": 35, "clocks": 342, "time_s": 0.000855}, "prompt_sha1": "2a125943fb94fcd03d43cabde98e3158cca507e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 470 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.00047×48²=0.54144 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.00047, "v": 48, "energy": 0.54144}, "prompt_sha1": "67addb937bc36c86347664eeeaa3a3952d1c5271", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 898 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×898/(64×10^6) = 0.0007015625 = 0.070156%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 50, "cycles": 898, "load": 0.0007015625}, "prompt_sha1": "d654eb915f4c8d35dba97ae1716b8333b35f30ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x83FA. Extract the 4-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x83FA >> 2) & 0xF = 0xE (14).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 4, "lsb": 2, "value": 33786, "mask": 15, "field": 14}, "prompt_sha1": "046bf6591938078379d9bbc06796829324750483", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 8-bit up/down counter `updown_8_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_8_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [7:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 8'd255) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_8_sat", "width": 8, "wrap": false}, "prompt_sha1": "b925a027472a9bc98c4425e79cdcf2551b232a4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=100 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 100×10^-3/2.2 = 0.0454545455 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.1, "r": 2.2, "tau": 0.045454545454545456}, "prompt_sha1": "409932677c45e749c71c006226a648c834785057", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/1000 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 1000, "tau": 1e-05}, "prompt_sha1": "868df45933aff462e5093e18a016ef475d60cfd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 1 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×160×10^6 = 160000000 B/s. Time = 131072/160000000 = 0.0008192 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 1, "rate_mhz": 160, "sec": 0.0008192}, "prompt_sha1": "01a4bf02fd40ec574e2f0eb5f14d98e6265ee90c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 92%. An L2 miss adds 150 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.100×(3+0.080×150) = 2.500000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.9, "l2": 3, "l2_hit": 0.92, "mem": 150, "amat": 2.499999999999999}, "prompt_sha1": "a5220be100bf9764305d85513f26d5168e3e3480", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_60` for a 60-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_60 (\n input logic signed [59:0] data,\n input logic [5:0] shamt,\n output logic signed [59:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_60", "width": 60, "direction": "right", "arithmetic": true}, "prompt_sha1": "7c0ac0e25ded6debb12c4a104c7fb5420ef358c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 40000 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 40000×10^6 / (256×8) = 19531250.000000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "frame_bytes": 256, "pps": 19531250.0}, "prompt_sha1": "dc3bf28049764c87ac16d98d9a40b8181a507c74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1942998491, carries 36974 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 36974+1+0 = 36975. ACK = (1942998491+36975) mod 2^32 = 1943035466.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1942998491, "payload": 36974, "syn": 1, "fin": 0, "ack": 1943035466}, "prompt_sha1": "8224d07144497d8ae09c03b54ca8918e3fa276b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 3200 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×3200×10^6×6 = 96.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 3200, "channels": 6, "gbps": 96.0}, "prompt_sha1": "b7975dac10ab9ae6cddfa0245fe5f647e02a4390", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 2400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×2400×10^6×4 = 48.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 2400, "channels": 4, "gbps": 48.0}, "prompt_sha1": "9586de11c80635b1f43a6049f2eba8a57cba0b45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7170-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7170×8 = 57360 bits.\nSerialization delay = bits/rate = 57360/(10×10^6) s = 0.005736 s = 5736.000000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7170, "rate_mbps": 10, "delay_s": 0.005736}, "prompt_sha1": "9ffb7668348c2cf2455170caaff45cc6acfcc6fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x556D. Extract the 8-bit field starting at bit 5 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x556D >> 5) & 0xFF = 0xAB (171).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 8, "lsb": 5, "value": 21869, "mask": 255, "field": 171}, "prompt_sha1": "7faea658b9c034cc186522b8ae205dd75174f736", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 1 MHz, prescaler divisor is 740, and period is 17544 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 1000000/(740×17544) = 0.077026 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 1000000, "prescaler": 740, "period": 17544, "hz": 0.0770264108157405}, "prompt_sha1": "fe05b0b2b3629bf0ffa3da126e1591f5f70065b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=22 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×2.2/(22+2.2) = 0.300000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 22, "r2": 2.2, "vout": 0.3}, "prompt_sha1": "b40454291c1c518c7c66452e1841e307e4665f88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_6806` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_6806 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_6806"}, "prompt_sha1": "0777cf604dc70d7e9ac07548be0f2c3ad0cbdb18", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7C, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x7C<<1)|1 = 0xF9 = 11111001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 124, "rw": 1, "byte": 249}, "prompt_sha1": "26a0538c8dda91fbe9ce4f7c9e90dafc4bd378b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_54` for a synchronous sampled input `noisy`. Update output `clean` only after observing 54 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_54 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 53) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_54", "stable_samples": 54}, "prompt_sha1": "3149a3d34d8c06ea2df205a431a406630b43c6d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 123 and initial occupancy is 44. In an abstract batch, producer attempts to enqueue 78 items first, dropping any excess beyond capacity; then consumer removes up to 87 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=122, dropped=0; consumed=87; final occupancy=35.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 123, "start": 44, "prod": 78, "cons": 87, "dropped": 0, "consumed": 87, "final": 35}, "prompt_sha1": "7dc7079aab399ab33d9c08ab204dbbbe5babbedf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×48²=2.5344 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 48, "energy": 2.5343999999999998}, "prompt_sha1": "c65fdb632ac703dc42318f3390f01f6952e7f498", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0xF2DD, set bit 11 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 11)`. Result = 0xFADD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 62173, "bit": 11, "op": "set", "result": 64221}, "prompt_sha1": "c8f6a9baa45004b197e9eeb5404cf30a3fbe54b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_146` generating a one-clock-cycle `tick` every 146 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_146 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 145) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_146", "divide": 146}, "prompt_sha1": "999c5dcd1c135c33960a8c2e78dc79a4d1f1e9f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.164.215.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.164.215.0\nBroadcast address: 10.164.215.63\nUsable host range: 10.164.215.1 to 10.164.215.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.164.215.0/26", "usable": 62, "first": "10.164.215.1", "last": "10.164.215.62", "broadcast": "10.164.215.63"}, "prompt_sha1": "e9e130ccae33e1a39a2c9cf05cde4cd4adedd7e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 3.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 3.5+16 = 19.5. Period = 19.5/16000000 = 1.21875e-06 s. Maximum rate = 1/period = 820512.820513 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 3.5, "conv_cycles": 16, "period": 1.21875e-06, "rate": 820512.8205128205}, "prompt_sha1": "29d9bff4e2ab0b26f1a08886b1075f439f5bb41a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 15 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 15/1000 = 3e+08 bits = 3.75e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 15, "bits": 300000000.0, "bytes": 37500000.0}, "prompt_sha1": "2686bff1e738f9d7b76acb675a1545821da68865", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 22832. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 22832/65535 × 3.3 V = 1.149700 V.\nThus the estimated input is about 1.1497 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 22832, "volts": 1.1497001602197299}, "prompt_sha1": "07eb8005e9e37ce248884cb5cd7efe5c2dc0b402", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=2.2 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/2.2 = -1.000000.\nVout = A_v×Vin = -1.000000×0.1 = -0.100000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 2.2, "vin": 0.1, "gain": -1.0, "vout": -0.1}, "prompt_sha1": "dfb7de396157dbed838d8782e1fdc4fe79ee079a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/47 = 0.0212765957 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 47, "tau": 0.02127659574468085}, "prompt_sha1": "ae75d48b483bbcb559dd713c3f7ce6c9146597f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 48 MHz, prescaler divisor is 705, and period is 42447 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 48000000/(705×42447) = 1.604003 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 48000000, "prescaler": 705, "period": 42447, "hz": 1.6040027889598494}, "prompt_sha1": "2ff0c57f84d807c98d41da509e299864940b8a33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 3 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×3/(3×10^9) = 0.1 s = 100.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 3.0, "ghz": 3.0, "sec": 0.1}, "prompt_sha1": "07512fca55682ab7d956de828d440ea1d60b1162", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 33-bit left-shift register module `shiftreg_left_33`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `33-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_33 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [32:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[31:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_33", "width": 33, "direction": "left"}, "prompt_sha1": "142a6688a28a621181252dea1e93748c40d35213", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_8_12_14` with RED, GREEN, YELLOW states. Hold RED for 8 clock cycles, GREEN for 12, and YELLOW for 14; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_8_12_14 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [3:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 7) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 11) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 13) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_8_12_14", "red": 8, "green": 12, "yellow": 14}, "prompt_sha1": "6ad02edd73d2cc0952896df254cd635d83cd4f55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w6_cin` implementing a 6-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `6-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w6_cin (\n input logic [5:0] a,\n input logic [5:0] b,\n input logic cin,\n output logic [5:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w6_cin", "width": 6, "cin": true}, "prompt_sha1": "1e1217c0455cb785780330cbf8dc32a283ad9cd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 15%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.150 × 3 = 0.067500.\nEffective CPI = 1 + 0.067500 = 1.067500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.15, "penalty": 3, "result": 1.0675}, "prompt_sha1": "8909fbb59d076665eb1fc5f138ba96919015740f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1000010001101100 using generator polynomial bits 1011. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 11, "msg_bits": 16, "msg": 33900, "remainder": 7}, "prompt_sha1": "552cba73e0921799d1259a02f93d6f9b30d82424", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 5` on one shared integer without synchronization. Assume `packets` initially equals 335. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 335; T2 reads 335; both compute 340; T1 writes 340; T2 writes 340. The observed final value is 340, but two serial increments would produce 345.\n\n```\nlock(mutex)\npackets = packets + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "65c0a97583d2fd2a05fb4a9f4a31db072cdc8bd1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 100 MHz, prescaler divisor is 886, and period is 36943 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 100000000/(886×36943) = 3.055161 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 100000000, "prescaler": 886, "period": 36943, "hz": 3.0551611172821973}, "prompt_sha1": "6c19e79252492bef4716e4bf13f3c71693ef6faa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 300 counts per period. What compare/high-time count produces exactly 80% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.8 × 300 = 240. Verification: 240/300 = 0.8, which is 80%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 300, "duty": 80, "high": 240}, "prompt_sha1": "c623f604ae223a29cdd89305205fc47a9ee39ba8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 4000 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×4000×10^6×4 = 32.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 4000, "channels": 4, "gbps": 32.0}, "prompt_sha1": "9867240a250a64419ae0c79708bd2e11c6709863", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTNNNTNNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "afd18e7d0bde67124aa21f035444647505f28184", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 1151 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×1151/(200×10^6) = 0.01151 = 1.151000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 2000, "cycles": 1151, "load": 0.01151}, "prompt_sha1": "1ee771243aa2e0f05f380cc09639db0463803dd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 32; x = x + 692;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 32+692 = 724. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (724) mod 2^8 = 212. So `x` stores 212. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 32, "add": 692, "result": 212}, "prompt_sha1": "e019f7c536db62e0c4f4458002791147c0928c88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3713503453, carries 22787 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 22787+1+1 = 22789. ACK = (3713503453+22789) mod 2^32 = 3713526242.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3713503453, "payload": 22787, "syn": 1, "fin": 1, "ack": 3713526242}, "prompt_sha1": "6da83407c141ceb6be1dd65213fd8d3f064a6d57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x12_no_bypass` with 128 entries of 12 bits. Inputs: `clk`, `we`, `7-bit waddr`, `12-bit wdata`, `7-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x12_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [11:0] wdata,\n input logic [6:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x12_no_bypass", "entries": 128, "width": 12, "mode": "no_bypass"}, "prompt_sha1": "27d0d56f16ba7efc250430be50791cb99f5807d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 520, and period is 18698 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(520×18698) = 16.455894 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 520, "period": 18698, "hz": 16.455894089865637}, "prompt_sha1": "3c9195ad05f7ec1a27364197b75330d71d706873", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_58` for a 58-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_58 (\n input logic [57:0] data,\n input logic [5:0] shamt,\n output logic [57:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_58", "width": 58, "direction": "left", "arithmetic": false}, "prompt_sha1": "a4907accad37e5e0a6f24567fc6f8f84c88ecc85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 674 elements. Review loop `for i in range(674-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(674-1)` produces indices 0 through 672, so index 673 is skipped. Correct loop: `for i in range(674):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 674, "variant": "miss_last"}, "prompt_sha1": "c36a213fc958139e734f018c238a751158e67cf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 8%, and each misprediction costs 4 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.080 × 4 = 0.064000.\nEffective CPI = 1.2 + 0.064000 = 1.264000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.08, "penalty": 4, "result": 1.264}, "prompt_sha1": "507d978d6fa6af73840cf6161695293371a5ca00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 64-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (64×8) = 976562.500000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 64, "pps": 976562.5}, "prompt_sha1": "5b072b9f25fdf5e1fb9a482923752e2aa79de1a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_361928` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_361928 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_361928"}, "prompt_sha1": "accb6a879647aabe63be833027c9fc8a67a68cb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 10 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 460800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 10000000/(4×460800) = 5.425347.\nNearest integer divisor D = 5.\nActual baud = 10000000/(4×5) = 500000.000 baud.\nError = (500000.000-460800)/460800×100% = 8.5069%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 10000000, "oversample": 4, "baud": 460800, "divisor": 5, "actual": 500000.0, "error_pct": 8.506944444444445}, "prompt_sha1": "a2a306a0415f43a5eb9c8d238f4b1e105e1b7701", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x5474914C. Extract the 4-bit field starting at bit 19 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x5474914C >> 19) & 0xF = 0xE (14).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 19, "value": 1416925516, "mask": 15, "field": 14}, "prompt_sha1": "c4541136c5d701de7efbd2bf7c4468ba5635f5bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 127 elements. Review loop `for i in range(127-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(127-1)` produces indices 0 through 125, so index 126 is skipped. Correct loop: `for i in range(127):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 127, "variant": "miss_last"}, "prompt_sha1": "c085d28ae894b0675c47affe09b44fd777bca69a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 37 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 37×13 = 481. Time = 481/19200 = 0.0250520833 s = 25.052083 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 9, "parity": 1, "stop": 2, "frames": 37, "seconds": 0.025052083333333332}, "prompt_sha1": "0819f3d2a51566e7d11171f7a6c3391ac208b3e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xDE. Extract the 2-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xDE >> 4) & 0x3 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 2, "lsb": 4, "value": 222, "mask": 3, "field": 1}, "prompt_sha1": "737ab614930443ec31e9869a80c0dc481ca34cff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 310 elements. Review loop `for i in range(310-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(310-1)` produces indices 0 through 308, so index 309 is skipped. Correct loop: `for i in range(310):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 310, "variant": "miss_last"}, "prompt_sha1": "c457a97b4b2478f50888c033d5178cf34376a32c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 25-bit up/down counter `updown_25_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_25_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [24:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_25_wrap", "width": 25, "wrap": true}, "prompt_sha1": "4b9dce2b6f37ddefd592497f3f0144fa9c1aa4be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1400 payload bytes plus 96 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1400/(1400+96) = 0.935829 = 93.58%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1400, "overhead": 96, "efficiency": 0.9358288770053476}, "prompt_sha1": "2efeca83a51bb9357affbdc0b457c7a385809ab1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 25 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 25000000/5000 = 5000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 5000 that also keeps the period count within 16 bits is 1250.\nPeriod count = 5000/1250 = 4.\nPSC register = 1250-1 = 1249.\nARR register = 4-1 = 3.\nVerification: 25000000/(1250×4) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 25000000, "target_hz": 5000, "total_division": 5000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1250, "period": 4, "psc_reg": 1249, "arr_reg": 3}, "prompt_sha1": "28cfe7978cebec7a265b30adae5f64a83b1a3d53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 8 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 8/(50×10^6) s = 0.160000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 8, "time_us": 0.16}, "prompt_sha1": "84c7aff9492476e40b0dd5bd76027cad543c5014", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_109754` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_109754 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_109754"}, "prompt_sha1": "aa2b422306808e395c0a067e3752c8a0c48abf1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 57 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 57 = 60.\nClock pulses = 60×9 = 540.\nTime = 540/1000000 s = 540.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 57, "clocks": 540, "time_s": 0.00054}, "prompt_sha1": "262c3d6802e5c31f7cb925fa3f6cd1fce9530833", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 104 and initial occupancy is 63. In an abstract batch, producer attempts to enqueue 138 items first, dropping any excess beyond capacity; then consumer removes up to 24 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=104, dropped=97; consumed=24; final occupancy=80.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 104, "start": 63, "prod": 138, "cons": 24, "dropped": 97, "consumed": 24, "final": 80}, "prompt_sha1": "945b6a46e70181975c4708d7ca4002235402888f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 240 MHz and must generate an exact 1600 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 240000000/1600 = 150000.\nWith prescaler divisor limited to at most 128, the largest divisor of 150000 that also keeps the period count within 16 bits is 125.\nPeriod count = 150000/125 = 1200.\nPSC register = 125-1 = 124.\nARR register = 1200-1 = 1199.\nVerification: 240000000/(125×1200) = 1600 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 240000000, "target_hz": 1600, "total_division": 150000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 1200, "psc_reg": 124, "arr_reg": 1199}, "prompt_sha1": "17327b2078b330d2e9b2e29b1956f0a73041d3a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×1²=5e-09 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 1, "energy": 5e-09}, "prompt_sha1": "60014ffdd55d9978c9c39b5cd6b27d598a0e481e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_115_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 115 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_115_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd115;\n end else begin\n if (pulse_in)\n count <= 7'd115;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_115_retrig", "cycles": 115, "retrigger": true}, "prompt_sha1": "f59d3d7ffd79300b9a825bc864d697dd1dbc1206", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 128 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 128/(32×10^6) s = 4.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 128, "time_us": 4.0}, "prompt_sha1": "db912f96bf4c2f8f9f7da9dc7e66708ea7ede2e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=5 ms,T=20 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 5/20 + 4/20 = 0.450000 = 45.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[5, 20], [4, 20]], "utilization": 0.45}, "prompt_sha1": "8d2ce967cc6c6665dfb710eb395cede83c3795b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_83_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 83 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_83_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd83;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_83_ignore", "cycles": 83, "retrigger": false}, "prompt_sha1": "740247e2ab6d19206fba63a9ba0343e0d095bf1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 27 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×27)/(680+27) = 25.968883 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 27, "req": 25.968882602545968}, "prompt_sha1": "e1ba78c9152fe810c23c54d4134e932348b66be1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=40 ms, C=4 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/40 + 4/40 = 0.200000 = 20.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 40], [4, 40]], "utilization": 0.2}, "prompt_sha1": "dcaa74f36c152cbf671729c0dd851b557698fc83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 32 = 0.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 32, "spi_hz": 250000.0}, "prompt_sha1": "64d6bf0d06f45e263525b0e9278e3d40ef79c0ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 2000 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 2000-20-60 = 1920 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 2000, "iphdr": 20, "tcphdr": 60, "mss": 1920}, "prompt_sha1": "3ad186d631ac7965c174a9d9119c3c548fa73743", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 512 data bits per transfer at 1000 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 512/8 = 64. Bandwidth = 64×1000×10^6×8 = 512.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 512, "rate_mt": 1000, "channels": 8, "gbps": 512.0}, "prompt_sha1": "531bb498669db132c2fb67ed445b0474f0ca53d9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w40_cin` implementing a 40-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `40-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w40_cin (\n input logic [39:0] a,\n input logic [39:0] b,\n input logic cin,\n output logic [39:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w40_cin", "width": 40, "cin": true}, "prompt_sha1": "f4e316de72388395c9acce0284a30bf36c8aa352", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `size` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n result += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `table[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n result += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8d7a7ec841a8e10572167be50994e8890c70bfbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=330000 ohm and C=1800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=330000×1800000×10^-12 s = 0.594 s.\nf_c=1/(2πRC)=1/(2π×330000×1800000×10^-12) = 0.2679 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 330000, "c_f": 1.8e-06, "tau": 0.594, "fc": 0.26793761463282045}, "prompt_sha1": "4b8fd607a09d36e030127cf0e5a136bbf3dac144", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=40 ms, C=1 ms,T=5 ms, C=5 ms,T=40 ms, C=1 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/40 + 1/5 + 5/40 + 1/40 = 0.375000 = 37.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 40], [1, 5], [5, 40], [1, 40]], "utilization": 0.375}, "prompt_sha1": "097890a6fa3c327b56342cb2753584409d904109", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8510` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8510 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8510"}, "prompt_sha1": "2254f5d05f4cc34506f93d7d815b158f6e7b1220", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 99.2% hit rate, and a 190 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.992 = 0.008.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.008×190 ns = 2.2700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.992, "penalty": 190, "result": 2.2700000000000014}, "prompt_sha1": "a6ba12040cd98a6240c64c5406656aa54996adfa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w25_unsigned` comparing two 25-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w25_unsigned (\n input logic [24:0] a,\n input logic [24:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w25_unsigned", "width": 25, "signed": false}, "prompt_sha1": "fbf95af873ca6829fe0fecc1f7089469816ec8dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x3E, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x3E<<1)|1 = 0x7D = 01111101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 62, "rw": 1, "byte": 125}, "prompt_sha1": "7c17f0f584d4958cdfeb49aceeb57f4a7de108f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/47=0.070212766 A. P=V²/R=3.3²/47=0.231702128 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 47, "i": 0.0702127659574468, "p": 0.23170212765957443}, "prompt_sha1": "82a8b24c11e44dbe43afdbcce3d1e37469592aa0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 64-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/64 = 128.\nOffset bits = log2(64) = 6.\nIndex bits = log2(128) = 7.\nTag bits = 28-7-6 = 15.\nCheck: 15+7+6 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 64, "addr_bits": 28, "lines": 128, "offset_bits": 6, "index_bits": 7, "tag_bits": 15}, "prompt_sha1": "fe0108ef4eb9fc1f7ab2d436fec538215de7e4cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.89. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.89) + 0.89/64) = 8.070618.\nThe theoretical speedup is about 8.071×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.89, "n": 64, "result": 8.070617906683482}, "prompt_sha1": "825ba61a4c6c6775743325662c21b7c2d980abd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 19.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+16 = 35.5. Period = 35.5/20000000 = 1.775e-06 s. Maximum rate = 1/period = 563380.281690 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 19.5, "conv_cycles": 16, "period": 1.775e-06, "rate": 563380.2816901408}, "prompt_sha1": "b1e70809c6a484124a0bffa753bf9ad1775b8547", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 8 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(8×10^6) s = 2.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 8, "bits": 16, "time_us": 2.0}, "prompt_sha1": "35386b7dce6da328adeba642800e228bf68e6aa9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `items` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n sum += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `buf[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n sum += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "3adc9b528f01218590b3317aa67b8a943f63df46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 16.3 V source drives a 100 ohm resistor in series with an LED whose forward voltage is assumed to be 2.1 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 16.3-2.1 = 14.2 V.\nI = V/R = 14.2/100 A = 142.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 16.3, "vf": 2.1, "r": 100, "current_a": 0.14200000000000002}, "prompt_sha1": "e590e6d30a0e57e3c4cb75940000a0a48c3a87db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_20` for a 20-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_20 (\n input logic [19:0] data,\n input logic [4:0] shamt,\n output logic [19:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_20", "width": 20, "direction": "right", "arithmetic": false}, "prompt_sha1": "25bb946f91165811f6e7cafd6b870a5bdc236bf4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×3.3²=0.0255915 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 3.3, "energy": 0.025591499999999996}, "prompt_sha1": "fe200106d06109a42f0ce46207059135b691cbdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 128-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/128 = 32.\nOffset bits = log2(128) = 7.\nIndex bits = log2(32) = 5.\nTag bits = 32-5-7 = 20.\nCheck: 20+5+7 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 128, "addr_bits": 32, "lines": 32, "offset_bits": 7, "index_bits": 5, "tag_bits": 20}, "prompt_sha1": "3b6b06621049a19a102bdf83a9161fb47ae21705", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 64-bit up/down counter `updown_64_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_64_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [63:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 64'd18446744073709551615) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_64_sat", "width": 64, "wrap": false}, "prompt_sha1": "9da861df4eac8f7b9a1871dc39abe691b559d8fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m6065` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 6065 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m6065 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd6065;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m6065", "width": 13, "max": 6065}, "prompt_sha1": "5a30ef375d5686453d8b2d79cdc7ce668af90c65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.96.3.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.96.3.0\nBroadcast address: 10.96.3.63\nUsable host range: 10.96.3.1 to 10.96.3.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.96.3.0/26", "usable": 62, "first": "10.96.3.1", "last": "10.96.3.62", "broadcast": "10.96.3.63"}, "prompt_sha1": "2e6844bf28829d235fc3845fb01004272df55769", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 100 MHz and must generate an exact 200 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 100000000/200 = 500000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 500000 that also keeps the period count within 16 bits is 6250.\nPeriod count = 500000/6250 = 80.\nPSC register = 6250-1 = 6249.\nARR register = 80-1 = 79.\nVerification: 100000000/(6250×80) = 200 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 100000000, "target_hz": 200, "total_division": 500000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 6250, "period": 80, "psc_reg": 6249, "arr_reg": 79}, "prompt_sha1": "4506d8511293bd146592ab8fb93e6c0002a7e5ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8544-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8544×8 = 68352 bits.\nSerialization delay = bits/rate = 68352/(100×10^6) s = 0.00068352 s = 683.520000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8544, "rate_mbps": 100, "delay_s": 0.00068352}, "prompt_sha1": "7a53d3b92fb1efebff72109f539bd91cc2268e0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 64 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 64×7 = 448. Time = 448/1000000 = 0.000448 s = 0.448000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 5, "parity": 0, "stop": 1, "frames": 64, "seconds": 0.000448}, "prompt_sha1": "4c1d30b8182556b671e1dfa62c1f21062d41d381", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=47 nF and is stepped to 2.5 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=2.5(1-e^-2)=2.161662 V; τ=4.7e-05 s and t=9.4e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7000000000000004e-08, "multiple": 2, "vin": 2.5, "vc": 2.161661791908468}, "prompt_sha1": "f9340cca8ae4e53f5224474ae1e86dd41d13ea79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 5 V reference and returns code 19. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 19/255 × 5 V = 0.372549 V.\nThus the estimated input is about 0.3725 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 5.0, "code": 19, "volts": 0.37254901960784315}, "prompt_sha1": "e87cf59cf46cccc8ebc643efc3cb830f0512d5b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_3045(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_3045(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_3045([1, 2]) == 1.5\nassert mean_3045([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_3045"}, "prompt_sha1": "a9b1ac3c3170297cd79dc978cabdd45a2e892659", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 20.1 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 2.8 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 20.1-2.8 = 17.3 V.\nI = V/R = 17.3/560 A = 30.8929 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 20.1, "vf": 2.8, "r": 560, "current_a": 0.030892857142857146}, "prompt_sha1": "77d7fbfb222943dcc4e238060fc2b599c23e2445", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w53_nocin` implementing a 53-bit unsigned adder with inputs `a`, `b` and outputs `53-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w53_nocin (\n input logic [52:0] a,\n input logic [52:0] b,\n output logic [52:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w53_nocin", "width": 53, "cin": false}, "prompt_sha1": "5b9c0e47d9ac76c42437081345093a315d067b40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w64_1547` implementing a dual-clock asynchronous FIFO with depth 4 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w64_1547 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 64,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w64_1547", "depth": 4, "width": 64, "ptr_w": 2}, "prompt_sha1": "1ac8a9b081884692f1808fe035a737de97ce6b5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `items` elements of type `double`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n result += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `data[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n result += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ad227254542b7c45676e6599801e219ba90bd2b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 200 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 512. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 200000000/5000 = 40000.\nWith prescaler divisor limited to at most 512, the largest divisor of 40000 that also keeps the period count within 16 bits is 500.\nPeriod count = 40000/500 = 80.\nPSC register = 500-1 = 499.\nARR register = 80-1 = 79.\nVerification: 200000000/(500×80) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 200000000, "target_hz": 5000, "total_division": 40000, "max_prescaler": 512, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 500, "period": 80, "psc_reg": 499, "arr_reg": 79}, "prompt_sha1": "d866ef734c43bed1da7996bb32c1deabdc4c7fa8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^19 V = 1.14440917969e-05 V = 11.444092 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 6.0, "step": 1.1444091796875e-05}, "prompt_sha1": "6546dca5f45e81b0236bd07a0ede37f9e98ec4cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_19_lsb` for `19-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_19_lsb (\n input logic [18:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 18; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_19_lsb", "width": 19, "priority": "low"}, "prompt_sha1": "80042b8d6e6f4b0652723f72a603816b2c410d4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w2_signed` comparing two 2-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w2_signed (\n input logic signed [1:0] a,\n input logic signed [1:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w2_signed", "width": 2, "signed": true}, "prompt_sha1": "116a67a7e66ab0091c57e19fbdf21fe8cbc45ea3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 4780-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 4780×8 = 38240 bits.\nSerialization delay = bits/rate = 38240/(1000×10^6) s = 3.824e-05 s = 38.240000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 4780, "rate_mbps": 1000, "delay_s": 3.824e-05}, "prompt_sha1": "01f74dd4f48a451f207fb2034b755af9e473574c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 3 ns hit time, 89.3% hit rate, and a 150 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.893 = 0.107.\nAMAT = hit time + miss rate × miss penalty\n= 3 ns + 0.107×150 ns = 19.0500 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 3.0, "hit_rate": 0.893, "penalty": 150, "result": 19.049999999999997}, "prompt_sha1": "c93ea3bb278528871c383c7b251979f43ca530a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2200 ohm and C=3900000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2200×3900000×10^-12 s = 0.00858 s.\nf_c=1/(2πRC)=1/(2π×2200×3900000×10^-12) = 18.5495 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2200, "c_f": 3.9e-06, "tau": 0.008579999999999999, "fc": 18.549527166887568}, "prompt_sha1": "4518219922760d6a95789ea67e8d6e4ac2b3902a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 3702 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "efea82e4dcdde030d7c64a0d84246949a435850a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xB1D9681B. Extract the 4-bit field starting at bit 0 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xB1D9681B >> 0) & 0xF = 0xB (11).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 4, "lsb": 0, "value": 2983815195, "mask": 15, "field": 11}, "prompt_sha1": "0fc043a2791c36a7b714f10d76be345a632bdcac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 2%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.020 × 5 = 0.010000.\nEffective CPI = 1 + 0.010000 = 1.010000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.02, "penalty": 5, "result": 1.01}, "prompt_sha1": "6aa90177d903d5be0a27be13f0ffa09cd9150836", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 21.7 V source drives a 820 ohm resistor in series with an LED whose forward voltage is assumed to be 2.4 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 21.7-2.4 = 19.3 V.\nI = V/R = 19.3/820 A = 23.5366 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 21.7, "vf": 2.4, "r": 820, "current_a": 0.02353658536585366}, "prompt_sha1": "f353e50e8c3c5576dce763abf2ccf0aa1f365922", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.225.135.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.225.135.0\nBroadcast address: 10.225.135.63\nUsable host range: 10.225.135.1 to 10.225.135.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.225.135.0/26", "usable": 62, "first": "10.225.135.1", "last": "10.225.135.62", "broadcast": "10.225.135.63"}, "prompt_sha1": "743eaca60623c336ffa348deba04fe25469b1045", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "4d99378ff04e62f019d654c42605d4598e572758", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 2 V across it. Compute current and dissipated power.", "output": "I=V/R=2/47000=4.25531915e-05 A. P=V²/R=2²/47000=8.5106383e-05 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2, "r": 47000, "i": 4.2553191489361704e-05, "p": 8.510638297872341e-05}, "prompt_sha1": "3998c005c9bb9f071700bb8bd32314f50885c045", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 32-byte lines and 64-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/32 = 128.\nOffset bits = log2(32) = 5.\nIndex bits = log2(128) = 7.\nTag bits = 64-7-5 = 52.\nCheck: 52+7+5 = 64 = 64 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 32, "addr_bits": 64, "lines": 128, "offset_bits": 5, "index_bits": 7, "tag_bits": 52}, "prompt_sha1": "2da0715b0ea1d813ad5a8e6ef488c426c0bc1ef7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=18000 ohm and C=270000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=18000×270000×10^-12 s = 0.00486 s.\nf_c=1/(2πRC)=1/(2π×18000×270000×10^-12) = 32.7479 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 18000, "c_f": 2.7e-07, "tau": 0.00486, "fc": 32.74793067734472}, "prompt_sha1": "356610b70b6ae33dab15bd33e5ed86df64a39fef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 48 MHz, prescaler divisor is 959, and period is 32694 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 48000000/(959×32694) = 1.530927 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 48000000, "prescaler": 959, "period": 32694, "hz": 1.5309273152070264}, "prompt_sha1": "535a27230f406ffa68cf5af575a61d7c94133703", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1100010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1100010", "ones": 3, "parity": 1}, "prompt_sha1": "98edd1fb6eda84ceec77db477d4aa113553ff4f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 16 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×160×10^6 = 2560000000 B/s. Time = 8192/2560000000 = 3.2e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 16, "rate_mhz": 160, "sec": 3.2e-06}, "prompt_sha1": "20ee0b73f8b03b8db09a3c18e327a86a2bdb2e58", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d16_w32_5731` implementing a dual-clock asynchronous FIFO with depth 16 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 4-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d16_w32_5731 #(\n parameter int DEPTH = 16,\n parameter int WIDTH = 32,\n parameter int PTR_W = 4\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d16_w32_5731", "depth": 16, "width": 32, "ptr_w": 4}, "prompt_sha1": "fd4fc70d9df1c649a17fdf3c75918d7de24fad32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w8_5803` implementing a dual-clock asynchronous FIFO with depth 8 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w8_5803 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 8,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w8_5803", "depth": 8, "width": 8, "ptr_w": 3}, "prompt_sha1": "c7e92559e03d6ad51cb1ab39be004cacbdbc98bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'V', 'V', 'P', 'V', 'P', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "V", "V", "P", "V", "P", "V", "P", "P", "P", "P", "P", "V", "V", "P", "P"], "value": 4, "blocked": 0}, "prompt_sha1": "92c6dbb747ef08c2db8152a432bbbb2afdb2aa77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w43_cin` implementing a 43-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `43-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w43_cin (\n input logic [42:0] a,\n input logic [42:0] b,\n input logic cin,\n output logic [42:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w43_cin", "width": 43, "cin": true}, "prompt_sha1": "eb9569da989211c8a4226f9e6226cec2f71f4f55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x64_no_bypass` with 32 entries of 64 bits. Inputs: `clk`, `we`, `5-bit waddr`, `64-bit wdata`, `5-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x64_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [63:0] wdata,\n input logic [4:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x64_no_bypass", "entries": 32, "width": 64, "mode": "no_bypass"}, "prompt_sha1": "093e230d83a236e0f53dd15452cdd1c4ee00236f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 100 MHz, prescaler divisor is 602, and period is 37659 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 100000000/(602×37659) = 4.410976 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 100000000, "prescaler": 602, "period": 37659, "hz": 4.410976308734465}, "prompt_sha1": "3892b0a925f94eb8ac1cc5d7fab813ee77ce4d35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 54 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 54-20 = 34.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 54, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 34}, "prompt_sha1": "0abb9e2f7a445d69bdc2fe0dd9d059226f9654dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w39_cin` implementing a 39-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `39-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w39_cin (\n input logic [38:0] a,\n input logic [38:0] b,\n input logic cin,\n output logic [38:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w39_cin", "width": 39, "cin": true}, "prompt_sha1": "83b02e24f505cac798ab92fc2b01d3542ca847d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100000 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100000×10^6 / (9000×8) = 1388888.888889 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "frame_bytes": 9000, "pps": 1388888.888888889}, "prompt_sha1": "cfb153b29ad8a4d9520bd004c7ab541f9ad1c346", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.61. Using Amdahl's law, compute the theoretical speedup on 5 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.61) + 0.61/5) = 1.953125.\nThe theoretical speedup is about 1.953×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.61, "n": 5, "result": 1.953125}, "prompt_sha1": "0a2f14784d9c955708bd3c5695980f9c334efee2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_53_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 53 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_53_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd53;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_53_ignore", "cycles": 53, "retrigger": false}, "prompt_sha1": "95a606c33bfb06896252d32bb6d6de11d2aa0a9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551511; x = x + 534;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551511+534 = 18446744073709552045. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709552045) mod 2^64 = 429. So `x` stores 429. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551511, "add": 534, "result": 429}, "prompt_sha1": "bcf9b3f71f282c12620ed0d33f99e5778dbf99b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_39_lsb` for `39-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_39_lsb (\n input logic [38:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 38; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_39_lsb", "width": 39, "priority": "low"}, "prompt_sha1": "35223de0836bea864bc2285a66aa441f5cbd14d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xEC7E8D120C328E16 in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 16 8E 32 0C 12 8D 7E EC.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 17041213148670103062, "endian": "little", "bytes": [22, 142, 50, 12, 18, 141, 126, 236]}, "prompt_sha1": "e3aa35cc80713300d8ffebf2e1da6ad63f422fa6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTNTTTTTTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N.\nFinal state = 1.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0], "final_state": 1}, "prompt_sha1": "6f9ee61cf61409324c38a7fc671984dad3804ad9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 192 data bits per transfer at 400 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 192/8 = 24. Bandwidth = 24×400×10^6×6 = 57.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 192, "rate_mt": 400, "channels": 6, "gbps": 57.6}, "prompt_sha1": "e48a7131f4d57a68524877b3ba9354b6a8545e67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 24 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 24×1024 KiB = 24576 KiB = 25165824 bytes = 24.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 24, "page_kib": 1024, "reach": 25165824}, "prompt_sha1": "6901a5907a6bf7daf0220b25d50a8ba20918bb5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 64 bytes over a datapath transferring 1 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×8×10^6 = 8000000 B/s. Time = 64/8000000 = 8e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 64, "width": 1, "rate_mhz": 8, "sec": 8e-06}, "prompt_sha1": "54812618905c29a19656c7af343837b748afe673", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 16918 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 16918/1000000 s; frequency = 1000000/16918 = 59.108642 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 16918, "hz": 59.10864168341411}, "prompt_sha1": "45ca3d87509a107cd5b0abba76c56152d48e5c83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50×10^6 × 20/1000 = 1e+06 bits = 125000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50, "rtt_ms": 20, "bits": 1000000.0, "bytes": 125000.0}, "prompt_sha1": "7a9c3414c29f6702ac2072931d7d288f1c023189", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 32 KiB 16-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 32768/256 = 128.\nSets = 128/16 = 8.\nOffset bits = log2(256) = 8; index bits = log2(8) = 3; tag bits = 32-8-3 = 21.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 32, "line": 256, "ways": 16, "addr_bits": 32, "lines": 128, "sets": 8, "offset": 8, "index": 3, "tag": 21}, "prompt_sha1": "fba3ed4e8b9808952d21f638e9704901c331f5a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_7349` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_7349 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_7349", "width": 24}, "prompt_sha1": "7ec95a40dfa8f96a24d3390684d00638cd60e377", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `entries` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `words[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "43aa6ced609bc8b07e6411ebc59f2c2c71f51400", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 8-way set-associative cache uses 32-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/32 = 2048.\nSets = 2048/8 = 256.\nOffset bits = log2(32) = 5; index bits = log2(256) = 8; tag bits = 32-5-8 = 19.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 32, "ways": 8, "addr_bits": 32, "lines": 2048, "sets": 256, "offset": 5, "index": 8, "tag": 19}, "prompt_sha1": "ae5ebb6841d73f95b078a7149c510b46bdb56552", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×16 KiB = 1536 KiB = 1572864 bytes = 1.500000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 16, "reach": 1572864}, "prompt_sha1": "c7ae6a358ddd181afb4d2d4abda598e3f78f21c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_17_msb` for `17-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_17_msb (\n input logic [16:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 17; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_17_msb", "width": 17, "priority": "high"}, "prompt_sha1": "5273372ba887d05028e9caa64f81c657ec349fe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2977 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "cde37ee7c976f84d71159966a253a2783be1914e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8560` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8560 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8560"}, "prompt_sha1": "0b1af8656e114ed717dfc11dea026e2ee2d0fdff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2556137231, carries 52569 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 52569+1+1 = 52571. ACK = (2556137231+52571) mod 2^32 = 2556189802.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2556137231, "payload": 52569, "syn": 1, "fin": 1, "ack": 2556189802}, "prompt_sha1": "55599a6ecb4d16d71f0e15ea5ea6ef36feb1dc31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 5 V reference and returns code 31498. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 31498/65535 × 5 V = 2.403143 V.\nThus the estimated input is about 2.4031 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 5.0, "code": 31498, "volts": 2.4031433585107194}, "prompt_sha1": "a9f75bf1bba5579f9d93178f5fe7e181557def35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 5 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 15 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+2 = 8. Total bits = 15×8 = 120. Time = 120/4800 = 0.025 s = 25.000000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 5, "parity": 0, "stop": 2, "frames": 15, "seconds": 0.025}, "prompt_sha1": "805c8ad06467ee0b9a680349a5f24609ad0304b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 50 MHz and must generate an exact 4000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 50000000/4000 = 12500.\nWith prescaler divisor limited to at most 64, the largest divisor of 12500 that also keeps the period count within 16 bits is 50.\nPeriod count = 12500/50 = 250.\nPSC register = 50-1 = 49.\nARR register = 250-1 = 249.\nVerification: 50000000/(50×250) = 4000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 50000000, "target_hz": 4000, "total_division": 12500, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 50, "period": 250, "psc_reg": 49, "arr_reg": 249}, "prompt_sha1": "440e76e543ea7833edac1f1d2976f3ec0075a029", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3172511099, carries 52363 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 52363+0+0 = 52363. ACK = (3172511099+52363) mod 2^32 = 3172563462.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3172511099, "payload": 52363, "syn": 0, "fin": 0, "ack": 3172563462}, "prompt_sha1": "9c253e20989cff2d726cf51436f5dd4d9e950bbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 44 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 44-18 = 26.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 44, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 26}, "prompt_sha1": "bf5a659ede37b95d3b3acb05734185d7d51ec1a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (768×8) = 32552.083333 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 768, "pps": 32552.083333333332}, "prompt_sha1": "9b2d19d796f3520cc3e9a948ead29f24c26c7a0a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/100000=0.00024 A. P=V²/R=24²/100000=0.00576 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 100000, "i": 0.00024, "p": 0.00576}, "prompt_sha1": "d1b63eeec6096ac3eaf074578a128a6cd1c3cc50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x6D33846D46F08D7A in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 7A 8D F0 46 6D 84 33 6D.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 7868778578822860154, "endian": "little", "bytes": [122, 141, 240, 70, 109, 132, 51, 109]}, "prompt_sha1": "b349aa76e92886d90b27a11ee4db1586d68730f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 25% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.25 × 1280 = 320. Verification: 320/1280 = 0.25, which is 25%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 25, "high": 320}, "prompt_sha1": "01a37dfedf72c9f3dae39d48a34970772fd9b9cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.204.162.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.204.162.0\nBroadcast address: 10.204.162.127\nUsable host range: 10.204.162.1 to 10.204.162.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.204.162.0/25", "usable": 126, "first": "10.204.162.1", "last": "10.204.162.126", "broadcast": "10.204.162.127"}, "prompt_sha1": "680afcee9a3e1cb3b547b3b7d780e15447c12076", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_2619` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_2619 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_2619", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "34e13a7f1396a4f41a522587fc673e12ec7dea9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=5 ms, C=1 ms,T=10 ms, C=5 ms,T=20 ms, C=4 ms,T=200 ms, C=4 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/5 + 1/10 + 5/20 + 4/200 + 4/200 = 0.590000 = 59.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 5], [1, 10], [5, 20], [4, 200], [4, 200]], "utilization": 0.59}, "prompt_sha1": "2de926de7b20172f58302a4c89411ca6ff3f8cca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['P', 'V', 'P', 'P', 'P', 'P', 'V', 'P', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 1 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["P", "V", "P", "P", "P", "P", "V", "P", "V", "P", "V"], "value": 1, "blocked": 0}, "prompt_sha1": "a3747974f53bcf64324c9018b5ea080900858770", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_91_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 91 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_91_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd91;\n end else begin\n if (pulse_in)\n count <= 7'd91;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_91_retrig", "cycles": 91, "retrigger": true}, "prompt_sha1": "43c7f4d276f66d5a7401be2938c8715cd05bafdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['P', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 0 and 3 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["P", "P", "P", "V", "P", "V", "P", "V", "P", "V", "P", "P"], "value": 0, "blocked": 3}, "prompt_sha1": "dd8a544e78af5795b77af211d08325ca1e4d4a20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 2.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+16 = 18.5. Period = 18.5/1000000 = 1.85e-05 s. Maximum rate = 1/period = 54054.054054 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 2.5, "conv_cycles": 16, "period": 1.85e-05, "rate": 54054.05405405405}, "prompt_sha1": "27e146d39a3a170670ba43b3d1ecacc06e08eb35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×3.3²=0.0005445 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 3.3, "energy": 0.0005444999999999998}, "prompt_sha1": "f7656926cbd5ef050432cba01f3140ed70f26d05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(50×10^6) s = 10.240000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 512, "time_us": 10.24}, "prompt_sha1": "d8e7ba4efb877e497e8a0f272cf8dcb4994f3f8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_25_27_17` with RED, GREEN, YELLOW states. Hold RED for 25 clock cycles, GREEN for 27, and YELLOW for 17; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_25_27_17 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 24) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 26) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 16) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_25_27_17", "red": 25, "green": 27, "yellow": 17}, "prompt_sha1": "5bbe7f5c2a4ed95331f52d0c8597d193cd4def54", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 44 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 44-14 = 30.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 44, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 30}, "prompt_sha1": "92cd448e6efe7456f18c1232776e61a88c230b63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_56_lsb` for `56-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_56_lsb (\n input logic [55:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 55; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_56_lsb", "width": 56, "priority": "low"}, "prompt_sha1": "fd3866a7926df72fc1eccb6693de5ced27c1ce36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock L2 then RX; consumer acquires RX then L2. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds L2 while waiting for RX, while consumer holds RX while waiting for L2; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire L2 before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "6c9e8c68beff90f9d9d0537a70f3c20293336390", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 23-bit left-shift register module `shiftreg_left_23`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `23-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_23 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [22:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[21:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_23", "width": 23, "direction": "left"}, "prompt_sha1": "ad54a9811cabcc011edc298b636e8c1b78c051bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `events = events + 7` on one shared integer without synchronization. Assume `events` initially equals 132. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 132; T2 reads 132; both compute 139; T1 writes 139; T2 writes 139. The observed final value is 139, but two serial increments would produce 146.\n\n```\nlock(mutex)\nevents = events + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "7f1a1261aae75f66f8a8cef5c4940f838481137a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 2.5 V reference and returns code 43. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 43/255 × 2.5 V = 0.421569 V.\nThus the estimated input is about 0.4216 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 2.5, "code": 43, "volts": 0.42156862745098045}, "prompt_sha1": "d8066b6745f2c9beaf1d982dcf70e47c61e1dfa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×64 KiB = 65536 KiB = 67108864 bytes = 64.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 64, "reach": 67108864}, "prompt_sha1": "314f6ae1d055c0c5ea5b1efe907f8751a9ccc522", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_26_15` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 26, and YELLOW for 15; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_26_15 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 25) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 14) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_26_15", "red": 23, "green": 26, "yellow": 15}, "prompt_sha1": "bdd051264cdbfb7e8d9386c7a6b71820a3af6cb9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_23_37_5` with RED, GREEN, YELLOW states. Hold RED for 23 clock cycles, GREEN for 37, and YELLOW for 5; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_23_37_5 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 22) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 36) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 4) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_23_37_5", "red": 23, "green": 37, "yellow": 5}, "prompt_sha1": "3fd0b60c16d2fa9b97b1117869c21e67850f5c25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 46 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 46-18 = 28.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 46, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 28}, "prompt_sha1": "8e31e6ae9f7a1b2ef569e64262812f8359c79040", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 9000 payload bytes plus 24 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 9000/(9000+24) = 0.997340 = 99.73%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 9000, "overhead": 24, "efficiency": 0.9973404255319149}, "prompt_sha1": "797826d2e79492ed70dc5095aeafd60f8b4b1ad3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.75 ns hit time, 91.8% hit rate, and a 180 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.918 = 0.082.\nAMAT = hit time + miss rate × miss penalty\n= 0.75 ns + 0.082×180 ns = 15.5100 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.75, "hit_rate": 0.918, "penalty": 180, "result": 15.509999999999993}, "prompt_sha1": "4ae03c69e31d672f7957bf42fe440928a0e95957", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.222.246.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.222.246.0\nBroadcast address: 10.222.246.63\nUsable host range: 10.222.246.1 to 10.222.246.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.222.246.0/26", "usable": 62, "first": "10.222.246.1", "last": "10.222.246.62", "broadcast": "10.222.246.63"}, "prompt_sha1": "59f96b4b47ad853d97915f3f7d0573db7d23faa1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `size` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n acc += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `a[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n acc += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "8d77201c765cd2b1413e552033ba271c33b8c527", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 4-way set-associative cache uses 16-byte lines and 57-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/16 = 1024.\nSets = 1024/4 = 256.\nOffset bits = log2(16) = 4; index bits = log2(256) = 8; tag bits = 57-4-8 = 45.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 16, "ways": 4, "addr_bits": 57, "lines": 1024, "sets": 256, "offset": 4, "index": 8, "tag": 45}, "prompt_sha1": "130a31143c3d8191034ea28b1fc39df1200f793e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x75F8E5F28E in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 8E F2 E5 F8 75.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 506686993038, "endian": "little", "bytes": [142, 242, 229, 248, 117]}, "prompt_sha1": "c237d930354ceb3f84806ee77a76cb9f61b0fc28", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x40_write_bypass` with 128 entries of 40 bits. Inputs: `clk`, `we`, `7-bit waddr`, `40-bit wdata`, `7-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [39:0] wdata,\n input logic [6:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x40_write_bypass", "entries": 128, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "212dcc78a8c5dbea9011d1d3ddac00fbd94756c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_68` for a synchronous sampled input `noisy`. Update output `clean` only after observing 68 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_68 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 67) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_68", "stable_samples": 68}, "prompt_sha1": "2722c0d9b670b809bfdfc4918affd0460fc64903", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 1600 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×1600×10^6×2 = 38.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 1600, "channels": 2, "gbps": 38.4}, "prompt_sha1": "6a3bfc26e9753caef0d1c97113d2ab82e008ee2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_36_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 36 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_36_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd36;\n end else begin\n if (pulse_in)\n count <= 6'd36;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_36_retrig", "cycles": 36, "retrigger": true}, "prompt_sha1": "3313e51d9a6d5a517e1fa805aa5b7098f9b9bc2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x12_write_bypass` with 64 entries of 12 bits. Inputs: `clk`, `we`, `6-bit waddr`, `12-bit wdata`, `6-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [11:0] wdata,\n input logic [5:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x12_write_bypass", "entries": 64, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "cb1ccc1ba6e618e331bfa4ebf67c9567bafa96d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×180)/(100+180) = 64.285714 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 180, "req": 64.28571428571429}, "prompt_sha1": "7482c8c8c20521accdf7cf261b2624790c17ef5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1887-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1887×8 = 15096 bits.\nSerialization delay = bits/rate = 15096/(5000×10^6) s = 3.0192e-06 s = 3.019200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1887, "rate_mbps": 5000, "delay_s": 3.0192e-06}, "prompt_sha1": "1af6bd1b129e6681072ac2cce9057300fd489700", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x4B, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x4B<<1)|0 = 0x96 = 10010110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 75, "rw": 0, "byte": 150}, "prompt_sha1": "7311abda3d304ffac7e94791faef889c8acca682", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_116` for a synchronous sampled input `noisy`. Update output `clean` only after observing 116 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_116 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 115) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_116", "stable_samples": 116}, "prompt_sha1": "f2598da318ce8e6c1d3fe81fbebc25ecbf4a985b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1/(1.2×10^9) = 0.0166666667 s = 16.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.0, "ghz": 1.2, "sec": 0.016666666666666666}, "prompt_sha1": "1ebb579a1de03c3913394a706cf25cd84c3841d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock CACHE then BUF; worker_2 acquires BUF then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds CACHE while waiting for BUF, while worker_2 holds BUF while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "56e23026fe06dce611ffb461436c1449f002d8fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 36-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^36/2^15 = 2^21 = 2097152 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 36, "page_exp": 15, "entries": 2097152}, "prompt_sha1": "6c6985a610233e6ce5fe7e48a5a9fdb91c3ca632", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4482` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4482 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4482"}, "prompt_sha1": "012099da21597a9b17e248dc81fd7f40c926eb92", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTNTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 0, 1, 1, 0, 1], "final_state": 2}, "prompt_sha1": "1f87c2fb693809f21c54484f252913c91191731e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_9853` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_9853 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_9853", "width": 8}, "prompt_sha1": "3e633c8d00b25ba5ae8ff1f62bdfb76ff09c8ea2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `items` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n sum += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `data[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n sum += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "ca4091d3a34993cf613128ddead7b70a6f8bd81c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×180)/(680+180) = 142.325581 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 180, "req": 142.32558139534882}, "prompt_sha1": "74d35ea9bfaf5b60e734ed34e22d7071a0a808fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_39` for a synchronous sampled input `noisy`. Update output `clean` only after observing 39 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_39 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 38) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_39", "stable_samples": 39}, "prompt_sha1": "1f172818dd27b329f79e8be9884ba918b32e5a5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-28 = 1972 bytes.\nRound down to an 8-byte multiple: floor((1972)/8)×8 = 1968 bytes.\nFragments required = ceil(6000/1968) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 28, "payload": 6000, "max_payload": 1968, "fragments": 4}, "prompt_sha1": "54698c4d45cae959acbd13144a6bace2aebbb22f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1000000 baud with 1 start bit, 9 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 62 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+0+2 = 12. Total bits = 62×12 = 744. Time = 744/1000000 = 0.000744 s = 0.744000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1000000, "data": 9, "parity": 0, "stop": 2, "frames": 62, "seconds": 0.000744}, "prompt_sha1": "5d0c95e3ce5ba74bb09ce681dda88b3a00803206", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_6` for a synchronous sampled input `noisy`. Update output `clean` only after observing 6 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_6 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 5) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_6", "stable_samples": 6}, "prompt_sha1": "a8ce615ddaa9b9f39ad2b6daa383bb0a56b5d2a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 47000 ohm and 56000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (47000×56000)/(47000+56000) = 25553.398058 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 47000, "r2": 56000, "req": 25553.398058252427}, "prompt_sha1": "a5193aa08d982c8d0af9e4cef585c210657210d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 5 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(5×10^6) s = 102.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 5, "bits": 512, "time_us": 102.39999999999999}, "prompt_sha1": "aae965dafe40c46a4296efdb395b155d5aad84bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.25 ns hit time, 98.7% hit rate, and a 90 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.987 = 0.013.\nAMAT = hit time + miss rate × miss penalty\n= 1.25 ns + 0.013×90 ns = 2.4200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.25, "hit_rate": 0.987, "penalty": 90, "result": 2.420000000000001}, "prompt_sha1": "478c8e2edf8654ce1eb7f929443af54e9d9cb5b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5291` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5291 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5291"}, "prompt_sha1": "5b72665e6c1fe48d10de368e53c294644c28d49f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w58_cin` implementing a 58-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `58-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w58_cin (\n input logic [57:0] a,\n input logic [57:0] b,\n input logic cin,\n output logic [57:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w58_cin", "width": 58, "cin": true}, "prompt_sha1": "9f18bd022f3c3ad7e9833d425b835298f6ef95a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 1.5 on a 4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×1.5/(4×10^9) = 0.000375 s = 0.375000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 1.5, "ghz": 4.0, "sec": 0.000375}, "prompt_sha1": "29904999738fbfb38dad6fd3c06a0df535809f97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE13D02E5 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E1 3D 02 E5.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 3778872037, "endian": "big", "bytes": [225, 61, 2, 229]}, "prompt_sha1": "4dc01ba9d54453819ffcd0fd86c925b8c792c63f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 14400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(4×14400) = 104.166667.\nNearest integer divisor D = 104.\nActual baud = 6000000/(4×104) = 14423.077 baud.\nError = (14423.077-14400)/14400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 4, "baud": 14400, "divisor": 104, "actual": 14423.076923076924, "error_pct": 0.1602564102564151}, "prompt_sha1": "77ba1d4a5cff39c263bc7cc5c7ceafe4cd21f759", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 50000 Hz. Each ISR consumes 3913 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50000×3913/(200×10^6) = 0.97825 = 97.825000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 50000, "cycles": 3913, "load": 0.97825}, "prompt_sha1": "40bc714840ac9a34a0ccb120eb76cf86a1b1dd69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xE56C9083, toggle bit 31 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 31)`. Result = 0x656C9083.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3849097347, "bit": 31, "op": "toggle", "result": 1701613699}, "prompt_sha1": "9e43f166e174ee824b3d632fd615a32b2f9db06a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 12 MHz and must generate an exact 1600 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 12000000/1600 = 7500.\nWith prescaler divisor limited to at most 2048, the largest divisor of 7500 that also keeps the period count within 16 bits is 1875.\nPeriod count = 7500/1875 = 4.\nPSC register = 1875-1 = 1874.\nARR register = 4-1 = 3.\nVerification: 12000000/(1875×4) = 1600 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 12000000, "target_hz": 1600, "total_division": 7500, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1875, "period": 4, "psc_reg": 1874, "arr_reg": 3}, "prompt_sha1": "d5fcc3b04ca21b96a4d0e8973aadb12409023e32", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock L2 then B; worker_2 acquires B then L2. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds L2 while waiting for B, while worker_2 holds B while waiting for L2; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before L2. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "26815e4650a9556160d38324f9195280c16bba4f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock QUEUE then D; worker_2 acquires D then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds QUEUE while waiting for D, while worker_2 holds D while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire D before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "052bd280235ee5cfef09e7478216ff6e33eda273", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w30_cin` implementing a 30-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `30-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w30_cin (\n input logic [29:0] a,\n input logic [29:0] b,\n input logic cin,\n output logic [29:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w30_cin", "width": 30, "cin": true}, "prompt_sha1": "78dd3553c3ea79fe38a2899daf918ca6f414d66a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 10000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-24 = 1256 bytes.\nRound down to an 8-byte multiple: floor((1256)/8)×8 = 1256 bytes.\nFragments required = ceil(10000/1256) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 24, "payload": 10000, "max_payload": 1256, "fragments": 8}, "prompt_sha1": "ff96019d346a405b2ad5eb3de30a1c09fa5320fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xAE6F. Extract the 6-bit field starting at bit 6 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xAE6F >> 6) & 0x3F = 0x39 (57).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 6, "value": 44655, "mask": 63, "field": 57}, "prompt_sha1": "22e8551373e9e37abe682e095b626c99bbf9cd3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 64. Using occupancy formula `(head-tail) mod capacity`, with head index 47 and tail index 58, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (47-58) mod 64 = 53. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 64 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 64, "head": 47, "tail": 58, "occupancy": 53}, "prompt_sha1": "11b5cc14325b1d71a8134adde720ce8e02bb1874", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 2 Mbit/s and RTT 200 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 2×10^6×200/1000/8 = 50000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "rtt_ms": 200, "bytes": 50000.0}, "prompt_sha1": "a8bb631f854662da2550020b9e030431a518a927", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 84 MHz and must generate an exact 500 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 4096. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 84000000/500 = 168000.\nWith prescaler divisor limited to at most 4096, the largest divisor of 168000 that also keeps the period count within 16 bits is 4000.\nPeriod count = 168000/4000 = 42.\nPSC register = 4000-1 = 3999.\nARR register = 42-1 = 41.\nVerification: 84000000/(4000×42) = 500 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 84000000, "target_hz": 500, "total_division": 168000, "max_prescaler": 4096, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 4000, "period": 42, "psc_reg": 3999, "arr_reg": 41}, "prompt_sha1": "cf4a2cbe6a94b0c5b854c32dff2b407d7e5468e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 80 MHz. Sampling consumes 39.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+14 = 53.5. Period = 53.5/80000000 = 6.6875e-07 s. Maximum rate = 1/period = 1495327.102804 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 80000000.0, "sample_cycles": 39.5, "conv_cycles": 14, "period": 6.6875e-07, "rate": 1495327.1028037383}, "prompt_sha1": "7722de5a42e8a8d02371ca5dad674bf470600209", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 2779 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×2779/(32×10^6) = 0.1736875 = 17.368750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 2000, "cycles": 2779, "load": 0.1736875}, "prompt_sha1": "9c70c4236d247bd45af4869a54d4d75127318c47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5000 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5000×10^6 / (512×8) = 1220703.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "frame_bytes": 512, "pps": 1220703.125}, "prompt_sha1": "372a947c0674ebcc64b44571ebd062dd2ca02dd0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 8. Using occupancy formula `(head-tail) mod capacity`, with head index 6 and tail index 2, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (6-2) mod 8 = 4. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 8 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 8, "head": 6, "tail": 2, "occupancy": 4}, "prompt_sha1": "f9dc24dbc91d600e788cceabbd5ffe7ef73e0a95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 32 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(32×10^6) s = 0.500000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 32, "bits": 16, "time_us": 0.5}, "prompt_sha1": "f107db218bd0260315ef971418e55c857db37b69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_256898` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_256898 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_256898"}, "prompt_sha1": "db325a33b3dfe36fe01fc62c03f04fbfc56d088c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 308 elements. Review loop `for i in range(308+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(308+1)` includes index 308, which is out of range for a length-308 sequence. Correct loop: `for i in range(308):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 308, "variant": "one_past"}, "prompt_sha1": "0cf0e00d5cd2cf734f3d2de5af451c5ba477db9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 12 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×12²=7.2e-07 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 12, "energy": 7.200000000000001e-07}, "prompt_sha1": "541daf74a5ee57aa8fea4a74d60b69f8eb424250", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 63 bits wide and the system uses 16 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 16384 bytes = 2^14 bytes.\nOffset bits = 14.\nVPN bits = 63-14 = 49.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 63, "page_bytes": 16384, "offset_bits": 14, "vpn_bits": 49}, "prompt_sha1": "ef5ff9daa6d32dd69bee59e9a3b3bb759baa12e2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w44_unsigned` comparing two 44-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w44_unsigned (\n input logic [43:0] a,\n input logic [43:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w44_unsigned", "width": 44, "signed": false}, "prompt_sha1": "24b79e2bc385d70581dd421a5f4929cb4a7ed546", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['V', 'P', 'P', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["V", "P", "P", "V", "V", "P", "V"], "value": 5, "blocked": 0}, "prompt_sha1": "011f2e3b9a7b209a992eba4e10d053716412c865", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_5_lsb` for `5-bit in`. The lowest numbered asserted bit has priority. Output `3-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_5_lsb (\n input logic [4:0] in,\n output logic [2:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 4; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_5_lsb", "width": 5, "priority": "low"}, "prompt_sha1": "18ea73b38d6a7e128874c55314bf7777e70445d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=25 ms, C=3 ms,T=50 ms, C=2 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/25 + 3/50 + 2/50 = 0.180000 = 18.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 25], [3, 50], [2, 50]], "utilization": 0.18}, "prompt_sha1": "e1c099996c175e52bce8def60920fe59c8c11143", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x33B0, clear bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 4)`. Result = 0x33A0.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 13232, "bit": 4, "op": "clear", "result": 13216}, "prompt_sha1": "7a1b6e6f70820b73e591e2fb525668a3842d3fb4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w54_cin` implementing a 54-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `54-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w54_cin (\n input logic [53:0] a,\n input logic [53:0] b,\n input logic cin,\n output logic [53:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w54_cin", "width": 54, "cin": true}, "prompt_sha1": "d6f8a8762884bfedfd4f352dc43fecce265d6984", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(4×1000000) = 1.500000.\nNearest integer divisor D = 2.\nActual baud = 6000000/(4×2) = 750000.000 baud.\nError = (750000.000-1000000)/1000000×100% = -25.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 4, "baud": 1000000, "divisor": 2, "actual": 750000.0, "error_pct": -25.0}, "prompt_sha1": "857dea57160d5e3148b90ab44c80e31a1fc548e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11110 using generator polynomial bits 11001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 25, "msg_bits": 5, "msg": 30, "remainder": 13}, "prompt_sha1": "fb28917a570d8edc7088011eadb92d40f993247b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_19` for a 19-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_19 (\n input logic signed [18:0] data,\n input logic [4:0] shamt,\n output logic signed [18:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_19", "width": 19, "direction": "right", "arithmetic": true}, "prompt_sha1": "0cf9fe7eb549bec19c8ac2f5094c86f0b87ff418", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 31-bit up/down counter `updown_31_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_31_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [30:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_31_wrap", "width": 31, "wrap": true}, "prompt_sha1": "1c609f2724803be5ffd6ef460227269897da0a7f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock IO then DESC; task_B acquires DESC then IO. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds IO while waiting for DESC, while task_B holds DESC while waiting for IO; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "f7c5b4f77618d3d9f7566218c044038b2255d215", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.01 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-08×48²=1.152e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-08, "v": 48, "energy": 1.1520000000000002e-05}, "prompt_sha1": "c42eeca9e015de4c1f5a7fc37eec158ea98850cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 800 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×800×10^6×3 = 9.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 800, "channels": 3, "gbps": 9.6}, "prompt_sha1": "3d44bbdd06aeafe30177e24d20e71a111b162156", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 1 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×1/(1.5×10^9) = 0.0133333333 s = 13.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 1.0, "ghz": 1.5, "sec": 0.013333333333333334}, "prompt_sha1": "c5388358e61ee16bb4ebbc2d214c48bc2379b4be", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 2000 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 2000 = 1800. Verification: 1800/2000 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 2000, "duty": 90, "high": 1800}, "prompt_sha1": "77be6a2c699ef6fac465d6bd653192b74c72ef7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 5 V source drives a 120 ohm resistor in series with an LED whose forward voltage is assumed to be 1.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 5-1.7 = 3.3 V.\nI = V/R = 3.3/120 A = 27.5000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 5.0, "vf": 1.7, "r": 120, "current_a": 0.0275}, "prompt_sha1": "4499dcde9b90eb2c95cebdb92e17690bfc96133c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNNTNNNTNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0], "final_state": 0}, "prompt_sha1": "b063d1661e81bc5ce88903cf2e461fa1f56113c7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w15_m24401` with clk, asynchronous active-low rst_n, active-high enable, and output logic [14:0] count. On reset count=0. When enabled it increments until 24401 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w15_m24401 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [14:0] count\n);\n localparam logic [14:0] LIMIT = 15'd24401;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w15_m24401", "width": 15, "max": 24401}, "prompt_sha1": "46e2cf0781880e888de75efceb3df3beaaab8469", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=200 ms, C=1 ms,T=5 ms, C=2 ms,T=200 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/200 + 1/5 + 2/200 = 0.225000 = 22.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 200], [1, 5], [2, 200]], "utilization": 0.225}, "prompt_sha1": "a9de62f1aae0f8e4fc6df7a07f7f520becc0ee4c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 1000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1000-40 = 960 bytes.\nRound down to an 8-byte multiple: floor((960)/8)×8 = 960 bytes.\nFragments required = ceil(6000/960) = 7.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1000, "header": 40, "payload": 6000, "max_payload": 960, "fragments": 7}, "prompt_sha1": "aeccaf573f47ff0c541129e7ce588bbc3d6f0316", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w13_signed` comparing two 13-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w13_signed (\n input logic signed [12:0] a,\n input logic signed [12:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w13_signed", "width": 13, "signed": true}, "prompt_sha1": "fc092262f11d6dbbb2e3e8219e1c3c81e0c56326", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w64_5644` implementing a dual-clock asynchronous FIFO with depth 4 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w64_5644 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 64,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w64_5644", "depth": 4, "width": 64, "ptr_w": 2}, "prompt_sha1": "b966b3c1a6daaabf87a20e0e21bb00b28cd208f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_877173` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_877173 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_877173"}, "prompt_sha1": "8d05bafad46a988b552c083828755fec580fce25", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^24 V = 2.68220901489e-07 V = 0.268221 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 4.5, "step": 2.682209014892578e-07}, "prompt_sha1": "43bc53ca146259ca3eef69edce66891b7d57d7d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 256. Using occupancy formula `(head-tail) mod capacity`, with head index 224 and tail index 187, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (224-187) mod 256 = 37. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 256 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 256, "head": 224, "tail": 187, "occupancy": 37}, "prompt_sha1": "2d2a3e09877819f5519bbf284048d45cc0de5200", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [11, 21, 17, 8, 11, 13]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [59, 81, 78, 44, 64, 71].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [11, 21, 17, 8, 11, 13], "finish": [59, 81, 78, 44, 64, 71]}, "prompt_sha1": "77247cbc1cf5da456d32cc5131a6f4a40bc1ab35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 32768 bytes over a datapath transferring 2 bytes per beat at 50 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×50×10^6 = 100000000 B/s. Time = 32768/100000000 = 0.00032768 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 32768, "width": 2, "rate_mhz": 50, "sec": 0.00032768}, "prompt_sha1": "3cc9f3b9e003c1d9bec7ca50f437a4a63b1dc05a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1600 payload bytes plus 40 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1600/(1600+40) = 0.975610 = 97.56%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1600, "overhead": 40, "efficiency": 0.975609756097561}, "prompt_sha1": "a58fcfc5bf41ec01fa6a5da72ec557e5c0403393", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 785686604, carries 48125 payload bytes, SYN=1, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 48125+1+0 = 48126. ACK = (785686604+48126) mod 2^32 = 785734730.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 785686604, "payload": 48125, "syn": 1, "fin": 0, "ack": 785734730}, "prompt_sha1": "a1b28a0646ab6d9ddc76079d50815d74ae532e5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.190.208.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.190.208.0\nBroadcast address: 10.190.208.63\nUsable host range: 10.190.208.1 to 10.190.208.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.190.208.0/26", "usable": 62, "first": "10.190.208.1", "last": "10.190.208.62", "broadcast": "10.190.208.63"}, "prompt_sha1": "faa176b5ef6c4fc422c356afe211d3bf416fc9b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×16 KiB = 128 KiB = 131072 bytes = 0.125000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 16, "reach": 131072}, "prompt_sha1": "d1c190ab29b7ef10a4cadc4131b2e9140a986709", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 108; x = x + 329;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 108+329 = 437. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (437) mod 2^8 = 181. So `x` stores 181. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 108, "add": 329, "result": 181}, "prompt_sha1": "9679f7c4ff8288eedfb5cb5202e63d7130b48fd2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=47000 ohm and C=5600000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=47000×5600000×10^-12 s = 0.2632 s.\nf_c=1/(2πRC)=1/(2π×47000×5600000×10^-12) = 0.6047 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 47000, "c_f": 5.6e-06, "tau": 0.2632, "fc": 0.6046920330239185}, "prompt_sha1": "ebb9f823f5b28007debc1d4314fb9cc2ad6915d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 3.3 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×3.3²=1.1979e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 3.3, "energy": 1.1979e-05}, "prompt_sha1": "96952508bab7251ec57e91403e1a0b3de39be8ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.61. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.61) + 0.61/8) = 2.144772.\nThe theoretical speedup is about 2.145×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.61, "n": 8, "result": 2.1447721179624666}, "prompt_sha1": "8efc7f85d6859e9c8fd447df9abe25184f6fb361", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1500 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-20-24 = 1456 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 20, "tcphdr": 24, "mss": 1456}, "prompt_sha1": "6730ea2a1b9746affbec6ea780580f1508fbc6f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['V', 'P', 'P', 'V', 'P', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'P', 'P', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 8 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["V", "P", "P", "V", "P", "P", "V", "P", "V", "P", "V", "V", "P", "P", "P", "P", "V", "V", "V"], "value": 8, "blocked": 0}, "prompt_sha1": "bd2962fe558e6fc400da131752c7dc3bbd47baef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 39-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^39/2^20 = 2^19 = 524288 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 39, "page_exp": 20, "entries": 524288}, "prompt_sha1": "e72fb8108a988256a59e07000bcfd6f3701cabc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 41279 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 41279/1000000 s; frequency = 1000000/41279 = 24.225393 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 41279, "hz": 24.22539305700235}, "prompt_sha1": "9f39cc9b7ad52049f2b1f17c49ec35d899ec34e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×16 KiB = 4096 KiB = 4194304 bytes = 4.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 16, "reach": 4194304}, "prompt_sha1": "cf3148f2f2d5e18ad3594ab39ae7af1117783d7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=2.2 nF and is stepped to 2.5 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=2.5(1-e^-1)=1.580301 V; τ=2.2e-06 s and t=2.2e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 2.2000000000000003e-09, "multiple": 1, "vin": 2.5, "vc": 1.5803013970713942}, "prompt_sha1": "b48e9cb6833544498ce8c486da14707918b4a48c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 131072 bytes over a datapath transferring 2 bytes per beat at 100 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×100×10^6 = 200000000 B/s. Time = 131072/200000000 = 0.00065536 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 131072, "width": 2, "rate_mhz": 100, "sec": 0.00065536}, "prompt_sha1": "fb530335bbd3382dddd6109610963556a8e002a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50000 Mbit/s and RTT 0.5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50000×10^6 × 0.5/1000 = 2.5e+07 bits = 3.125e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50000, "rtt_ms": 0.5, "bits": 25000000.0, "bytes": 3125000.0}, "prompt_sha1": "1d37a33cfa1dc3b90faf1b32a99c2987abe400ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [4, 1, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [7, 3, 31].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [4, 1, 26], "finish": [7, 3, 31]}, "prompt_sha1": "6fb34f2a04c53e1a15613db5f2d9c637f975e0f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 168 MHz and must generate an exact 10000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 168000000/10000 = 16800.\nWith prescaler divisor limited to at most 2048, the largest divisor of 16800 that also keeps the period count within 16 bits is 1680.\nPeriod count = 16800/1680 = 10.\nPSC register = 1680-1 = 1679.\nARR register = 10-1 = 9.\nVerification: 168000000/(1680×10) = 10000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 168000000, "target_hz": 10000, "total_division": 16800, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1680, "period": 10, "psc_reg": 1679, "arr_reg": 9}, "prompt_sha1": "8bd90d02ac4f0b35c3da273ffa36c0190207be22", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 64 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 64×512 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 64, "page_kib": 512, "reach": 33554432}, "prompt_sha1": "0445bf626f5f86985cc832c16eaad5537197753b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock B then C; task_B acquires C then B. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds B while waiting for C, while task_B holds C while waiting for B; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before C. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "cb1675896a4b18999ccf0fb0c680fd170eb1ff2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 47 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 47 = 49.\nClock pulses = 49×9 = 441.\nTime = 441/1000000 s = 441.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 47, "clocks": 441, "time_s": 0.000441}, "prompt_sha1": "c6164c405503117d1d69a11f9f1b6ef494c2cf1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 100010001001001101 using generator polynomial bits 11001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 25, "msg_bits": 18, "msg": 139853, "remainder": 6}, "prompt_sha1": "53530490f603ece81a0e7215cc854c8e50db5722", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x5BE3. Extract the 8-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x5BE3 >> 2) & 0xFF = 0xF8 (248).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 8, "lsb": 2, "value": 23523, "mask": 255, "field": 248}, "prompt_sha1": "77becbcef393964f6a6187f4d869bfc11fb95c57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 102 and initial occupancy is 26. In an abstract batch, producer attempts to enqueue 153 items first, dropping any excess beyond capacity; then consumer removes up to 90 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=102, dropped=77; consumed=90; final occupancy=12.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 102, "start": 26, "prod": 153, "cons": 90, "dropped": 77, "consumed": 90, "final": 12}, "prompt_sha1": "72d382bd38f1a951400d155c1b042aea22db54ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 512 bytes over a datapath transferring 1 bytes per beat at 2 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×2×10^6 = 2000000 B/s. Time = 512/2000000 = 0.000256 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 512, "width": 1, "rate_mhz": 2, "sec": 0.000256}, "prompt_sha1": "b826a465c2e44f10a3198da1c9ffa3ac2e6afe2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 10 and all processes arrive at time 0 with CPU bursts [6, 9, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [6, 15, 41].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 10, "bursts": [6, 9, 26], "finish": [6, 15, 41]}, "prompt_sha1": "a7f652f65bc1f230ab0dc2b7b6dd18946fe4b708", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 16 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×16 KiB = 2048 KiB = 2097152 bytes = 2.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 16, "reach": 2097152}, "prompt_sha1": "cd09f4c27a2f2aea2263ad8421575a89ea30f248", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 7617-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 7617×8 = 60936 bits.\nSerialization delay = bits/rate = 60936/(5000×10^6) s = 1.21872e-05 s = 12.187200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 7617, "rate_mbps": 5000, "delay_s": 1.21872e-05}, "prompt_sha1": "1dbcf23f643b19a41a53bf0f6835d1f57b508deb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.62. Using Amdahl's law, compute the theoretical speedup on 128 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.62) + 0.62/128) = 2.598457.\nThe theoretical speedup is about 2.598×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.62, "n": 128, "result": 2.598457166057653}, "prompt_sha1": "b8c4f5ef017f48f3963ab4d0df4bd67add4b7bb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 11 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 11 = 13.\nClock pulses = 13×9 = 117.\nTime = 117/400000 s = 292.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 11, "clocks": 117, "time_s": 0.0002925}, "prompt_sha1": "0d5e953e906c7f5896c14a257ebe14bdaf6ee56b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10000 ohm has 3.3 V across it. Compute current and dissipated power.", "output": "I=V/R=3.3/10000=0.00033 A. P=V²/R=3.3²/10000=0.001089 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 3.3, "r": 10000, "i": 0.00033, "p": 0.001089}, "prompt_sha1": "53b3bbeb9175c9d5dee49d52a70da607a9492e70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_5_40_9` with RED, GREEN, YELLOW states. Hold RED for 5 clock cycles, GREEN for 40, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_5_40_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 4) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 39) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_5_40_9", "red": 5, "green": 40, "yellow": 9}, "prompt_sha1": "a1a5a55f9ff349b6400faa49d7a9279b591e296c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 7` on one shared integer without synchronization. Assume `packets` initially equals 312. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 312; T2 reads 312; both compute 319; T1 writes 319; T2 writes 319. The observed final value is 319, but two serial increments would produce 326.\n\n```\nlock(mutex)\npackets = packets + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "2881c9c25fc71c6421f5ff4861babc60fd144575", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=39000 ohm and C=1000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=39000×1000×10^-12 s = 3.9e-05 s.\nf_c=1/(2πRC)=1/(2π×39000×1000×10^-12) = 4080.8960 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 39000, "c_f": 1e-09, "tau": 3.9e-05, "fc": 4080.8959767152646}, "prompt_sha1": "4a3ea95e6c046febe12edcb9575c673c79fe8858", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2200 ohm and C=56000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2200×56000×10^-12 s = 0.0001232 s.\nf_c=1/(2πRC)=1/(2π×2200×56000×10^-12) = 1291.8421 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2200, "c_f": 5.6e-08, "tau": 0.00012319999999999999, "fc": 1291.8420705510985}, "prompt_sha1": "5b1e17f1835b6d8e3d8e77036eeb0dade82e6c76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100000 Mbit/s and RTT 0.5 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100000×10^6×0.5/1000/8 = 6250000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100000, "rtt_ms": 0.5, "bytes": 6250000.0}, "prompt_sha1": "3e94f6903f05cfb1a76f6b5f41b52d1b1a80df01", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 128 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×128 KiB = 24576 KiB = 25165824 bytes = 24.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 128, "reach": 25165824}, "prompt_sha1": "eb5e18fdc90357042d9434a486d231d01ed04134", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 180 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×180)/(1000+180) = 152.542373 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 180, "req": 152.54237288135593}, "prompt_sha1": "c580c672d4e12ee9b4927bc2d8495b1152dd58a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3431` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3431 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3431"}, "prompt_sha1": "b8337450bdcd7c1cdc0e7d598301bdf13014e3fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x79, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x79<<1)|0 = 0xF2 = 11110010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 121, "rw": 0, "byte": 242}, "prompt_sha1": "392947145a56e459101ec0fb13c97a8af3879554", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 20% of instructions, the branch misprediction rate is 10%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.100 × 2 = 0.040000.\nEffective CPI = 1 + 0.040000 = 1.040000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.2, "mispred": 0.1, "penalty": 2, "result": 1.04}, "prompt_sha1": "0c89a7a565562ddd53957f30aa3030d590863d31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 9600 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 25 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 25×9 = 225. Time = 225/9600 = 0.0234375 s = 23.437500 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 9600, "data": 6, "parity": 1, "stop": 1, "frames": 25, "seconds": 0.0234375}, "prompt_sha1": "2af50f7ef9a17504682f3812c2a7c352bf406a7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 97%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.030×(10+0.030×50) = 1.145000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.97, "l2": 10, "l2_hit": 0.97, "mem": 50, "amat": 1.1450000000000005}, "prompt_sha1": "39278a1a711eb9a1e868c4a10f371fe80e841253", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_125` for a synchronous sampled input `noisy`. Update output `clean` only after observing 125 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_125 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 124) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_125", "stable_samples": 125}, "prompt_sha1": "572ec216c7bed4f9b2b47be29384aebf8daa20a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 5000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 15000 Hz satisfies it.", "output": "Nyquist minimum is 2×5000 = 10000 Hz. Proposed rate 15000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 5000, "min_fs": 10000, "proposed": 15000}, "prompt_sha1": "60e3d66dba2836c33b2112de52fa43b5b8125e69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 28 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 28-18 = 10.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 28, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 10}, "prompt_sha1": "f7a19a747cbd8c32bcaa0f4639a4756355ad8bc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_15` for a 15-bit unsigned input `data`, `4-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_15 (\n input logic [14:0] data,\n input logic [3:0] shamt,\n output logic [14:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_15", "width": 15, "direction": "right", "arithmetic": false}, "prompt_sha1": "7977037ece137f4fed06c2466819b2ee9a848669", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_59_lsb` for `59-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_59_lsb (\n input logic [58:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 58; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_59_lsb", "width": 59, "priority": "low"}, "prompt_sha1": "eb363354db6ec2b6de707a8eb5930ac59c1e72d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6931` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6931 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6931"}, "prompt_sha1": "273f05400d501992af8e097d525ae63c77d8ea4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w16_m55273` with clk, asynchronous active-low rst_n, active-high enable, and output logic [15:0] count. On reset count=0. When enabled it increments until 55273 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w16_m55273 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [15:0] count\n);\n localparam logic [15:0] LIMIT = 16'd55273;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w16_m55273", "width": 16, "max": 55273}, "prompt_sha1": "17d8b17437435e72d365cf126196fc61a0320d81", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_6_7908` converting a 6-bit binary input `bin` to 6-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_6_7908 (\n input logic [5:0] bin,\n output logic [5:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_6_7908", "width": 6}, "prompt_sha1": "c3c9b6c0b997acd28ab7dc02568b84ccfa3a9bc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.1 V source drives a 6800 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.1-3.3 = 7.8 V.\nI = V/R = 7.8/6800 A = 1.1471 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.1, "vf": 3.3, "r": 6800, "current_a": 0.0011470588235294118}, "prompt_sha1": "d81c7b0103db5d53cd963f6e78c2ce6cfe43b1f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 49 bits wide and the system uses 2 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2048 bytes = 2^11 bytes.\nOffset bits = 11.\nVPN bits = 49-11 = 38.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 49, "page_bytes": 2048, "offset_bits": 11, "vpn_bits": 38}, "prompt_sha1": "49ff4c7cd7619d31ad5c334cd6efe4675e0901ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3349820863, carries 25489 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 25489+0+0 = 25489. ACK = (3349820863+25489) mod 2^32 = 3349846352.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3349820863, "payload": 25489, "syn": 0, "fin": 0, "ack": 3349846352}, "prompt_sha1": "c3d2b38c1437c46dc384fd94ef998474cb5bac41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_9494` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_9494 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_9494", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "504a994f07df8daa2db884e3404ddd3d88cd6b05", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 2-way set-associative cache uses 16-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/16 = 65536.\nSets = 65536/2 = 32768.\nOffset bits = log2(16) = 4; index bits = log2(32768) = 15; tag bits = 40-4-15 = 21.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 16, "ways": 2, "addr_bits": 40, "lines": 65536, "sets": 32768, "offset": 4, "index": 15, "tag": 21}, "prompt_sha1": "bc334d6dbff27d9bd99225779b642f1d79840d9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['V', 'P', 'P', 'V', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["V", "P", "P", "V", "V", "V", "P", "P"], "value": 4, "blocked": 0}, "prompt_sha1": "19f29505e4c17de78672107b6834937a6f1510bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_5558` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_5558 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_5558", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "04feab4c9a1df420e6bcd9776de1855507799e8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=2200 nF and is stepped to 3.3 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=3.3(1-e^-4)=3.239558 V; τ=0.001034 s and t=0.004136 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 2.2e-06, "multiple": 4, "vin": 3.3, "vc": 3.239558391667177}, "prompt_sha1": "0511d7b3a1faa1c5decbd9ac45d95ff8dbff51ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 660 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 660/10000000 s; frequency = 10000000/660 = 15151.515152 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 660, "hz": 15151.515151515152}, "prompt_sha1": "0136077557b504d6ff26f4a3a00d87c77794af37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence TNNNNNNNNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "8f1e669e67cdaaaef3c80f4ec2eef0e7111af60a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2364(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2364(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2364([1, 2]) == 1.5\nassert mean_2364([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2364"}, "prompt_sha1": "4ea817c27f8cf6a72bebefb2e6ca84e3ceee3bfa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_177` generating a one-clock-cycle `tick` every 177 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_177 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 176) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_177", "divide": 177}, "prompt_sha1": "e89a521f337b80de787977af17e78e37c8f1dab4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NTTNTNTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on T; 2->T on T; 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 1, 1, 0, 1, 0, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "5d31758abadf89d26081fdf8e0a479b44f0ea753", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 80%. An L2 miss adds 200 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.060×(15+0.200×200) = 4.300000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.94, "l2": 15, "l2_hit": 0.8, "mem": 200, "amat": 4.3000000000000025}, "prompt_sha1": "967457fd5da1332ffbef9a9994c8b6613515d28c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_35` for a 35-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_35 (\n input logic [34:0] data,\n input logic [5:0] shamt,\n output logic [34:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_35", "width": 35, "direction": "left", "arithmetic": false}, "prompt_sha1": "41cac3b19bc906a00cfdd8ef03baafa7f20567da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 6-bit right-shift register module `shiftreg_right_6`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `6-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_6 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [5:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[5:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_6", "width": 6, "direction": "right"}, "prompt_sha1": "46c085480a3899ab40f9652fed45f8b45e9f1973", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w64_9004` implementing a dual-clock asynchronous FIFO with depth 128 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w64_9004 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 64,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w64_9004", "depth": 128, "width": 64, "ptr_w": 7}, "prompt_sha1": "4c21e021f9fad7a5430f5441a457703217ba2297", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 980 elements. Review loop `for i in range(980+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(980+1)` includes index 980, which is out of range for a length-980 sequence. Correct loop: `for i in range(980):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 980, "variant": "one_past"}, "prompt_sha1": "22314ff80df41f0462afbedc505204d17f30d3ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.75 ns hit time, 93.5% hit rate, and a 105 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.935 = 0.065.\nAMAT = hit time + miss rate × miss penalty\n= 4.75 ns + 0.065×105 ns = 11.5750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.75, "hit_rate": 0.935, "penalty": 105, "result": 11.574999999999994}, "prompt_sha1": "9963ad2007db35149d68ea321e9da30b3b1a65bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.60. Using Amdahl's law, compute the theoretical speedup on 16 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.60) + 0.60/16) = 2.285714.\nThe theoretical speedup is about 2.286×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.6, "n": 16, "result": 2.2857142857142856}, "prompt_sha1": "fe818a90d8916ad6134cd091fe8d8589367076a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `table`, an array of exactly `count` elements of type `int`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n total += table[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `table[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n total += table[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "32b5ccb71036944b83475a03757d448271e62b38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 3524-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 3524×8 = 28192 bits.\nSerialization delay = bits/rate = 28192/(10×10^6) s = 0.0028192 s = 2819.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 3524, "rate_mbps": 10, "delay_s": 0.0028192}, "prompt_sha1": "169386d0705256bb282c58d9f5c4db10b97562b2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m3708` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 3708 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m3708 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd3708;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m3708", "width": 12, "max": 3708}, "prompt_sha1": "e548cbde2d568c54ba10c1e3397b01323f85bdc4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 256 payload bytes plus 36 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 256/(256+36) = 0.876712 = 87.67%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 256, "overhead": 36, "efficiency": 0.8767123287671232}, "prompt_sha1": "c55561de23231ca46e4c0208652b2e8c6475f372", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "4d1f832178352023c39cb50bac5e76c3a4e4d184", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=2200 nF and is stepped to 5 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=5(1-e^-3)=4.751065 V; τ=0.0022 s and t=0.0066 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 2.2e-06, "multiple": 3, "vin": 5, "vc": 4.75106465816068}, "prompt_sha1": "3ff76a4b86224d890cb303543d4b2a51a357061f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x24_write_bypass` with 4 entries of 24 bits. Inputs: `clk`, `we`, `2-bit waddr`, `24-bit wdata`, `2-bit raddr`; output `24-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x24_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [23:0] wdata,\n input logic [1:0] raddr,\n output logic [23:0] rdata\n);\n logic [23:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x24_write_bypass", "entries": 4, "width": 24, "mode": "write_bypass"}, "prompt_sha1": "c9240ec2c96cf7645f1a28a6a0100e73e01548c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 2 MHz. Sampling consumes 12.5 cycles and conversion consumes 14 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 12.5+14 = 26.5. Period = 26.5/2000000 = 1.325e-05 s. Maximum rate = 1/period = 75471.698113 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 2000000.0, "sample_cycles": 12.5, "conv_cycles": 14, "period": 1.325e-05, "rate": 75471.69811320755}, "prompt_sha1": "a56b98048e362cf3ce26f8b80bf3b9258a7c8b3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=47 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/1 = -47.000000.\nVout = A_v×Vin = -47.000000×0.25 = -11.750000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 47, "vin": 0.25, "gain": -47.0, "vout": -11.75}, "prompt_sha1": "c6d029c25eceb1c7cd701536b2349f5a12dcc149", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 4-way set-associative cache uses 64-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/64 = 128.\nSets = 128/4 = 32.\nOffset bits = log2(64) = 6; index bits = log2(32) = 5; tag bits = 48-6-5 = 37.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 64, "ways": 4, "addr_bits": 48, "lines": 128, "sets": 32, "offset": 6, "index": 5, "tag": 37}, "prompt_sha1": "23b8672938314a6479f769915dca1057ffb49a2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 16-bit ADC uses a 3.3 V reference and returns code 42995. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^16-1 = 65535.\nV = 42995/65535 × 3.3 V = 2.165003 V.\nThus the estimated input is about 2.1650 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 16, "vref": 3.3, "code": 42995, "volts": 2.1650034332799266}, "prompt_sha1": "2548f1c4bc7cf9af361c0a341f4d0e9e9c8657ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xA7. Extract the 4-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xA7 >> 2) & 0xF = 0x9 (9).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 2, "value": 167, "mask": 15, "field": 9}, "prompt_sha1": "7e06393112402b396c861b09574e3f4c11ac4cf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x939B79EB, set bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 4)`. Result = 0x939B79FB.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 2476440043, "bit": 4, "op": "set", "result": 2476440059}, "prompt_sha1": "85794c4f49e03efca23ccda0a34470e13c207a40", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 41 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 41-15 = 26.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 41, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 26}, "prompt_sha1": "5c194c918f12dab41ba88489de195e1bf57c5ec9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m815` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 815 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m815 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd815;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m815", "width": 11, "max": 815}, "prompt_sha1": "9192c74ff2f29163d5b65f8f9d83060a9e12e17f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x26, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x26<<1)|1 = 0x4D = 01001101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 38, "rw": 1, "byte": 77}, "prompt_sha1": "29940998d55888387e32522b552bb64f744be1a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1452 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1452/(1452+40+8) = 0.968000 = 96.80%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1452, "iphdr": 40, "eff": 0.968}, "prompt_sha1": "3f8caef15ae06c5eafd7b219df74b1c5a9e8405d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 64 bits wide and the system uses 512 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 524288 bytes = 2^19 bytes.\nOffset bits = 19.\nVPN bits = 64-19 = 45.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 64, "page_bytes": 524288, "offset_bits": 19, "vpn_bits": 45}, "prompt_sha1": "974a34a6d6586aeb1c619771254e54b02453e628", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=1000 nF and is stepped to 1 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1(1-e^-3)=0.950213 V; τ=0.00047 s and t=0.00141 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1.0000000000000002e-06, "multiple": 3, "vin": 1, "vc": 0.950212931632136}, "prompt_sha1": "ceb0d4e7195616488dd778ba7e6eb1da993ee330", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 8 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 8000000/(16×38400) = 13.020833.\nNearest integer divisor D = 13.\nActual baud = 8000000/(16×13) = 38461.538 baud.\nError = (38461.538-38400)/38400×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 8000000, "oversample": 16, "baud": 38400, "divisor": 13, "actual": 38461.53846153846, "error_pct": 0.1602564102564088}, "prompt_sha1": "51fd85c9ccafe1e340096d9da1714d3b10ae05bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence NNTNTTTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on T; 2->T on T; 3->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [0, 0, 1, 0, 1, 1, 1, 1, 0], "final_state": 2}, "prompt_sha1": "4e5c9044e410c45f1523d97b17972e2a50f8d16c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 16000 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 16000-20-32 = 15948 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 16000, "iphdr": 20, "tcphdr": 32, "mss": 15948}, "prompt_sha1": "95bf68397e0ba8e4653cdd1558972624d46570d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 5% of instructions, the branch misprediction rate is 2%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.020 × 8 = 0.008000.\nEffective CPI = 1.1 + 0.008000 = 1.108000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.05, "mispred": 0.02, "penalty": 8, "result": 1.108}, "prompt_sha1": "35ce89c9f7cd53d18432ff13e794b4b7ba56b8dc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 0.1 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-07×1²=5e-08 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-07, "v": 1, "energy": 5e-08}, "prompt_sha1": "3bcf5f8bcad571036bae7bf0d8b4b6bd25eb0480", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=12 V, R1=47 kOhm from Vin to Vout, and R2=10 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 12×10/(47+10) = 2.105263 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 12, "r1": 47, "r2": 10, "vout": 2.1052631578947367}, "prompt_sha1": "a8818d2283fe4e9654f98ff8b36f425c6c02fb8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 4800 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×4800×10^6×1 = 4.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 4800, "channels": 1, "gbps": 4.8}, "prompt_sha1": "6bd3308035f1693043565ee9777764a8d0b55cbd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 21 and tail index 95, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (21-95) mod 128 = 54. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 21, "tail": 95, "occupancy": 54}, "prompt_sha1": "56ad440fb1d9323e32fbfe42f60374b77cba44f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0110111000111100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 9 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0110111000111100", "ones": 9, "parity": 1}, "prompt_sha1": "49c199a54133714fc8fab056259ba7b7fa3d77a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/10 = 0.047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 10, "tau": 0.047}, "prompt_sha1": "5ab676ee0c3d9a2e5a2ba1a059c8ad5f3289cd85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 16 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(16×10^6) s = 32.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 16, "bits": 512, "time_us": 32.0}, "prompt_sha1": "6716da6764fcf390e5a32c0a4ca5922898d4a2ea", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-32 = 1968 bytes.\nRound down to an 8-byte multiple: floor((1968)/8)×8 = 1968 bytes.\nFragments required = ceil(3000/1968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 32, "payload": 3000, "max_payload": 1968, "fragments": 2}, "prompt_sha1": "a72ff02e778b93ac70abb42d5a9e604684224c1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 16384 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^14 = 2^20 = 1048576 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 14, "entries": 1048576}, "prompt_sha1": "2a7e7d2de6c83b773574da2f1575a1a16e46bb47", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence NTNTTTTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on N; 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [0, 1, 0, 1, 1, 1, 1, 1], "final_state": 3}, "prompt_sha1": "bc5f5740205b03816c8b9ecd66bb4e307f98af3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 64 KiB direct-mapped data cache with 64-byte lines and 36-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 64 KiB = 65536 bytes.\nLines = 65536/64 = 1024.\nOffset bits = log2(64) = 6.\nIndex bits = log2(1024) = 10.\nTag bits = 36-10-6 = 20.\nCheck: 20+10+6 = 36 = 36 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 65536, "line": 64, "addr_bits": 36, "lines": 1024, "offset_bits": 6, "index_bits": 10, "tag_bits": 20}, "prompt_sha1": "24ce8801411c608daddc5b220560adb8cde0c9a2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-24 = 1976 bytes.\nRound down to an 8-byte multiple: floor((1976)/8)×8 = 1976 bytes.\nFragments required = ceil(8000/1976) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 24, "payload": 8000, "max_payload": 1976, "fragments": 5}, "prompt_sha1": "568631ccb2a10ead6e556da8afe0678df747374a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 48 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×48²=0.001152 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 48, "energy": 0.001152}, "prompt_sha1": "0520f9b765ec5c2956a9a10b010adddcedf983ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x89, toggle bit 6 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 6)`. Result = 0xC9.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 137, "bit": 6, "op": "toggle", "result": 201}, "prompt_sha1": "e4dc8f56e14e126fd4083090d832169084401b14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 28-bit left-shift register module `shiftreg_left_28`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `28-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_28 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [27:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[26:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_28", "width": 28, "direction": "left"}, "prompt_sha1": "0c422c401a2b64da4864481aa10255af382d0865", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 50. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 50/1023 × 5 V = 0.244379 V.\nThus the estimated input is about 0.2444 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 50, "volts": 0.24437927663734116}, "prompt_sha1": "395556eb3d358c4286b20c580c207bee4d070c3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w31_unsigned` comparing two 31-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w31_unsigned (\n input logic [30:0] a,\n input logic [30:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w31_unsigned", "width": 31, "signed": false}, "prompt_sha1": "00ec87d11ad6b995a9911a85780628de4e0c0efe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 24 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 24×11 = 264. Time = 264/230400 = 0.00114583333 s = 1.145833 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 8, "parity": 0, "stop": 2, "frames": 24, "seconds": 0.0011458333333333333}, "prompt_sha1": "e52ddd3fe58c322983954ecb07c4fc4eee69d70c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 634 elements. Review loop `for i in range(634-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(634-1)` produces indices 0 through 632, so index 633 is skipped. Correct loop: `for i in range(634):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 634, "variant": "miss_last"}, "prompt_sha1": "a89e30071ab5bf38051dd55873edeaa4884c598c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 256 data bits per transfer at 200 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 256/8 = 32. Bandwidth = 32×200×10^6×3 = 19.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 256, "rate_mt": 200, "channels": 3, "gbps": 19.2}, "prompt_sha1": "642339b43c02122c4ca741f47ae9e4cdc662c19c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-32 = 1368 bytes.\nRound down to an 8-byte multiple: floor((1368)/8)×8 = 1368 bytes.\nFragments required = ceil(5000/1368) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 32, "payload": 5000, "max_payload": 1368, "fragments": 4}, "prompt_sha1": "2838c2a3a5080e650014b2f1cbd84fea0477d64b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x9948D392, toggle bit 35 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 35)`. Result = 0x89948D392.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 2571686802, "bit": 35, "op": "toggle", "result": 36931425170}, "prompt_sha1": "12cf735b14fcfcf67cf5cdf6b17bb24a1cf9ff14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8766(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8766(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8766([1, 2]) == 1.5\nassert mean_8766([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8766"}, "prompt_sha1": "6f9176add8eb91aa89b73eb80311c76bd8967e57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 75%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.030×(6+0.250×50) = 1.555000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.97, "l2": 6, "l2_hit": 0.75, "mem": 50, "amat": 1.5550000000000006}, "prompt_sha1": "6e524d6d297455405b010d9d5826b5d6a860d346", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_4465` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_4465 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_4465"}, "prompt_sha1": "da554e6453038349a5d15ce648049aacd927d92a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_62_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 62 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_62_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 6'd62;\n end else begin\n if (pulse_in)\n count <= 6'd62;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_62_retrig", "cycles": 62, "retrigger": true}, "prompt_sha1": "15e7e527d67a2aef2ecaf310b9de9b4bfcd841e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(16×1000000) = 1.000000.\nNearest integer divisor D = 1.\nActual baud = 16000000/(16×1) = 1000000.000 baud.\nError = (1000000.000-1000000)/1000000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 16, "baud": 1000000, "divisor": 1, "actual": 1000000.0, "error_pct": 0.0}, "prompt_sha1": "9a1bbb300a80f15794c47fe2261e05b32a2dd405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 9. Apply operations ['P', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'P', 'V', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 9 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 9, "ops": ["P", "V", "V", "P", "P", "P", "P", "P", "V", "V", "P", "V", "V", "P", "V", "P", "V", "V"], "value": 9, "blocked": 0}, "prompt_sha1": "7434d518f9136132ae0d9b9ab9a2f19c198019b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x32_write_bypass` with 128 entries of 32 bits. Inputs: `clk`, `we`, `7-bit waddr`, `32-bit wdata`, `7-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [31:0] wdata,\n input logic [6:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x32_write_bypass", "entries": 128, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "a26a6f4c38b58576308ca98882a358d289b940b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 1600 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×1600×10^6×1 = 1.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 1600, "channels": 1, "gbps": 1.6}, "prompt_sha1": "f4d8778c2d90d09484d576256124949b2df290df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 1 MHz, prescaler divisor is 118, and period is 23919 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 1000000/(118×23919) = 0.354303 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 1000000, "prescaler": 118, "period": 23919, "hz": 0.3543031176548535}, "prompt_sha1": "795b53049dd264508178a2b0c6ec07ffee894fb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 23; x = x + 529;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 23+529 = 552. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (552) mod 2^8 = 40. So `x` stores 40. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 23, "add": 529, "result": 40}, "prompt_sha1": "bfbfa2c286ada4d0a4e6d31ef87bb1431fd1327d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=10 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 10×10^-3/220 = 4.54545455e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.01, "r": 220, "tau": 4.545454545454546e-05}, "prompt_sha1": "a4a1d84d8146d2db4497fa30bc591c8dcdbd3e9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 49-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^49/2^12 = 2^37 = 137438953472 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 49, "page_exp": 12, "entries": 137438953472}, "prompt_sha1": "adb6b8f6b6f80fe50e6ca40a5bc28d5ccba889d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100 ohm, C=2200 nF and is stepped to 2.5 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=2.5(1-e^-1)=1.580301 V; τ=0.00022 s and t=0.00022 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100, "c": 2.2e-06, "multiple": 1, "vin": 2.5, "vc": 1.5803013970713942}, "prompt_sha1": "f856b36429faa1ce2d37c8d9e2725e723c27f983", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 8-way set-associative cache uses 128-byte lines and 40-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/128 = 128.\nSets = 128/8 = 16.\nOffset bits = log2(128) = 7; index bits = log2(16) = 4; tag bits = 40-7-4 = 29.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 128, "ways": 8, "addr_bits": 40, "lines": 128, "sets": 16, "offset": 7, "index": 4, "tag": 29}, "prompt_sha1": "06e29d10748e49b72b207a26dfcc97ab88067194", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1864-byte frame is serialized onto a 2500 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1864×8 = 14912 bits.\nSerialization delay = bits/rate = 14912/(2500×10^6) s = 5.9648e-06 s = 5.964800 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1864, "rate_mbps": 2500, "delay_s": 5.9648e-06}, "prompt_sha1": "cd49040ecf1044875bd94d416cb2562a2b7f7934", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 8%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.080 × 8 = 0.096000.\nEffective CPI = 1.1 + 0.096000 = 1.196000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.08, "penalty": 8, "result": 1.1960000000000002}, "prompt_sha1": "c4f0042914cbbcfaa559b0b3717368ef64cb5839", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 10% of instructions, the branch misprediction rate is 10%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.100 × 12 = 0.120000.\nEffective CPI = 1 + 0.120000 = 1.120000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.1, "mispred": 0.1, "penalty": 12, "result": 1.12}, "prompt_sha1": "126a10480135fc33d6425e2da72d4910f77f9999", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 1` on one shared integer without synchronization. Assume `packets` initially equals 429. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 429; T2 reads 429; both compute 430; T1 writes 430; T2 writes 430. The observed final value is 430, but two serial increments would produce 431.\n\n```\nlock(mutex)\npackets = packets + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "c1bbdaf106dff17a69c9293df9d284c3c20ef797", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w8_nocin` implementing a 8-bit unsigned adder with inputs `a`, `b` and outputs `8-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w8_nocin (\n input logic [7:0] a,\n input logic [7:0] b,\n output logic [7:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w8_nocin", "width": 8, "cin": false}, "prompt_sha1": "a61cbcee1b59de49f35946667db40a9c91c467db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2544(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2544(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2544([1, 2]) == 1.5\nassert mean_2544([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2544"}, "prompt_sha1": "5158de9f134eef9bd15f1fab432a094c90ffd5b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=4.7 kOhm, Rf=4.7 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/4.7 = -1.000000.\nVout = A_v×Vin = -1.000000×0.2 = -0.200000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 4.7, "rf": 4.7, "vin": 0.2, "gain": -1.0, "vout": -0.2}, "prompt_sha1": "cbb120807eaa31ec47b3bf70c0a268219e9097c3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_247729` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_247729 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_247729"}, "prompt_sha1": "c2247a456e5ccb2161a500f036370f5d92f2d83b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 48 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 48-13 = 35.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 48, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 35}, "prompt_sha1": "7c8509fa65a67c5429be74ca124eef61f80b5fe5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x66, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x66<<1)|0 = 0xCC = 11001100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 102, "rw": 0, "byte": 204}, "prompt_sha1": "e7bb376bb78a6a63891e8cff7228b08a0accdda5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100000 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/100000=2.5e-05 A. P=V²/R=2.5²/100000=6.25e-05 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 100000, "i": 2.5e-05, "p": 6.25e-05}, "prompt_sha1": "358e616f5363d1066979040d0aadb80e78335b8b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1000 Mbit/s and RTT 80 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1000×10^6 × 80/1000 = 8e+07 bits = 1e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1000, "rtt_ms": 80, "bits": 80000000.0, "bytes": 10000000.0}, "prompt_sha1": "b4028c139aaf0dcd7a31f977ba97ac2693e7926e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_27_lsb` for `27-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_27_lsb (\n input logic [26:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 26; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_27_lsb", "width": 27, "priority": "low"}, "prompt_sha1": "99e0dce56e4c23a779317d915e581fe5856f7c33", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 37-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^37/2^10 = 2^27 = 134217728 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 37, "page_exp": 10, "entries": 134217728}, "prompt_sha1": "cb8446ea87f3bd681b92a55d736490a02d5da46f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=22000 ohm, C=2200 nF and is stepped to 1.8 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1.8(1-e^-0.5)=0.708245 V; τ=0.0484 s and t=0.0242 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 22000, "c": 2.2e-06, "multiple": 0.5, "vin": 1.8, "vc": 0.7082448125172599}, "prompt_sha1": "880a0029543b4a4dc75d2a9085342d1876107b88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 52-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^52/2^13 = 2^39 = 549755813888 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 52, "page_exp": 13, "entries": 549755813888}, "prompt_sha1": "23e8eeb5187d8717b7584a444cd32e290183e026", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 256 entries and maps 4 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 256×4 KiB = 1024 KiB = 1048576 bytes = 1.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 256, "page_kib": 4, "reach": 1048576}, "prompt_sha1": "951a9c2bfda6d85f5be317183e82e5ee7d919ea3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 18 and initial occupancy is 8. In an abstract batch, producer attempts to enqueue 135 items first, dropping any excess beyond capacity; then consumer removes up to 137 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=18, dropped=125; consumed=18; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 18, "start": 8, "prod": 135, "cons": 137, "dropped": 125, "consumed": 18, "final": 0}, "prompt_sha1": "1051f74eec95ad3677fe8a611caa219b86f41ac7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_75_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 75 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_75_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd75;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_75_ignore", "cycles": 75, "retrigger": false}, "prompt_sha1": "c1c83c2f80a25231f9a453a7ed549c6849ab67fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_150` generating a one-clock-cycle `tick` every 150 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_150 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 149) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_150", "divide": 150}, "prompt_sha1": "401aae4f85e8a1a7e822d2ec829c0cf9213c64c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_543837` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_543837 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_543837"}, "prompt_sha1": "738826835e5ed7512b872833bc16dfb8ede2a406", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=680000 ohm and C=39000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=680000×39000×10^-12 s = 0.02652 s.\nf_c=1/(2πRC)=1/(2π×680000×39000×10^-12) = 6.0013 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 680000, "c_f": 3.9e-08, "tau": 0.02652, "fc": 6.001317612816567}, "prompt_sha1": "0f2ec70a42b049f3e8f23591bc9990d36880b9ec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 18 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 18 = 21.\nClock pulses = 21×9 = 189.\nTime = 189/100000 s = 1890.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 18, "clocks": 189, "time_s": 0.00189}, "prompt_sha1": "872d172cefada467bbf4dc2bbd6241e0f16cf7df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=10 ms, C=3 ms,T=100 ms, C=1 ms,T=25 ms, C=4 ms,T=20 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/10 + 3/100 + 1/25 + 4/20 = 0.470000 = 47.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 10], [3, 100], [1, 25], [4, 20]], "utilization": 0.47000000000000003}, "prompt_sha1": "7db8d1c6544a846da4c784df9809235b0d9dcd09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.228.229.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.228.229.0\nBroadcast address: 10.228.229.255\nUsable host range: 10.228.229.1 to 10.228.229.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.228.229.0/24", "usable": 254, "first": "10.228.229.1", "last": "10.228.229.254", "broadcast": "10.228.229.255"}, "prompt_sha1": "1de8cbffd979cc2dbd77704997d4d2a7e18ab8b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TTTNNNTNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 1, 1, 0, 0, 0, 1, 0, 1, 0], "final_state": 0}, "prompt_sha1": "b4f4760cd21d5ea0b6a10e05b7ca91064d2803b3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_38_msb` for `38-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_38_msb (\n input logic [37:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 38; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_38_msb", "width": 38, "priority": "high"}, "prompt_sha1": "2ca97c3b63cbe768f8869da093ed4ef1976c3a9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_33` generating a one-clock-cycle `tick` every 33 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_33 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 32) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_33", "divide": 33}, "prompt_sha1": "dc2c12feb4bdadc51e35e15cd0198d04c786d3f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/22 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 22, "tau": 0.0001}, "prompt_sha1": "fe73c49d4b38ee7e0cc79fab3f5ef23b9e9e295a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w63_unsigned` comparing two 63-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w63_unsigned (\n input logic [62:0] a,\n input logic [62:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w63_unsigned", "width": 63, "signed": false}, "prompt_sha1": "ad481e54ad8cd0ba0a2a160134b4cd6965e63a30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 256 KiB 8-way set-associative cache uses 32-byte lines and 36-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 262144/32 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(32) = 5; index bits = log2(1024) = 10; tag bits = 36-5-10 = 21.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 256, "line": 32, "ways": 8, "addr_bits": 36, "lines": 8192, "sets": 1024, "offset": 5, "index": 10, "tag": 21}, "prompt_sha1": "b8de4d82de26f70df98ea369d556d35a25e6f498", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=33000 ohm and C=1000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=33000×1000×10^-12 s = 3.3e-05 s.\nf_c=1/(2πRC)=1/(2π×33000×1000×10^-12) = 4822.8771 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 33000, "c_f": 1e-09, "tau": 3.3e-05, "fc": 4822.877063390768}, "prompt_sha1": "7fc1a94fcf94b5868a840236b91c646adbd0ae69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 39394 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 39394/5000000 s; frequency = 5000000/39394 = 126.922882 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 39394, "hz": 126.92288165710514}, "prompt_sha1": "2d18bb780ff7f6c0350a6b6cee74ee957d213560", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551403; x = x + 275;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551403+275 = 18446744073709551678. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551678) mod 2^64 = 62. So `x` stores 62. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551403, "add": 275, "result": 62}, "prompt_sha1": "e73d25864c0ad436414f9a5ad52c9bd2e0d4ca09", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w61_unsigned` comparing two 61-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w61_unsigned (\n input logic [60:0] a,\n input logic [60:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w61_unsigned", "width": 61, "signed": false}, "prompt_sha1": "9f7465a07e0ac485dc9f0e0fdbef721b2e0f9553", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 2%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.020 × 8 = 0.032000.\nEffective CPI = 1.2 + 0.032000 = 1.232000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.02, "penalty": 8, "result": 1.232}, "prompt_sha1": "599efbc1da00fc6572bf742a20fe731b823f1e93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 76 and initial occupancy is 53. In an abstract batch, producer attempts to enqueue 145 items first, dropping any excess beyond capacity; then consumer removes up to 99 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=76, dropped=122; consumed=76; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 76, "start": 53, "prod": 145, "cons": 99, "dropped": 122, "consumed": 76, "final": 0}, "prompt_sha1": "57a5b626449ce25171ef2aaa118bd757c72c73a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 8%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.080 × 12 = 0.096000.\nEffective CPI = 1.1 + 0.096000 = 1.196000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.08, "penalty": 12, "result": 1.1960000000000002}, "prompt_sha1": "a30dcc0e77319e476c7051032952001674f03797", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 1000 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (1000×270)/(1000+270) = 212.598425 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 1000, "r2": 270, "req": 212.5984251968504}, "prompt_sha1": "e22822a8c90f8cd718bf113236a11a55b084f200", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 40-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-40 = 536 bytes.\nRound down to an 8-byte multiple: floor((536)/8)×8 = 536 bytes.\nFragments required = ceil(4000/536) = 8.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 40, "payload": 4000, "max_payload": 536, "fragments": 8}, "prompt_sha1": "cf5a1e7fc14cf4b5e8968c2aa426660dc185a33d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 2.5 V reference and returns code 28. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 28/1023 × 2.5 V = 0.068426 V.\nThus the estimated input is about 0.0684 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 2.5, "code": 28, "volts": 0.06842619745845552}, "prompt_sha1": "876741896ad5e5ee90183b5888be478909477661", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_9_34_11` with RED, GREEN, YELLOW states. Hold RED for 9 clock cycles, GREEN for 34, and YELLOW for 11; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_9_34_11 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 8) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 33) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 10) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_9_34_11", "red": 9, "green": 34, "yellow": 11}, "prompt_sha1": "e4cfdbf9477e80ebc8768d15be1d0b1ebb59df77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_8132` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_8132 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_8132"}, "prompt_sha1": "bcea038fe9e9df5f9b877c603265f45993e52327", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 1000 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×1000×10^6×3 = 6.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 1000, "channels": 3, "gbps": 6.0}, "prompt_sha1": "0e2deeb0367add44f4fded117ddc87703720152b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 768 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 768 = 384. Verification: 384/768 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 768, "duty": 50, "high": 384}, "prompt_sha1": "fe3d0bb3cc1e05dce6ad19c7901bfcd156c46ed2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w50_cin` implementing a 50-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `50-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w50_cin (\n input logic [49:0] a,\n input logic [49:0] b,\n input logic cin,\n output logic [49:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w50_cin", "width": 50, "cin": true}, "prompt_sha1": "fb8b88fdf703acbce5b300cdd4f3fad7b3131930", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 160 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 38400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 160000000/(8×38400) = 520.833333.\nNearest integer divisor D = 521.\nActual baud = 160000000/(8×521) = 38387.716 baud.\nError = (38387.716-38400)/38400×100% = -0.0320%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 160000000, "oversample": 8, "baud": 38400, "divisor": 521, "actual": 38387.71593090211, "error_pct": -0.0319897632757602}, "prompt_sha1": "462b30dd6bc4db7e82f64f7a9d636112d4566492", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_36_12` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 36, and YELLOW for 12; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_36_12 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 35) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 11) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_36_12", "red": 20, "green": 36, "yellow": 12}, "prompt_sha1": "60552ef4a8770e4a73f48fb93a0c0a659069eada", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/1 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 1, "tau": 0.0001}, "prompt_sha1": "a667071c089e50a22b16b00c4a5c378ba9a3b251", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_127_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 127 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_127_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd127;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_127_ignore", "cycles": 127, "retrigger": false}, "prompt_sha1": "d49ff6f8166707349a917c8964d9485b1eecb413", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-32 = 1368 bytes.\nRound down to an 8-byte multiple: floor((1368)/8)×8 = 1368 bytes.\nFragments required = ceil(6000/1368) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 32, "payload": 6000, "max_payload": 1368, "fragments": 5}, "prompt_sha1": "7c7b94b0fbc3d3615f55f590ab049b66ff416368", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 4 KiB direct-mapped data cache with 128-byte lines and 28-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 4 KiB = 4096 bytes.\nLines = 4096/128 = 32.\nOffset bits = log2(128) = 7.\nIndex bits = log2(32) = 5.\nTag bits = 28-5-7 = 16.\nCheck: 16+5+7 = 28 = 28 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 4096, "line": 128, "addr_bits": 28, "lines": 32, "offset_bits": 7, "index_bits": 5, "tag_bits": 16}, "prompt_sha1": "c0b9341bbe0b8eaeb8d80ced8f215c4e56ee765f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 2.75 ns hit time, 91.9% hit rate, and a 130 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.919 = 0.081.\nAMAT = hit time + miss rate × miss penalty\n= 2.75 ns + 0.081×130 ns = 13.2800 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 2.75, "hit_rate": 0.919, "penalty": 130, "result": 13.279999999999994}, "prompt_sha1": "a117659fb5a58a6079453bad6d9136ca5b58e99c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×1²=5e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 1, "energy": 4.9999999999999996e-05}, "prompt_sha1": "b0f90fd01b2b82ec903c7143236c32056c39d8a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x65, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x65<<1)|0 = 0xCA = 11001010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 101, "rw": 0, "byte": 202}, "prompt_sha1": "5204b5a4f8e7521e6f057605b8057cebe3ca6524", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^11 V = 0.00146484375 V = 1464.843750 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 3.0, "step": 0.00146484375}, "prompt_sha1": "b4406e1bddd3265ccd429f1d26191c3da0e5e724", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 111011100110010010100001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 12 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "111011100110010010100001", "ones": 12, "parity": 0}, "prompt_sha1": "ebb086d697597569c253a168c4125c9cb94db48b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^17 V = 3.43322753906e-05 V = 34.332275 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 4.5, "step": 3.4332275390625e-05}, "prompt_sha1": "bcf4ef72f505fe54fe9bd6b38fd75dc4b1729bce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 100 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 3675 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×3675/(100×10^6) = 0.0018375 = 0.183750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 100, "irq_hz": 50, "cycles": 3675, "load": 0.0018375}, "prompt_sha1": "bdd370d1885e7f507eadb807e63e8ef8ebf76864", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=100 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/22 = -4.545455.\nVout = A_v×Vin = -4.545455×1 = -4.545455 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 100, "vin": 1.0, "gain": -4.545454545454546, "vout": -4.545454545454546}, "prompt_sha1": "f63353c549e6a054ac4e58ba7b3450f057528ed1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_21719` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_21719 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_21719"}, "prompt_sha1": "8f1b4a2b108db4eea0864a78e344686d58d1af26", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 55; x = x + 349;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 55+349 = 404. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (404) mod 2^8 = 148. So `x` stores 148. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 55, "add": 349, "result": 148}, "prompt_sha1": "c223c84becfc1ee7b1786c85e7dcbfe46fffc496", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_30` for a synchronous sampled input `noisy`. Update output `clean` only after observing 30 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_30 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 29) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_30", "stable_samples": 30}, "prompt_sha1": "60a0ee9abca20f3e65ab36b1e248803ae23b04d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 8 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 8 MHz / 16 = 0.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 8000000.0, "divider": 16, "spi_hz": 500000.0}, "prompt_sha1": "18496c1933d0da3f8ac56fd1a37468cf23c9ab49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.9 V source drives a 1200 ohm resistor in series with an LED whose forward voltage is assumed to be 3.3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.9-3.3 = 20.6 V.\nI = V/R = 20.6/1200 A = 17.1667 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.9, "vf": 3.3, "r": 1200, "current_a": 0.017166666666666663}, "prompt_sha1": "7678f7159f03649f6a4e3cd7ea6453db38100097", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 37 and initial occupancy is 32. In an abstract batch, producer attempts to enqueue 31 items first, dropping any excess beyond capacity; then consumer removes up to 77 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=37, dropped=26; consumed=37; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 37, "start": 32, "prod": 31, "cons": 77, "dropped": 26, "consumed": 37, "final": 0}, "prompt_sha1": "111e10546dc3062209b316b566d7e7b3fac68693", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `count` elements of type `unsigned`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n sum += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `values[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n sum += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "23a7da9e049fe69e5a057b9b33608436ca4ee713", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 92%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.010×(12+0.080×80) = 1.384000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.99, "l2": 12, "l2_hit": 0.92, "mem": 80, "amat": 1.3840000000000001}, "prompt_sha1": "5596941ec3c1b9b87240ecdee9b6b42ba6b46f5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 160.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+16 = 176.5. Period = 176.5/32000000 = 5.515625e-06 s. Maximum rate = 1/period = 181303.116147 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 160.5, "conv_cycles": 16, "period": 5.515625e-06, "rate": 181303.11614730879}, "prompt_sha1": "f6ad4d69022b73719c25687b72152eaa9bc94734", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock A then BUF; task_B acquires BUF then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds A while waiting for BUF, while task_B holds BUF while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before BUF. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "7edda03d7b83322ba579c6635417db29e37de2dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 3000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-28 = 1972 bytes.\nRound down to an 8-byte multiple: floor((1972)/8)×8 = 1968 bytes.\nFragments required = ceil(3000/1968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 28, "payload": 3000, "max_payload": 1968, "fragments": 2}, "prompt_sha1": "5df8750ff761c7397838c6c8a48ed73e519c289b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 9-bit up/down counter `updown_9_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_9_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [8:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_9_wrap", "width": 9, "wrap": true}, "prompt_sha1": "be21a639263de9822e90818dcdc053e0dcdee663", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=47 nF and is stepped to 1.8 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=1.8(1-e^-5)=1.787872 V; τ=0.0002209 s and t=0.0011045 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 4.7000000000000004e-08, "multiple": 5, "vin": 1.8, "vc": 1.7878716954016463}, "prompt_sha1": "68cab4f6cbc23f1371833de4921af244bcb79bf0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x66, toggle bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 1)`. Result = 0x64.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 102, "bit": 1, "op": "toggle", "result": 100}, "prompt_sha1": "1762cb932cfacbce9b285c018604a218b54ff9d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_165` generating a one-clock-cycle `tick` every 165 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_165 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 164) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_165", "divide": 165}, "prompt_sha1": "04c44fb938fe32584f7e9ad8f0a9f8b160188518", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 3000 payload bytes plus 24 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 3000/(3000+24) = 0.992063 = 99.21%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 3000, "overhead": 24, "efficiency": 0.9920634920634921}, "prompt_sha1": "c2afad0204b6f410ba55d9f7021d756de22d723a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 415-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 415×8 = 3320 bits.\nSerialization delay = bits/rate = 3320/(1000×10^6) s = 3.32e-06 s = 3.320000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 415, "rate_mbps": 1000, "delay_s": 3.32e-06}, "prompt_sha1": "3ada7560c986f5a1caead51c75173601df0ce1b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 54 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 54-18 = 36.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 54, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 36}, "prompt_sha1": "298b83d101ff5e5329eadc566337748016b7b1f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xE1314ABB, toggle bit 26 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 26)`. Result = 0xE5314ABB.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 3778103995, "bit": 26, "op": "toggle", "result": 3845212859}, "prompt_sha1": "e59fa33e9d4e946aa678e9c1f94485eab2941d6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 95.7% hit rate, and a 155 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.957 = 0.043.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.043×155 ns = 11.1650 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.957, "penalty": 155, "result": 11.165000000000006}, "prompt_sha1": "2562477aefb21013e58b22af48b62b7031553d04", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 12681. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 12681/16383 × 3 V = 2.322102 V.\nThus the estimated input is about 2.3221 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 12681, "volts": 2.322102179088079}, "prompt_sha1": "6042b7a75ca8200238a980a8015d7727b6e21103", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x5C52B1F1AA in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: AA F1 B1 52 5C.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 396524384682, "endian": "little", "bytes": [170, 241, 177, 82, 92]}, "prompt_sha1": "e183824b09ee88e01ae6a60c59c647636bd5c6b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_8403` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_8403 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_8403"}, "prompt_sha1": "fc601180d9f0e353447408bfd800796e4f0eef2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `requests = requests + 5` on one shared integer without synchronization. Assume `requests` initially equals 125. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 125; T2 reads 125; both compute 130; T1 writes 130; T2 writes 130. The observed final value is 130, but two serial increments would produce 135.\n\n```\nlock(mutex)\nrequests = requests + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "cd351416260a1f889e59ad190d7ef927317d82eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 8 bytes per beat at 25 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×25×10^6 = 200000000 B/s. Time = 2048/200000000 = 1.024e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 8, "rate_mhz": 25, "sec": 1.024e-05}, "prompt_sha1": "641019e138803f449df82489c9d3ff9721dea157", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10110011001011 using generator polynomial bits 10001. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 17, "msg_bits": 14, "msg": 11467, "remainder": 9}, "prompt_sha1": "5bc63892aba5b1d9d5f514cb9b73fa8daf4e3f9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 16 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 16×512 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 16, "page_kib": 512, "reach": 8388608}, "prompt_sha1": "ad5a63561c7457930a53a1fb5c28264027028af2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=47 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/22 = -2.136364.\nVout = A_v×Vin = -2.136364×0.2 = -0.427273 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 47, "vin": 0.2, "gain": -2.1363636363636362, "vout": -0.42727272727272725}, "prompt_sha1": "94cf624f586f200fa0eef08098d01547461d9754", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.68. Using Amdahl's law, compute the theoretical speedup on 8 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.68) + 0.68/8) = 2.469136.\nThe theoretical speedup is about 2.469×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.68, "n": 8, "result": 2.469135802469136}, "prompt_sha1": "6e391211c606f2c3de44200755ba2a0c89d4aea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xA0507D4BA1A2 in 6 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: A0 50 7D 4B A1 A2.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 176267559936418, "endian": "big", "bytes": [160, 80, 125, 75, 161, 162]}, "prompt_sha1": "2797ff7d4e324c938fd52f2e98dcd4a1c7f28307", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 19-bit ADC spanning 0 to 1.8 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.8/2^19 V = 3.43322753906e-06 V = 3.433228 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 19, "vref": 1.8, "step": 3.4332275390625e-06}, "prompt_sha1": "af9499b63111624a1baa9035f6ef0c53884b7849", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 47007 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 47007/100000 s; frequency = 100000/47007 = 2.127343 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 47007, "hz": 2.1273427361882273}, "prompt_sha1": "033e87b29f7e2e07f07c3c2b9c282c8ce6a6c6b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 200 million instructions at average CPI 1.2 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 200×10^6×1.2/(2.5×10^9) = 0.096 s = 96.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 200, "cpi": 1.2, "ghz": 2.5, "sec": 0.096}, "prompt_sha1": "fb9440cf537e7e6fbe16751cbb4abf56d2ecf360", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0xD2299069, clear bit 18 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 18)`. Result = 0xD2299069.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 3525939305, "bit": 18, "op": "clear", "result": 3525939305}, "prompt_sha1": "00283d503a7caa36ddef205bca2649e4c2e0402d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `a`, an array of exactly `n` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= n; ++i) {\n result += a[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `n-1`, but `i <= n` also executes at `i == n` and accesses `a[n]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < n; ++i) {\n result += a[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "22d6483f233595187751f883da51136106bd9585", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 4000 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 4000 = 1500. Verification: 1500/4000 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 4000, "duty": 37.5, "high": 1500}, "prompt_sha1": "4399c72694e417036ae512751d05e94a06f9b608", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 10-bit ADC spanning 0 to 2.56 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.56/2^10 V = 0.0025 V = 2500.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 10, "vref": 2.56, "step": 0.0025}, "prompt_sha1": "30403fccef677dd65ae606ef4dc078ae43a2536d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 124 and initial occupancy is 59. In an abstract batch, producer attempts to enqueue 73 items first, dropping any excess beyond capacity; then consumer removes up to 18 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=124, dropped=8; consumed=18; final occupancy=106.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 124, "start": 59, "prod": 73, "cons": 18, "dropped": 8, "consumed": 18, "final": 106}, "prompt_sha1": "89abaa3001c57d6fa5bbc2adcf07a47b9340c950", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 200 Mbit/s and RTT 150 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 200×10^6 × 150/1000 = 3e+07 bits = 3.75e+06 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 200, "rtt_ms": 150, "bits": 30000000.0, "bytes": 3750000.0}, "prompt_sha1": "2a609c5c56b6c6ec518dacc1d440e72ab02f7764", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m45` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 45 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m45 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd45;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m45", "width": 6, "max": 45}, "prompt_sha1": "e6a015a27248fd779e6488867636f7624ba17589", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `counter = counter + 6` on one shared integer without synchronization. Assume `counter` initially equals 128. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 128; T2 reads 128; both compute 134; T1 writes 134; T2 writes 134. The observed final value is 134, but two serial increments would produce 140.\n\n```\nlock(mutex)\ncounter = counter + 6\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "45d89c73994855e1f27a1f7900c7b4f904469625", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=2.2 kOhm, and Vin=0.5 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/47 = -0.046809.\nVout = A_v×Vin = -0.046809×0.5 = -0.023404 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 2.2, "vin": 0.5, "gain": -0.04680851063829788, "vout": -0.02340425531914894}, "prompt_sha1": "81d7210882f2bc37b061f82ac1775d2c10ee1590", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 42277 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 42277/100000 s; frequency = 100000/42277 = 2.365352 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 42277, "hz": 2.365352319227949}, "prompt_sha1": "e5e4acaf5b8eea49ef9b0d5188c40c12d8834560", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 33-bit up/down counter `updown_33_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_33_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [32:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_33_wrap", "width": 33, "wrap": true}, "prompt_sha1": "3d13c08f3512996becb6fd90d820bea4dc86dbb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.136.69.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.136.69.0\nBroadcast address: 10.136.69.15\nUsable host range: 10.136.69.1 to 10.136.69.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.136.69.0/28", "usable": 14, "first": "10.136.69.1", "last": "10.136.69.14", "broadcast": "10.136.69.15"}, "prompt_sha1": "fb3e8ea85f71a2e1bd62e3f966cba966adc87e41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.47 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 0.47×10^-3/4.7 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00047, "r": 4.7, "tau": 9.999999999999999e-05}, "prompt_sha1": "a445ccd4d00a4e62ef1950e63924d7df14be5e27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.49. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.49) + 0.49/32) = 1.903629.\nThe theoretical speedup is about 1.904×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.49, "n": 32, "result": 1.9036287923854849}, "prompt_sha1": "59ae52a663a67864a1cb4891ca374ea337076583", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x52FE926A, toggle bit 31 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 31)`. Result = 0xD2FE926A.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 1392415338, "bit": 31, "op": "toggle", "result": 3539898986}, "prompt_sha1": "01d3c72c3644b372481ce4299dc5189ef14bb3a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 0.5 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×0.5/(2×10^9) = 0.0005 s = 0.500000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 0.5, "ghz": 2.0, "sec": 0.0005}, "prompt_sha1": "0a142feee5765e4df61acbf50a7dbeb806871159", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 28 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 28-17 = 11.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 28, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 11}, "prompt_sha1": "f857330ead387b86f5fa4219d1cc3ffeb7ee7e66", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 30-bit virtual address space with 1048576 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^30/2^20 = 2^10 = 1024 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 30, "page_exp": 20, "entries": 1024}, "prompt_sha1": "076f09ab7a136f0610b1c6e4eab2e4c256ade344", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w36_unsigned` comparing two 36-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w36_unsigned (\n input logic [35:0] a,\n input logic [35:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w36_unsigned", "width": 36, "signed": false}, "prompt_sha1": "77282b62fd6c4f90544387a53be5a552d79df8b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 8953116, carries 17634 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 17634+0+1 = 17635. ACK = (8953116+17635) mod 2^32 = 8970751.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 8953116, "payload": 17634, "syn": 0, "fin": 1, "ack": 8970751}, "prompt_sha1": "520dded48ec01660e05baacc3c94f549014b672c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 56 bits wide and the system uses 128 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 131072 bytes = 2^17 bytes.\nOffset bits = 17.\nVPN bits = 56-17 = 39.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 56, "page_bytes": 131072, "offset_bits": 17, "vpn_bits": 39}, "prompt_sha1": "414cb07a10a70465561e0680c3f94f24b35ddbfb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 22000 ohm and 27000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (22000×27000)/(22000+27000) = 12122.448980 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 22000, "r2": 27000, "req": 12122.448979591836}, "prompt_sha1": "0faa2dcc7c2697a6f91c443be4fb5e440cd5a964", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=47 nF and is stepped to 1.8 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1.8(1-e^-0.5)=0.708245 V; τ=2.209e-05 s and t=1.1045e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 4.7000000000000004e-08, "multiple": 0.5, "vin": 1.8, "vc": 0.7082448125172599}, "prompt_sha1": "cb1825c8dd9203dc29c1da2c8da451c17e306b13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock DESC then IO; task_B acquires IO then DESC. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds DESC while waiting for IO, while task_B holds IO while waiting for DESC; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire DESC before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "520272ac3f14d3cea2bf400dbe8df90501ba67fc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 26 and initial occupancy is 4. In an abstract batch, producer attempts to enqueue 28 items first, dropping any excess beyond capacity; then consumer removes up to 8 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=26, dropped=6; consumed=8; final occupancy=18.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 26, "start": 4, "prod": 28, "cons": 8, "dropped": 6, "consumed": 8, "final": 18}, "prompt_sha1": "5800e5b575c8cebe68a18815759b81f124c586e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 120 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 1565 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×1565/(120×10^6) = 0.0652083333 = 6.520833%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 120, "irq_hz": 5000, "cycles": 1565, "load": 0.06520833333333333}, "prompt_sha1": "0113b417315f3a81637eddda53faf6b74da55d2e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TTNTTNTTTNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0], "final_state": 2}, "prompt_sha1": "1179628c8ebcb951b1ca0cf6ad887c1fb8445112", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/1 = 0.00022 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 1, "tau": 0.00022}, "prompt_sha1": "dc768d3e77a1c00a6c249d09f14cc9bcd3e0e646", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_2119` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_2119 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_2119"}, "prompt_sha1": "4cdfbb9b38aa387472eefb88aa7a11fd464c9e65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 70%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.030×(20+0.300×50) = 1.850000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.97, "l2": 20, "l2_hit": 0.7, "mem": 50, "amat": 1.850000000000001}, "prompt_sha1": "714961d26c05a2490225b19e96a383902fdf677b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 850 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "e42976096050fef2d079db238dc58e9c5d546e7e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 216 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 216000000/5000 = 43200.\nWith prescaler divisor limited to at most 16, the largest divisor of 43200 that also keeps the period count within 16 bits is 16.\nPeriod count = 43200/16 = 2700.\nPSC register = 16-1 = 15.\nARR register = 2700-1 = 2699.\nVerification: 216000000/(16×2700) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 216000000, "target_hz": 5000, "total_division": 43200, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 2700, "psc_reg": 15, "arr_reg": 2699}, "prompt_sha1": "5354d261765be12ded87846544090da5a06f0772", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 7-bit data word is 1110011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 5 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "1110011", "ones": 5, "parity": 1}, "prompt_sha1": "ac3e45208cdd630f70b9afacefe49f5762cb0151", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=82000 ohm and C=1200 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=82000×1200×10^-12 s = 9.84e-05 s.\nf_c=1/(2πRC)=1/(2π×82000×1200×10^-12) = 1617.4283 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 82000, "c_f": 1.2e-09, "tau": 9.839999999999999e-05, "fc": 1617.428283454221}, "prompt_sha1": "2781ba593f5ec6128e5d06defc2b3083d957554e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_1163` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_1163 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_1163", "width": 16}, "prompt_sha1": "404207bd02f3751bb98e49c0db88b04f345e4614", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4622` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4622 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4622"}, "prompt_sha1": "34bc30cd60ad0e9d5ab5ede37c96367638d4758d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x42C6722D187AC634 in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 42 C6 72 2D 18 7A C6 34.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 4811658789901747764, "endian": "big", "bytes": [66, 198, 114, 45, 24, 122, 198, 52]}, "prompt_sha1": "62368bb1b25f92ce80db4f65d9e3d3fbef471989", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 32 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 32000000/(4×500000) = 16.000000.\nNearest integer divisor D = 16.\nActual baud = 32000000/(4×16) = 500000.000 baud.\nError = (500000.000-500000)/500000×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 32000000, "oversample": 4, "baud": 500000, "divisor": 16, "actual": 500000.0, "error_pct": 0.0}, "prompt_sha1": "6580f6ebd3d624a8ddab9419941398d9340664eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 2048 bytes over a datapath transferring 2 bytes per beat at 200 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×200×10^6 = 400000000 B/s. Time = 2048/400000000 = 5.12e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 2048, "width": 2, "rate_mhz": 200, "sec": 5.12e-06}, "prompt_sha1": "b5f9a18f7d0e5467101fec39c1487129a9fcb020", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['V', 'P', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 3 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["V", "P", "P", "P", "V"], "value": 3, "blocked": 0}, "prompt_sha1": "c2c1ecc76cc309dcd49891178ce932490ae39f5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x466F8D82 in 4 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 46 6F 8D 82.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 4, "value": 1181715842, "endian": "big", "bytes": [70, 111, 141, 130]}, "prompt_sha1": "77377ef51f45d89f1c2582a31bdc9917ea91f749", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 32 MHz. Sampling consumes 7.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+12 = 19.5. Period = 19.5/32000000 = 6.09375e-07 s. Maximum rate = 1/period = 1641025.641026 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 32000000.0, "sample_cycles": 7.5, "conv_cycles": 12, "period": 6.09375e-07, "rate": 1641025.641025641}, "prompt_sha1": "f6cf0e6f55cc6dfd017bc37f31414aef62bc4be6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 47 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-05×1²=2.35e-05 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-05, "v": 1, "energy": 2.35e-05}, "prompt_sha1": "6abc7ced86de808b7abcce1c1c03c73e8d1fe41f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_5421` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_5421 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_5421", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "37fe0b6a7a3dbf236ca9985a7fb06f5b18876a49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3336 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3336/(3336+20+8) = 0.991677 = 99.17%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3336, "iphdr": 20, "eff": 0.9916765755053508}, "prompt_sha1": "a9541454080f3a13e6f607ce732f6f408f3c5aae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 20; x = x + 604;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 20+604 = 624. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (624) mod 2^8 = 112. So `x` stores 112. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 20, "add": 604, "result": 112}, "prompt_sha1": "23d443beb67c431f3764b9fb2d3039d4d4480b5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 979-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 979×8 = 7832 bits.\nSerialization delay = bits/rate = 7832/(1000×10^6) s = 7.832e-06 s = 7.832000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 979, "rate_mbps": 1000, "delay_s": 7.832e-06}, "prompt_sha1": "020ff3f60c650b6692eca429bf75bd7acff5c137", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xB6. Extract the 5-bit field starting at bit 0 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0xB6 >> 0) & 0x1F = 0x16 (22).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 5, "lsb": 0, "value": 182, "mask": 31, "field": 22}, "prompt_sha1": "1ca88f2f82c68f7e25ab13b44313bbd2f8420f0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 512 payload bytes plus 96 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 512/(512+96) = 0.842105 = 84.21%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 512, "overhead": 96, "efficiency": 0.8421052631578947}, "prompt_sha1": "c6dc6fa640e2091a70e804c3c0fc6711fc45fa36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 10%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.100 × 5 = 0.050000.\nEffective CPI = 1.1 + 0.050000 = 1.150000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.1, "penalty": 5, "result": 1.1500000000000001}, "prompt_sha1": "b6c7313ad1e6d7e3d9606fba8af28d3f0338f31c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_28` for a synchronous sampled input `noisy`. Update output `clean` only after observing 28 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_28 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 27) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_28", "stable_samples": 28}, "prompt_sha1": "4411ab8ef2486952750bf08eaee73b9bcbe6bed7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 44 bits wide and the system uses 8 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 8192 bytes = 2^13 bytes.\nOffset bits = 13.\nVPN bits = 44-13 = 31.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 44, "page_bytes": 8192, "offset_bits": 13, "vpn_bits": 31}, "prompt_sha1": "e87969ca898e206b555e2a3b5586ed056e93b842", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_28` for a 28-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_28 (\n input logic [27:0] data,\n input logic [4:0] shamt,\n output logic [27:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_28", "width": 28, "direction": "left", "arithmetic": false}, "prompt_sha1": "ae687986358746c5bdd691de4e5ddc1f991fae63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 36 MHz and must generate an exact 800 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 36000000/800 = 45000.\nWith prescaler divisor limited to at most 128, the largest divisor of 45000 that also keeps the period count within 16 bits is 125.\nPeriod count = 45000/125 = 360.\nPSC register = 125-1 = 124.\nARR register = 360-1 = 359.\nVerification: 36000000/(125×360) = 800 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 36000000, "target_hz": 800, "total_division": 45000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 360, "psc_reg": 124, "arr_reg": 359}, "prompt_sha1": "5a8560fc63f0adc9fc2552815e3fe24fcb888495", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 69 and initial occupancy is 1. In an abstract batch, producer attempts to enqueue 105 items first, dropping any excess beyond capacity; then consumer removes up to 4 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=69, dropped=37; consumed=4; final occupancy=65.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 69, "start": 1, "prod": 105, "cons": 4, "dropped": 37, "consumed": 4, "final": 65}, "prompt_sha1": "fe9ab300464a9eb3d8c7a65aabd4f7d41bbceb95", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(1×10^6) s = 32.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 32, "time_us": 32.0}, "prompt_sha1": "b8613234893cb7270dbbde2cd5d80216cb257adf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_20_57_12` with RED, GREEN, YELLOW states. Hold RED for 20 clock cycles, GREEN for 57, and YELLOW for 12; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_20_57_12 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 19) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 56) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 11) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_20_57_12", "red": 20, "green": 57, "yellow": 12}, "prompt_sha1": "d61f86dddb434f78df263b1c3458d2d6222547d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_819849` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_819849 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_819849"}, "prompt_sha1": "3a28fb599a806f8f04a5a785e447788af92d962a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 76 and initial occupancy is 9. In an abstract batch, producer attempts to enqueue 132 items first, dropping any excess beyond capacity; then consumer removes up to 105 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=76, dropped=65; consumed=76; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 76, "start": 9, "prod": 132, "cons": 105, "dropped": 65, "consumed": 76, "final": 0}, "prompt_sha1": "671402cec4bbb2a9bcb80d836b937e7305f1c87a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×1024 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 1024, "reach": 33554432}, "prompt_sha1": "45769020119ca6e2a04d9b07ce619d0511aa6700", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 457 elements. Review loop `for i in range(457-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(457-1)` produces indices 0 through 455, so index 456 is skipped. Correct loop: `for i in range(457):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 457, "variant": "miss_last"}, "prompt_sha1": "ba62d029ec98dc1003bbfbbd029285fb96e6ff44", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 1534-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 1534×8 = 12272 bits.\nSerialization delay = bits/rate = 12272/(10×10^6) s = 0.0012272 s = 1227.200000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 1534, "rate_mbps": 10, "delay_s": 0.0012272}, "prompt_sha1": "d9191ef5e3ef5107b118ae11376d568504255ccd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock IO then TX; task_B acquires TX then IO. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds IO while waiting for TX, while task_B holds TX while waiting for IO; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before TX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "57644188d31ebef891baf6c1231ab864045416f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 16-byte lines and 32-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/16 = 2048.\nOffset bits = log2(16) = 4.\nIndex bits = log2(2048) = 11.\nTag bits = 32-11-4 = 17.\nCheck: 17+11+4 = 32 = 32 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 16, "addr_bits": 32, "lines": 2048, "offset_bits": 4, "index_bits": 11, "tag_bits": 17}, "prompt_sha1": "e1b77298c836861ef24ee92ebec0147ba2b1f159", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=10 nF and is stepped to 3.3 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=3.3(1-e^-5)=3.277765 V; τ=4.7e-06 s and t=2.35e-05 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 1e-08, "multiple": 5, "vin": 3.3, "vc": 3.2777647749030177}, "prompt_sha1": "ccc9d2c96b7401ea4fa8c923ef05c902ff09a8d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/47000=5.31914894e-05 A. P=V²/R=2.5²/47000=0.000132978723 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 47000, "i": 5.319148936170213e-05, "p": 0.00013297872340425532}, "prompt_sha1": "79fe18f3e303aebe32c98205c4913e7319a02bec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4402 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4402/(4402+20+8) = 0.993679 = 99.37%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4402, "iphdr": 20, "eff": 0.9936794582392776}, "prompt_sha1": "757491721732dac29407b3199c0f3b9349ddd89d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1 on a 3.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1/(3.2×10^9) = 0.000625 s = 0.625000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.0, "ghz": 3.2, "sec": 0.000625}, "prompt_sha1": "26e3909f9c97260860baebca32450581d69241d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 1 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×1²=0.00235 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 1, "energy": 0.00235}, "prompt_sha1": "edd7986c37367233275697729b57d9981cfe6fcb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1 ns hit time, 88.3% hit rate, and a 15 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.883 = 0.117.\nAMAT = hit time + miss rate × miss penalty\n= 1 ns + 0.117×15 ns = 2.7550 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.0, "hit_rate": 0.883, "penalty": 15, "result": 2.755}, "prompt_sha1": "100b23a6e61cb68126d791dbb9faac42b86f2b1f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_23_msb` for `23-bit in`. The highest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_23_msb (\n input logic [22:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 23; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_23_msb", "width": 23, "priority": "high"}, "prompt_sha1": "99d0685d6c90793b2d7f0c50b53243257295b0b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×300/1000/8 = 187500000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 300, "bytes": 187500000.0}, "prompt_sha1": "4555a2b4584c14c96ad3abef54700cf97cd4dc60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 2 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×160×10^6 = 320000000 B/s. Time = 4096/320000000 = 1.28e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 2, "rate_mhz": 160, "sec": 1.28e-05}, "prompt_sha1": "3501089e431b25590517bad74975f5a969d8d0f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 512 payload bytes plus 8 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 512/(512+8) = 0.984615 = 98.46%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 512, "overhead": 8, "efficiency": 0.9846153846153847}, "prompt_sha1": "92e7e526f5bbcad2ebf850494628ac8d9613cc2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 0.5 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×0.5/(1.5×10^9) = 0.00333333333 s = 3.333333 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 0.5, "ghz": 1.5, "sec": 0.0033333333333333335}, "prompt_sha1": "7543a212d8b7313a392999eeefb35bb42a0f30b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w35_signed` comparing two 35-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w35_signed (\n input logic signed [34:0] a,\n input logic signed [34:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w35_signed", "width": 35, "signed": true}, "prompt_sha1": "14a2a8b4888b8fff0abc372bfa6e4b045f34d468", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w5_m14` with clk, asynchronous active-low rst_n, active-high enable, and output logic [4:0] count. On reset count=0. When enabled it increments until 14 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w5_m14 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [4:0] count\n);\n localparam logic [4:0] LIMIT = 5'd14;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w5_m14", "width": 5, "max": 14}, "prompt_sha1": "60fa795d347d67de9c627a939d1fb637eb39b548", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1280 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 1280 = 640. Verification: 640/1280 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1280, "duty": 50, "high": 640}, "prompt_sha1": "8d25c87c923e8cc0a0db5f39eafe8402c57cd039", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 22494 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 22494/1000 s; frequency = 1000/22494 = 0.044456 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 22494, "hz": 0.044456299457633144}, "prompt_sha1": "55af7094564871e7c55bd520d17567c16a91379a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_12_1762` implementing a 2-to-1 multiplexer for two 12-bit inputs `a` and `b`, select `sel`, and 12-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_12_1762 (\n input logic [11:0] a,\n input logic [11:0] b,\n input logic sel,\n output logic [11:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_12_1762"}, "prompt_sha1": "daf365ff1ff1f3bc5300f9e2e8e3d180b9eefbd6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_121_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 121 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_121_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd121;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_121_ignore", "cycles": 121, "retrigger": false}, "prompt_sha1": "31f0b0c806711b3f7f3d4cfa498088dfd9753762", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 00010101010001110101010100010111. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 15 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00010101010001110101010100010111", "ones": 15, "parity": 1}, "prompt_sha1": "ddac720e50877092d6ace1b3bbe16d02a1f3d69a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 16-bit up/down counter `updown_16_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_16_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [15:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_16_wrap", "width": 16, "wrap": true}, "prompt_sha1": "6869ec7dff2006e01c5ac591903587017f552ab0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 19.5 cycles and conversion consumes 12 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 19.5+12 = 31.5. Period = 31.5/20000000 = 1.575e-06 s. Maximum rate = 1/period = 634920.634921 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 19.5, "conv_cycles": 12, "period": 1.575e-06, "rate": 634920.6349206349}, "prompt_sha1": "b19145c43bd81ee4e599ed4e8f3f443808abe66b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 32 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×32 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 32, "reach": 33554432}, "prompt_sha1": "5945423ab837b4a6e7326e1e7b938336b9a412bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [24, 19, 3, 24]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [59, 62, 19, 70].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [24, 19, 3, 24], "finish": [59, 62, 19, 70]}, "prompt_sha1": "1b528ef08303cf7214d4379c15d6f8ce56e766e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 4800 MT/s across 3 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×4800×10^6×3 = 172.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 4800, "channels": 3, "gbps": 172.8}, "prompt_sha1": "ed0d211c989752a858595c2ed9721be72d3a3b27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 26 and initial occupancy is 0. In an abstract batch, producer attempts to enqueue 116 items first, dropping any excess beyond capacity; then consumer removes up to 183 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=26, dropped=90; consumed=26; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 26, "start": 0, "prod": 116, "cons": 183, "dropped": 90, "consumed": 26, "final": 0}, "prompt_sha1": "d10716d68a796abc014153ccba5eeb2af713afa4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NTTNTTTNNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on T; 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "60f0c3713cd4bf50544cd43b97d3fc47d3abb006", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 47-bit right-shift register module `shiftreg_right_47`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `47-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_47 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [46:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[46:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_47", "width": 47, "direction": "right"}, "prompt_sha1": "714e7f69f28f14e2d04c39c323236d20bc113bd7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 2 million instructions at average CPI 1.5 on a 1.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 2×10^6×1.5/(1.5×10^9) = 0.002 s = 2.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 2, "cpi": 1.5, "ghz": 1.5, "sec": 0.002}, "prompt_sha1": "ddfb23597d6218c9272e4a91d34a3718ab43e474", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 320 payload bytes plus 52 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 320/(320+52) = 0.860215 = 86.02%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 320, "overhead": 52, "efficiency": 0.8602150537634409}, "prompt_sha1": "4b12f5634344f1dbb729f3f0d62691fdadf58823", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 17 and tail index 25, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (17-25) mod 32 = 24. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 17, "tail": 25, "occupancy": 24}, "prompt_sha1": "b93c50b4af3ed9dcd5825f3a62b7a0bbbe1564a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 3. Apply outcome sequence TTTTTTNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 3, "outcomes": [1, 1, 1, 1, 1, 1, 0, 1, 0], "final_state": 2}, "prompt_sha1": "73c8b47f77370cc428c54e119c346df843cb6a7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d4_w16_3312` implementing a dual-clock asynchronous FIFO with depth 4 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 2-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d4_w16_3312 #(\n parameter int DEPTH = 4,\n parameter int WIDTH = 16,\n parameter int PTR_W = 2\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d4_w16_3312", "depth": 4, "width": 16, "ptr_w": 2}, "prompt_sha1": "1d7b095a5eb6dc3612bd3859928fd07ddb5677e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1136(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1136(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1136([1, 2]) == 1.5\nassert mean_1136([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1136"}, "prompt_sha1": "528e69c73ced18ee0d1ba386b5aaf0ace7c34a37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 8000 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 8000/(8000+64) = 0.992063 = 99.21%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 8000, "overhead": 64, "efficiency": 0.9920634920634921}, "prompt_sha1": "4a0a38acefc0878ccf9c64cdbc57e4cbc931a9fe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 8192 bytes over a datapath transferring 16 bytes per beat at 10 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 16×10×10^6 = 160000000 B/s. Time = 8192/160000000 = 5.12e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 8192, "width": 16, "rate_mhz": 10, "sec": 5.12e-05}, "prompt_sha1": "cb4b16754c84e26e18511bba0f9fa5f3f4d648f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x48_write_bypass` with 8 entries of 48 bits. Inputs: `clk`, `we`, `3-bit waddr`, `48-bit wdata`, `3-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [47:0] wdata,\n input logic [2:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x48_write_bypass", "entries": 8, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "6ce30d9fb52f3f0cc4a7a16a027f5be50d7df539", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 1 MHz. Sampling consumes 1.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 1.5+10 = 11.5. Period = 11.5/1000000 = 1.15e-05 s. Maximum rate = 1/period = 86956.521739 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 1000000.0, "sample_cycles": 1.5, "conv_cycles": 10, "period": 1.15e-05, "rate": 86956.52173913043}, "prompt_sha1": "0e2bca9413bd13a255e2daa97313de05700692c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 7 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 27 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+0+2 = 10. Total bits = 27×10 = 270. Time = 270/2400 = 0.1125 s = 112.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 7, "parity": 0, "stop": 2, "frames": 27, "seconds": 0.1125}, "prompt_sha1": "ce78141cf1de9c6f62591c825afc421208593786", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 1200 baud with 1 start bit, 5 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 16 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+1 = 8. Total bits = 16×8 = 128. Time = 128/1200 = 0.106666667 s = 106.666667 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 1200, "data": 5, "parity": 1, "stop": 1, "frames": 16, "seconds": 0.10666666666666667}, "prompt_sha1": "367736d1df9b261bfc35aa00b123bc8a4f7226dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 36 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 36×13 = 468. Time = 468/4800 = 0.0975 s = 97.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 9, "parity": 1, "stop": 2, "frames": 36, "seconds": 0.0975}, "prompt_sha1": "2640d711443b7b783af2738d226f4daa799edced", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 8%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.080 × 12 = 0.192000.\nEffective CPI = 1.2 + 0.192000 = 1.392000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.08, "penalty": 12, "result": 1.392}, "prompt_sha1": "9b7cd7ad9163c55b288802b0d5f7670fe2b6cc9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10×10^6 × 10/1000 = 100000 bits = 12500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10, "rtt_ms": 10, "bits": 100000.0, "bytes": 12500.0}, "prompt_sha1": "2c8e91e625413463ef6dba492a6212a467f97b19", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=22 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×47/(22+47) = 2.247826 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 22, "r2": 47, "vout": 2.247826086956522}, "prompt_sha1": "ebcd58dd572c701361c628e1a6f42bfafcfcd22a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=220 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 220×10^-3/47 = 0.00468085106 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.22, "r": 47, "tau": 0.004680851063829788}, "prompt_sha1": "bb5c3e3367557e58aebc67539a8f3e7b5da07db6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2103 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "b73d68cbf61b9ded1ae6d794c954ce090c2469c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 640 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 640/(640+20) = 0.969697 = 96.97%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 640, "overhead": 20, "efficiency": 0.9696969696969697}, "prompt_sha1": "e87715c10d429e2dcb3e550bbb08c350dec40cfc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 4 MHz. Sampling consumes 2.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 2.5+10 = 12.5. Period = 12.5/4000000 = 3.125e-06 s. Maximum rate = 1/period = 320000.000000 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 4000000.0, "sample_cycles": 2.5, "conv_cycles": 10, "period": 3.125e-06, "rate": 320000.0}, "prompt_sha1": "7227027081c40272768128ea72d9ec5028cbec86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 360 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 360/(360+40+8) = 0.882353 = 88.24%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 360, "iphdr": 40, "eff": 0.8823529411764706}, "prompt_sha1": "28855550eaa92c8592fac658d5abb2aa608c304a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 7 and initial occupancy is 4. In an abstract batch, producer attempts to enqueue 59 items first, dropping any excess beyond capacity; then consumer removes up to 177 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=7, dropped=56; consumed=7; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 7, "start": 4, "prod": 59, "cons": 177, "dropped": 56, "consumed": 7, "final": 0}, "prompt_sha1": "8ab35814375b5d4381e3788c05f90c574e17bff5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w59_unsigned` comparing two 59-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w59_unsigned (\n input logic [58:0] a,\n input logic [58:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w59_unsigned", "width": 59, "signed": false}, "prompt_sha1": "163923930b9e922fce7504c665cedf2b410b267f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=40 ms, C=5 ms,T=100 ms, C=2 ms,T=50 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/40 + 5/100 + 2/50 = 0.115000 = 11.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 40], [5, 100], [2, 50]], "utilization": 0.115}, "prompt_sha1": "7761a8f66a4663bd8d869750fcac1fcf4b36706d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 57 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 57 = 59.\nClock pulses = 59×9 = 531.\nTime = 531/400000 s = 1327.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 57, "clocks": 531, "time_s": 0.0013275}, "prompt_sha1": "505f89dcf6dda29105b3f728b0a7e076d03452bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2840 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "5ef54de84e0ec9e08c431e82bdae3ed76ebb7de5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xCC83E786. Extract the 3-bit field starting at bit 14 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0xCC83E786 >> 14) & 0x7 = 0x7 (7).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 3, "lsb": 14, "value": 3431196550, "mask": 7, "field": 7}, "prompt_sha1": "27f8533d5b60d4e77cf0fc953e3f43104404ae31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x48_write_bypass` with 4 entries of 48 bits. Inputs: `clk`, `we`, `2-bit waddr`, `48-bit wdata`, `2-bit raddr`; output `48-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x48_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [47:0] wdata,\n input logic [1:0] raddr,\n output logic [47:0] rdata\n);\n logic [47:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x48_write_bypass", "entries": 4, "width": 48, "mode": "write_bypass"}, "prompt_sha1": "0c32c551fdbfb501033d0335f7873cb1e1315b8c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2200 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0022×100²=11 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0021999999999999997, "v": 100, "energy": 10.999999999999998}, "prompt_sha1": "d988b4e488930e4ace9e72fa5ab2f1c4bec9fcbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10001010011 using generator polynomial bits 11111. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1000.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 31, "msg_bits": 11, "msg": 1107, "remainder": 8}, "prompt_sha1": "d70f4625c854c9821eea0ecd1214e80b00753fe1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x32_write_bypass` with 4 entries of 32 bits. Inputs: `clk`, `we`, `2-bit waddr`, `32-bit wdata`, `2-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_4x32_write_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [31:0] wdata,\n input logic [1:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x32_write_bypass", "entries": 4, "width": 32, "mode": "write_bypass"}, "prompt_sha1": "9051306bb5fd668cf852dc8d5098ce47d685b5f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_24_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 24 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_24_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 5'd24;\n end else begin\n if (pulse_in)\n count <= 5'd24;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_24_retrig", "cycles": 24, "retrigger": true}, "prompt_sha1": "47815e66ae6b1c8d83e645269187c0db337ce754", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 52 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 52-18 = 34.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 52, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 34}, "prompt_sha1": "fdbdb61f3c3dd22affab8c1eef3822ca142144ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 8%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.080 × 5 = 0.100000.\nEffective CPI = 1.2 + 0.100000 = 1.300000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.08, "penalty": 5, "result": 1.3}, "prompt_sha1": "8cf66db63a3ab7f8e879aa8257a17e3946bfedff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 2.2 µF is charged to 2.5 V. Compute stored energy using E=½CV².", "output": "E=0.5×2.2e-06×2.5²=6.875e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 2.2e-06, "v": 2.5, "energy": 6.874999999999999e-06}, "prompt_sha1": "d8da9e8929b6f26c32457bd7019bd768b932f4f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11111010011001011 using generator polynomial bits 1111. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 15, "msg_bits": 17, "msg": 128203, "remainder": 1}, "prompt_sha1": "125de0e1099491bf6a67c0118ac430d69126fc27", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=4.7 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/47 = -0.100000.\nVout = A_v×Vin = -0.100000×0.1 = -0.010000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 4.7, "vin": 0.1, "gain": -0.1, "vout": -0.010000000000000002}, "prompt_sha1": "46d60d011de209faed630f3a63960c3b65d74c55", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 48 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 48-15 = 33.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 48, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 33}, "prompt_sha1": "fe59a78d9deb24232ee4191e1a0d4b8547eba3e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 600 counts per period. What compare/high-time count produces exactly 75% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.75 × 600 = 450. Verification: 450/600 = 0.75, which is 75%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 600, "duty": 75, "high": 450}, "prompt_sha1": "97f27490e359623ea7a648f28f81a7fee4e0d75d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w20_unsigned` comparing two 20-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w20_unsigned (\n input logic [19:0] a,\n input logic [19:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w20_unsigned", "width": 20, "signed": false}, "prompt_sha1": "4eaef7d6829cd03cd1fa06ebb240d9940d70d812", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 26 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 26 = 28.\nClock pulses = 28×9 = 252.\nTime = 252/100000 s = 2520.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 26, "clocks": 252, "time_s": 0.00252}, "prompt_sha1": "c18b254ac9e0367f6759e874fc49845ff489e213", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w8_m219` with clk, asynchronous active-low rst_n, active-high enable, and output logic [7:0] count. On reset count=0. When enabled it increments until 219 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w8_m219 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [7:0] count\n);\n localparam logic [7:0] LIMIT = 8'd219;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w8_m219", "width": 8, "max": 219}, "prompt_sha1": "1c5b59ff9d596974d40d30d40cffb2bbc15b0e70", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 200 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 200 MHz / 32 = 6.250000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 200000000.0, "divider": 32, "spi_hz": 6250000.0}, "prompt_sha1": "c4655f08e1d28aee4a996e318ef6bbd56d2035e4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w12_m3142` with clk, asynchronous active-low rst_n, active-high enable, and output logic [11:0] count. On reset count=0. When enabled it increments until 3142 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w12_m3142 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [11:0] count\n);\n localparam logic [11:0] LIMIT = 12'd3142;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w12_m3142", "width": 12, "max": 3142}, "prompt_sha1": "747ed113edf6c34ab1997fca33de90fd10313252", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w9_m262` with clk, asynchronous active-low rst_n, active-high enable, and output logic [8:0] count. On reset count=0. When enabled it increments until 262 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w9_m262 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [8:0] count\n);\n localparam logic [8:0] LIMIT = 9'd262;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w9_m262", "width": 9, "max": 262}, "prompt_sha1": "c94abc210d1de53f1c7e6602814c3ed88c579a8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 46 and initial occupancy is 5. In an abstract batch, producer attempts to enqueue 169 items first, dropping any excess beyond capacity; then consumer removes up to 130 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=46, dropped=128; consumed=46; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 46, "start": 5, "prod": 169, "cons": 130, "dropped": 128, "consumed": 46, "final": 0}, "prompt_sha1": "57b0748c8fb22ddd63e52f8619627085026ae2bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w8_cin` implementing a 8-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `8-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w8_cin (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic cin,\n output logic [7:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w8_cin", "width": 8, "cin": true}, "prompt_sha1": "10770e479eea32e457b6ab0ceb84d1db09bbf654", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock A then DESC; worker_2 acquires DESC then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds A while waiting for DESC, while worker_2 holds DESC while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "d6b216af7f507e80719321eb92f2ccc341975104", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 40 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 40/1000 = 8e+08 bits = 1e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 40, "bits": 800000000.0, "bytes": 100000000.0}, "prompt_sha1": "4ae89da42b5cac64701f9eb3ee4f3fabd8f44372", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 31-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^31/2^13 = 2^18 = 262144 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 31, "page_exp": 13, "entries": 262144}, "prompt_sha1": "2eb05a0ec3ba8cf36378c86e0e0b082300c31c39", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 5 and all processes arrive at time 0 with CPU bursts [8, 9, 17, 15, 19]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [28, 32, 64, 57, 68].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 5, "bursts": [8, 9, 17, 15, 19], "finish": [28, 32, 64, 57, 68]}, "prompt_sha1": "668ea8f59aa8df5d6149e3922d5ad5de0d2ab8a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_17` for a 17-bit signed input `data`, `5-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_17 (\n input logic signed [16:0] data,\n input logic [4:0] shamt,\n output logic signed [16:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_17", "width": 17, "direction": "right", "arithmetic": true}, "prompt_sha1": "05175991a39b189b6d621a5a454ff7bfd467e329", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 28 and tail index 27, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (28-27) mod 32 = 1. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 28, "tail": 27, "occupancy": 1}, "prompt_sha1": "404153f98c1d52b9e5143ff044c8d8f2a016f931", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=4.7 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/4.7 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 4.7, "tau": 0.001}, "prompt_sha1": "2293a48dbba73e885560dd77a2a061ea0d7c9112", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 6 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 500000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 6000000/(8×500000) = 1.500000.\nNearest integer divisor D = 2.\nActual baud = 6000000/(8×2) = 375000.000 baud.\nError = (375000.000-500000)/500000×100% = -25.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 6000000, "oversample": 8, "baud": 500000, "divisor": 2, "actual": 375000.0, "error_pct": -25.0}, "prompt_sha1": "cbce2e2d70299b04aecbde531d75e4d6a413901a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock STATE then C; consumer acquires C then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds STATE while waiting for C, while consumer holds C while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire C before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "f1d7dbe3f3cec9464a2b3a10a9bc6f72337028f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 3.7 V source drives a 1200 ohm resistor in series with an LED whose forward voltage is assumed to be 2.5 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 3.7-2.5 = 1.2 V.\nI = V/R = 1.2/1200 A = 1.0000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 3.7, "vf": 2.5, "r": 1200, "current_a": 0.0010000000000000002}, "prompt_sha1": "46ad258f0457986c6ee7a99bbf81dba46b8ac5f4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock RX then IO; T2 acquires IO then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds RX while waiting for IO, while T2 holds IO while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire IO before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "2a127e4f0c3ee6dcb14c0dd61be9f36ddcb15217", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=47 kOhm, Rf=10 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -10/47 = -0.212766.\nVout = A_v×Vin = -0.212766×0.2 = -0.042553 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 47, "rf": 10, "vin": 0.2, "gain": -0.2127659574468085, "vout": -0.04255319148936171}, "prompt_sha1": "bc7f77299272a17be23155410f2518861ee3f53f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 5343 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 5343/(5343+40+8) = 0.991096 = 99.11%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 5343, "iphdr": 40, "eff": 0.9910962715637173}, "prompt_sha1": "e1280a99b0f12e7f1f918e944ba3d7a657f99707", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 160 counts per period. What compare/high-time count produces exactly 50% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.5 × 160 = 80. Verification: 80/160 = 0.5, which is 50%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 160, "duty": 50, "high": 80}, "prompt_sha1": "09bbb2ac3671321c6888bb2bd87d004b197f7fe9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2717-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2717×8 = 21736 bits.\nSerialization delay = bits/rate = 21736/(5000×10^6) s = 4.3472e-06 s = 4.347200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2717, "rate_mbps": 5000, "delay_s": 4.3472e-06}, "prompt_sha1": "ecb99bec4cc618b05aabcde7df1ac7655c8cad8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 4000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 4000-32 = 3968 bytes.\nRound down to an 8-byte multiple: floor((3968)/8)×8 = 3968 bytes.\nFragments required = ceil(6000/3968) = 2.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 4000, "header": 32, "payload": 6000, "max_payload": 3968, "fragments": 2}, "prompt_sha1": "50ace8ac9f864f56eef0e815e025f010b41ce385", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 50 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 50×10^6 / (256×8) = 24414.062500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 50, "frame_bytes": 256, "pps": 24414.0625}, "prompt_sha1": "527c135694db136ea86ff00a142c86eda3eb2e73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 1. Apply operations ['V', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'V', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 1, "ops": ["V", "P", "P", "V", "V", "V", "P", "V", "P", "V", "V", "P", "V", "V", "V", "V", "V", "P", "V", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "bbd95e0cd21afffffe651c48252d849c9535bda5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 6000 bytes of IP payload and a 32-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-32 = 1248 bytes.\nRound down to an 8-byte multiple: floor((1248)/8)×8 = 1248 bytes.\nFragments required = ceil(6000/1248) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 32, "payload": 6000, "max_payload": 1248, "fragments": 5}, "prompt_sha1": "da2398477d07e4cc91d2dfa15e746fbedde4133e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_4x12_no_bypass` with 4 entries of 12 bits. Inputs: `clk`, `we`, `2-bit waddr`, `12-bit wdata`, `2-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_4x12_no_bypass (\n input logic clk,\n input logic we,\n input logic [1:0] waddr,\n input logic [11:0] wdata,\n input logic [1:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:3];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_4x12_no_bypass", "entries": 4, "width": 12, "mode": "no_bypass"}, "prompt_sha1": "f5331fd3945e1cc5ad25a9f8a9df468e13f4c3ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=5 ms, C=4 ms,T=5 ms, C=3 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/5 + 4/5 + 3/40 = 1.475000 = 147.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 5], [4, 5], [3, 40]], "utilization": 1.475}, "prompt_sha1": "b1f3bc7578d5ed19c1e797dd012adc17396e6860", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TNTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on N; 2->T on T; 3->T on T; 3->T on N; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 0, 1, 1, 0, 1], "final_state": 3}, "prompt_sha1": "2c9eddb54e2858e1cfed4f097f013cbcdaa703cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1600 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 1600 = 1440. Verification: 1440/1600 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1600, "duty": 90, "high": 1440}, "prompt_sha1": "5d038dfa330abb6a64f112182e451732ae8beb72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 5 V reference and returns code 208. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 208/255 × 5 V = 4.078431 V.\nThus the estimated input is about 4.0784 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 5.0, "code": 208, "volts": 4.078431372549019}, "prompt_sha1": "12d91cbf8c87ef76d0f7e800f0f00880ebc3f1fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0x12EFF4BD, set bit 20 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 20)`. Result = 0x12FFF4BD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 317715645, "bit": 20, "op": "set", "result": 318764221}, "prompt_sha1": "e3036ffd60849481a4d2265447ac3601d26edee5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 1.75 ns hit time, 91.6% hit rate, and a 45 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.916 = 0.084.\nAMAT = hit time + miss rate × miss penalty\n= 1.75 ns + 0.084×45 ns = 5.5300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 1.75, "hit_rate": 0.916, "penalty": 45, "result": 5.5299999999999985}, "prompt_sha1": "9b134df8a519f8091689242badb223fc7606c3f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 12 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 12 MHz / 32 = 0.375000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 12000000.0, "divider": 32, "spi_hz": 375000.0}, "prompt_sha1": "952e9777c303ebc420ca6c68b64e78b40bcaaa2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 6948 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 6948/(6948+20+8) = 0.995986 = 99.60%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 6948, "iphdr": 20, "eff": 0.9959862385321101}, "prompt_sha1": "11c343339ddccfba59cb8862859f4f2a6618dbec", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_3_8043` converting a 3-bit binary input `bin` to 3-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_3_8043 (\n input logic [2:0] bin,\n output logic [2:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_3_8043", "width": 3}, "prompt_sha1": "95d89e0e777ef5e8a9567dede21c6c5ec73ec977", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 606934059, carries 33651 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 33651+1+1 = 33653. ACK = (606934059+33653) mod 2^32 = 606967712.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 606934059, "payload": 33651, "syn": 1, "fin": 1, "ack": 606967712}, "prompt_sha1": "df6e0918a640cc5e391bc815ef0a1b4424cb5d36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 49 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 49 = 51.\nClock pulses = 51×9 = 459.\nTime = 459/1000000 s = 459.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 49, "clocks": 459, "time_s": 0.000459}, "prompt_sha1": "98b5221a8e5ce2637dc049622d7194940d4d544c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1000 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1000×10^6 × 300/1000 = 3e+08 bits = 3.75e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1000, "rtt_ms": 300, "bits": 300000000.0, "bytes": 37500000.0}, "prompt_sha1": "3ea66efd3deacef1a1accca2d58165d4f14526f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence TTTTNT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on T; 3->T on T; 3->T on T; 3->T on T; 3->T on N; 2->T on T.\nFinal state = 3.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [1, 1, 1, 1, 0, 1], "final_state": 3}, "prompt_sha1": "6042a399ab716289c8d8baa7e80232784047ed1a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `entries` elements of type `double`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n sum += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `items[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n sum += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "1bd3fe407cf23ab4146ba5bdc4f2b10319c8250a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 256 bytes over a datapath transferring 4 bytes per beat at 40 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 4×40×10^6 = 160000000 B/s. Time = 256/160000000 = 1.6e-06 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 256, "width": 4, "rate_mhz": 40, "sec": 1.6e-06}, "prompt_sha1": "8bcd4f9ce6c943bfbc42ff325a30565de76876d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 64 MHz CPU services an interrupt at 20000 Hz. Each ISR consumes 824 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 20000×824/(64×10^6) = 0.2575 = 25.750000%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 64, "irq_hz": 20000, "cycles": 824, "load": 0.2575}, "prompt_sha1": "905918928021544e1daa33d7c561d25b31ec216c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 97%. On an L1 miss, L2 lookup costs 3 ns and L2 local hit rate is 92%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.030×(3+0.080×60) = 1.734000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.97, "l2": 3, "l2_hit": 0.92, "mem": 60, "amat": 1.7340000000000002}, "prompt_sha1": "974124448948a4c3af2f5aabbb088d9046ccd82b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 256 payload bytes plus 64 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 256/(256+64) = 0.800000 = 80.00%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 256, "overhead": 64, "efficiency": 0.8}, "prompt_sha1": "5d5b89d6df988108ebd2dddaf246a2d6c07598d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 62 bits wide and the system uses 2 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2097152 bytes = 2^21 bytes.\nOffset bits = 21.\nVPN bits = 62-21 = 41.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 62, "page_bytes": 2097152, "offset_bits": 21, "vpn_bits": 41}, "prompt_sha1": "a95b775ac833a72c21baac82d0682c6c6da314b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 702 elements. Review loop `for i in range(702+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(702+1)` includes index 702, which is out of range for a length-702 sequence. Correct loop: `for i in range(702):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 702, "variant": "one_past"}, "prompt_sha1": "737cc412641fba10430adfae4925ed3a0dbd695c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 0.5 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×0.5/(0.5×10^9) = 0.001 s = 1.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 0.5, "ghz": 0.5, "sec": 0.001}, "prompt_sha1": "ad1357edf625295f8ab181449c6b0855cccc3239", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 2` on one shared integer without synchronization. Assume `credits` initially equals 97. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 97; T2 reads 97; both compute 99; T1 writes 99; T2 writes 99. The observed final value is 99, but two serial increments would produce 101.\n\n```\nlock(mutex)\ncredits = credits + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "fc3d4fd8e398dfa23e3e9925b9ed224b3f852d9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv6 MTU 1280 bytes, IP header 40 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1280-40-24 = 1216 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1280, "iphdr": 40, "tcphdr": 24, "mss": 1216}, "prompt_sha1": "5a18fc53c07a7e92ce3792119fbfd7f46d607904", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 467 and tail index 217, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (467-217) mod 512 = 250. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 467, "tail": 217, "occupancy": 250}, "prompt_sha1": "46ef4da6a753cbc58242a6635026336be24c4a35", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 596 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "169e28e32c279aac1e62b7cfa98b8f315d9d069f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 96 MHz CPU services an interrupt at 5000 Hz. Each ISR consumes 4106 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 5000×4106/(96×10^6) = 0.213854167 = 21.385417%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 96, "irq_hz": 5000, "cycles": 4106, "load": 0.21385416666666668}, "prompt_sha1": "52b2b5016b901afe5c2c957f3537b744dc61e3e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x45, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x45<<1)|0 = 0x8A = 10001010.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 69, "rw": 0, "byte": 138}, "prompt_sha1": "62df9934ce68bff79600dafc369edf583c9c975b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0x4F345636. Extract the 6-bit field starting at bit 21 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0x4F345636 >> 21) & 0x3F = 0x39 (57).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 6, "lsb": 21, "value": 1328830006, "mask": 63, "field": 57}, "prompt_sha1": "bdd93b0be3264f27cc1fb55a8326ecf675629bbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2 Mbit/s and RTT 250 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2×10^6 × 250/1000 = 500000 bits = 62500 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2, "rtt_ms": 250, "bits": 500000.0, "bytes": 62500.0}, "prompt_sha1": "9ec0a6632a71a1df42018e18e4793bafd86bebc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_49` for a synchronous sampled input `noisy`. Update output `clean` only after observing 49 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_49 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 48) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_49", "stable_samples": 49}, "prompt_sha1": "cede8ac60b589b31b95b74ec1a5e2e33ad2c7f69", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 20% of instructions, the branch misprediction rate is 10%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.100 × 8 = 0.160000.\nEffective CPI = 1.1 + 0.160000 = 1.260000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.2, "mispred": 0.1, "penalty": 8, "result": 1.2600000000000002}, "prompt_sha1": "d64728e151590b8cfeb176161ecb74ea0bbe4fac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 25000 Mbit/s using fixed 4096-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 25000×10^6 / (4096×8) = 762939.453125 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 25000, "frame_bytes": 4096, "pps": 762939.453125}, "prompt_sha1": "e6f8a7879b4bc5de8bb4c7d1c61c1d503af5f9ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 500000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1.1e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×500000 = 1000000 Hz. Proposed rate 1.1e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 500000, "min_fs": 1000000, "proposed": 1100000.0}, "prompt_sha1": "590e8481f9485352001ec4fa29c32ca79e8cf911", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 9000 bytes, IP header 20 bytes, and TCP header 24 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 9000-20-24 = 8956 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 9000, "iphdr": 20, "tcphdr": 24, "mss": 8956}, "prompt_sha1": "f7dcefa6e5ab2d49dbff34b3cb46fa7bc6047fc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 6 and tail index 29, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (6-29) mod 32 = 9. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 6, "tail": 29, "occupancy": 9}, "prompt_sha1": "0d0fca7d61aa130fa310b34ae7be5ca8560e43e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 96 MHz, prescaler divisor is 186, and period is 48631 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 96000000/(186×48631) = 10.613169 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 96000000, "prescaler": 186, "period": 48631, "hz": 10.613169218359987}, "prompt_sha1": "d570598c61afc5ac92d9dbdb00b06dc7794ac944", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.45. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.45) + 0.45/192) = 1.810467.\nThe theoretical speedup is about 1.810×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.45, "n": 192, "result": 1.8104667609618104}, "prompt_sha1": "a7580229cace9d4c486deebad028e0b8ce270b4d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 0.5 ns hit time, 97.4% hit rate, and a 155 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.974 = 0.026.\nAMAT = hit time + miss rate × miss penalty\n= 0.5 ns + 0.026×155 ns = 4.5300 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 0.5, "hit_rate": 0.974, "penalty": 155, "result": 4.530000000000004}, "prompt_sha1": "ed7a90a454cc05bb86e3776de2902d1ea53f31bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 72 MHz source using integer divider 2. Compute SCLK frequency.", "output": "SCLK = 72 MHz / 2 = 36.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 72000000.0, "divider": 2, "spi_hz": 36000000.0}, "prompt_sha1": "3d0da4e4b7f9f96cd4c9496e5ffefc90781ae26d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.8 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 75%. An L2 miss adds 40 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.8 + 0.100×(8+0.250×40) = 2.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.8, "l1_hit": 0.9, "l2": 8, "l2_hit": 0.75, "mem": 40, "amat": 2.5999999999999996}, "prompt_sha1": "1b18c568642015b493fe2267549684ea2d31a075", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (1024×8) = 12207.031250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 1024, "pps": 12207.03125}, "prompt_sha1": "bfab991fd1126a019104cf3d4e319c3ed75ea8bb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 30059 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 30059/5000000 s; frequency = 5000000/30059 = 166.339532 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 30059, "hz": 166.3395322532353}, "prompt_sha1": "341590fc1a6dc512ad30040e700201d2c4f49567", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 34-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^34/2^18 = 2^16 = 65536 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 34, "page_exp": 18, "entries": 65536}, "prompt_sha1": "a496dff3abf7f6db459112f13cd1887454103164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=5600 ohm and C=120000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=5600×120000×10^-12 s = 0.000672 s.\nf_c=1/(2πRC)=1/(2π×5600×120000×10^-12) = 236.8377 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 5600, "c_f": 1.2e-07, "tau": 0.000672, "fc": 236.83771293436808}, "prompt_sha1": "0aba42a5847a2027c2d5b273022f3791f1a7d1ed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 100 Mbit/s using fixed 768-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 100×10^6 / (768×8) = 16276.041667 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "frame_bytes": 768, "pps": 16276.041666666666}, "prompt_sha1": "14694c375f79100429e329692abef79a38595cc6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 97.1% hit rate, and a 175 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.971 = 0.029.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.029×175 ns = 9.0750 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.971, "penalty": 175, "result": 9.075000000000005}, "prompt_sha1": "a60e14533040358ca118eaf6376789337b0172d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_898960` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_898960 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_898960"}, "prompt_sha1": "ad383f373915e9463561bab948e819d511040681", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 48 MHz and must generate an exact 8000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 48000000/8000 = 6000.\nWith prescaler divisor limited to at most 16, the largest divisor of 6000 that also keeps the period count within 16 bits is 16.\nPeriod count = 6000/16 = 375.\nPSC register = 16-1 = 15.\nARR register = 375-1 = 374.\nVerification: 48000000/(16×375) = 8000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 48000000, "target_hz": 8000, "total_division": 6000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 375, "psc_reg": 15, "arr_reg": 374}, "prompt_sha1": "ddf7b407e339e0824b0a3c89f204d8f282b80669", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 1000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 32. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/1000 = 120000.\nWith prescaler divisor limited to at most 32, the largest divisor of 120000 that also keeps the period count within 16 bits is 32.\nPeriod count = 120000/32 = 3750.\nPSC register = 32-1 = 31.\nARR register = 3750-1 = 3749.\nVerification: 120000000/(32×3750) = 1000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 1000, "total_division": 120000, "max_prescaler": 32, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 32, "period": 3750, "psc_reg": 31, "arr_reg": 3749}, "prompt_sha1": "6048526e52127dd7dbb0186b63eb61a2911aef64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1400 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1400-24 = 1376 bytes.\nRound down to an 8-byte multiple: floor((1376)/8)×8 = 1376 bytes.\nFragments required = ceil(5000/1376) = 4.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1400, "header": 24, "payload": 5000, "max_payload": 1376, "fragments": 4}, "prompt_sha1": "791e4e98159b6fd173654994094567f539001b1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 2. Apply outcome sequence NTTNNNTTNNNN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 2->T on N; 1->N on T; 2->T on T; 3->T on N; 2->T on N; 1->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on N; 0->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 2, "outcomes": [0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0], "final_state": 0}, "prompt_sha1": "a230c24663882e762ea95b6a641f659190fbeeed", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 100 ohm and 560 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (100×560)/(100+560) = 84.848485 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 100, "r2": 560, "req": 84.84848484848484}, "prompt_sha1": "836dd79261ec21c9adeeb93535edc0cfc856a641", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 12 MHz source using integer divider 64. Compute SCLK frequency.", "output": "SCLK = 12 MHz / 64 = 0.187500 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 12000000.0, "divider": 64, "spi_hz": 187500.0}, "prompt_sha1": "82c853f69d2046d064f6220c583c5005e4a345ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 4000 bytes, IP header 20 bytes, and TCP header 32 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 4000-20-32 = 3948 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 4000, "iphdr": 20, "tcphdr": 32, "mss": 3948}, "prompt_sha1": "fb939b5fb4dce36e55a2bbb52f120a3c6e6308bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 14-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^14 V = 0.00018310546875 V = 183.105469 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 14, "vref": 3.0, "step": 0.00018310546875}, "prompt_sha1": "e6d538edc0bae463ac13614f24d6ce9e8b225041", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 32768 bytes over a datapath transferring 1 bytes per beat at 8 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×8×10^6 = 8000000 B/s. Time = 32768/8000000 = 0.004096 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 32768, "width": 1, "rate_mhz": 8, "sec": 0.004096}, "prompt_sha1": "90f89c9014a63a1e04a86fc8c44fe2ec58d43d8e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w8_7366` implementing a dual-clock asynchronous FIFO with depth 128 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w8_7366 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 8,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w8_7366", "depth": 128, "width": 8, "ptr_w": 7}, "prompt_sha1": "b49fa95b83f6c6b1a1443240bc4c325494dfe0fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 46 bits wide and the system uses 1 MiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1048576 bytes = 2^20 bytes.\nOffset bits = 20.\nVPN bits = 46-20 = 26.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 46, "page_bytes": 1048576, "offset_bits": 20, "vpn_bits": 26}, "prompt_sha1": "1778c2aacf39267ef323dedab4ba66e907da66f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x64_write_bypass` with 64 entries of 64 bits. Inputs: `clk`, `we`, `6-bit waddr`, `64-bit wdata`, `6-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x64_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [63:0] wdata,\n input logic [5:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x64_write_bypass", "entries": 64, "width": 64, "mode": "write_bypass"}, "prompt_sha1": "6d8cdc8ececb2175918eafff523656f942f726f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xE1BF6FB640 in 5 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 40 B6 6F BF E1.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 969579411008, "endian": "little", "bytes": [64, 182, 111, 191, 225]}, "prompt_sha1": "7a1f6f6ed504750ada4726235e008fc276500905", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 262144 bytes over a datapath transferring 8 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×160×10^6 = 1280000000 B/s. Time = 262144/1280000000 = 0.0002048 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 262144, "width": 8, "rate_mhz": 160, "sec": 0.0002048}, "prompt_sha1": "c3078dae5c1e47e3b58792dd3cef5424ff2e2a48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 485 elements. Review loop `for i in range(485+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(485+1)` includes index 485, which is out of range for a length-485 sequence. Correct loop: `for i in range(485):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 485, "variant": "one_past"}, "prompt_sha1": "a1bef0900f865ce36e68d21d4530433481159f12", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x2145, toggle bit 0 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 0)`. Result = 0x2144.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 8517, "bit": 0, "op": "toggle", "result": 8516}, "prompt_sha1": "01bc1608955e002acc005499d29b7d710cb1e468", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 1 bytes per beat at 1 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×1×10^6 = 1000000 B/s. Time = 1048576/1000000 = 1.048576 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 1, "rate_mhz": 1, "sec": 1.048576}, "prompt_sha1": "330758607df64596404771ce637c44bb00bbe73a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 4053 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 4053/(4053+20+8) = 0.993139 = 99.31%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 4053, "iphdr": 20, "eff": 0.9931389365351629}, "prompt_sha1": "9f4b329e09b176331f6fbae4f26dde05f182048d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 20 MHz. Sampling consumes 247.5 cycles and conversion consumes 8 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 247.5+8 = 255.5. Period = 255.5/20000000 = 1.2775e-05 s. Maximum rate = 1/period = 78277.886497 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 20000000.0, "sample_cycles": 247.5, "conv_cycles": 8, "period": 1.2775e-05, "rate": 78277.88649706458}, "prompt_sha1": "b7c0815e8dfb898ddd849b53177093fb7f10ad6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.99. Using Amdahl's law, compute the theoretical speedup on 16 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.99) + 0.99/16) = 13.913043.\nThe theoretical speedup is about 13.913×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.99, "n": 16, "result": 13.913043478260867}, "prompt_sha1": "3e0914076cd67d932d66fe72a4a080e7abd7c8f5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 200 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 200×10^6×0.1/1000/8 = 2500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "rtt_ms": 0.1, "bytes": 2500.0}, "prompt_sha1": "356c6316ae5b426628b3c057225d109a343daa85", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 7 and initial occupancy is 6. In an abstract batch, producer attempts to enqueue 168 items first, dropping any excess beyond capacity; then consumer removes up to 13 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=7, dropped=167; consumed=7; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 7, "start": 6, "prod": 168, "cons": 13, "dropped": 167, "consumed": 7, "final": 0}, "prompt_sha1": "2ad5da5ed671c8349cd93dacb06034780d709848", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=2.2 kOhm, Rf=4.7 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -4.7/2.2 = -2.136364.\nVout = A_v×Vin = -2.136364×1 = -2.136364 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 2.2, "rf": 4.7, "vin": 1.0, "gain": -2.1363636363636362, "vout": -2.1363636363636362}, "prompt_sha1": "4f0c0d6d32d8af2490116630733783e5d7b50b98", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_136` generating a one-clock-cycle `tick` every 136 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_136 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 135) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_136", "divide": 136}, "prompt_sha1": "b0d194122e62571979b0ecff2c133ef8d1f1cf57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 40 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 16 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 16/(40×10^6) s = 0.400000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 40, "bits": 16, "time_us": 0.39999999999999997}, "prompt_sha1": "03aaab118a587dff33935e3f862c003b84e86a0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x72A3, set bit 14 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 14)`. Result = 0x72A3.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 29347, "bit": 14, "op": "set", "result": 29347}, "prompt_sha1": "9d75240f9b9e6d44d8a23601c564b7f6f6100eb5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_64x40_write_bypass` with 64 entries of 40 bits. Inputs: `clk`, `we`, `6-bit waddr`, `40-bit wdata`, `6-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_64x40_write_bypass (\n input logic clk,\n input logic we,\n input logic [5:0] waddr,\n input logic [39:0] wdata,\n input logic [5:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:63];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_64x40_write_bypass", "entries": 64, "width": 40, "mode": "write_bypass"}, "prompt_sha1": "6ef6c6990b1ae2a62d160f6977189e19ebabf7d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 115200 baud with 1 start bit, 8 data bits, no parity bit, and 2 stop bit(s). How long does transmission of 64 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+0+2 = 11. Total bits = 64×11 = 704. Time = 704/115200 = 0.00611111111 s = 6.111111 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 115200, "data": 8, "parity": 0, "stop": 2, "frames": 64, "seconds": 0.006111111111111111}, "prompt_sha1": "5944f2f96d584dd743586c656c5fe7e6de8a1c63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w36_cin` implementing a 36-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `36-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w36_cin (\n input logic [35:0] a,\n input logic [35:0] b,\n input logic cin,\n output logic [35:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w36_cin", "width": 36, "cin": true}, "prompt_sha1": "929395cfa4ee80b56ce36d3d603ffd33d912cc74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 11-bit ADC spanning 0 to 4.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 4.5/2^11 V = 0.002197265625 V = 2197.265625 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 11, "vref": 4.5, "step": 0.002197265625}, "prompt_sha1": "514d831b7ac9bacbf9e78f2ff9d3938be2676b5e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint64_t`, evaluate the stored result after `x = 18446744073709551375; x = x + 417;`. The mathematical sum exceeds the maximum value representable by `uint64_t`. State the value stored back into `x` under conversion to the unsigned 64-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 18446744073709551375+417 = 18446744073709551792. Converting that result back to the unsigned 64-bit type reduces it modulo 2^64: (18446744073709551792) mod 2^64 = 176. So `x` stores 176. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint64_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 64, "start": 18446744073709551375, "add": 417, "result": 176}, "prompt_sha1": "1583748d8fc576852f6ac99f82da83864d973d6d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0xDA33. Extract the 6-bit field starting at bit 1 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 6 bits = (1<<6)-1 = 0x3F.\nfield = (0xDA33 >> 1) & 0x3F = 0x19 (25).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 6, "lsb": 1, "value": 55859, "mask": 63, "field": 25}, "prompt_sha1": "5d32725a51fb8d80aa22665b819d767b49ffb356", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=220 nF and is stepped to 5 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=5(1-e^-5)=4.966310 V; τ=0.0001034 s and t=0.000517 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 2.2e-07, "multiple": 5, "vin": 5, "vc": 4.966310265004573}, "prompt_sha1": "e487190f783b880b807871bcffae37c638ef8405", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 64 counts per period. What compare/high-time count produces exactly 37.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.375 × 64 = 24. Verification: 24/64 = 0.375, which is 37.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 64, "duty": 37.5, "high": 24}, "prompt_sha1": "71e3cc27d998d3a18cb446284bda60134500862c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [23, 23, 20, 7]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [72, 73, 67, 31].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [23, 23, 20, 7], "finish": [72, 73, 67, 31]}, "prompt_sha1": "0fd5b8457fd7e8439852c06dddcee87f823495d1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 5000 Mbit/s and RTT 300 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 5000×10^6 × 300/1000 = 1.5e+09 bits = 1.875e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 5000, "rtt_ms": 300, "bits": 1500000000.0, "bytes": 187500000.0}, "prompt_sha1": "0897997420578c4ea9242e437d92c4702a79eade", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 2 and all processes arrive at time 0 with CPU bursts [14, 7, 1, 13]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [34, 22, 5, 35].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 2, "bursts": [14, 7, 1, 13], "finish": [34, 22, 5, 35]}, "prompt_sha1": "31b66893a7ffcbe1547fa0d4c7289d3f407bc229", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_45` for a synchronous sampled input `noisy`. Update output `clean` only after observing 45 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_45 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 44) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_45", "stable_samples": 45}, "prompt_sha1": "09ff590b1e65e7803eeee3b86adfc9582dfa910a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 3431 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 3431/(3431+20+8) = 0.991905 = 99.19%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 3431, "iphdr": 20, "eff": 0.9919051749060422}, "prompt_sha1": "008ec79abbb78b20c375f6239c0ec49384f849f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d128_w16_5690` implementing a dual-clock asynchronous FIFO with depth 128 and data width 16. Inputs: `clk_w`, `rst_w`, `wr_en`, `16`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `16`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 7-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d128_w16_5690 #(\n parameter int DEPTH = 128,\n parameter int WIDTH = 16,\n parameter int PTR_W = 7\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d128_w16_5690", "depth": 128, "width": 16, "ptr_w": 7}, "prompt_sha1": "4f72d778d7a8b832fbac48d7ac3aa332f4399d2c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 50 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 50-18 = 32.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 50, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 32}, "prompt_sha1": "f2dd105ce15f0afb89226bbda367dbd55077def8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9632` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9632 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9632"}, "prompt_sha1": "375ae9e52cca8eb62fea55916c2ab5b8dd69192e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 8 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 38 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+1 = 11. Total bits = 38×11 = 418. Time = 418/19200 = 0.0217708333 s = 21.770833 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 8, "parity": 1, "stop": 1, "frames": 38, "seconds": 0.021770833333333333}, "prompt_sha1": "fb0d5dcb972b8e23261808c4e495ccca026cf499", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4.7 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×4.7e-06×1.8²=7.614e-06 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 4.7e-06, "v": 1.8, "energy": 7.614e-06}, "prompt_sha1": "2e80a12edd1328f6049fad2159ac58f1c8f4d588", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_47_msb` for `47-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_47_msb (\n input logic [46:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 47; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_47_msb", "width": 47, "priority": "high"}, "prompt_sha1": "b8c51d22c165181d3a49283d69a6acfbb04471e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `values`, an array of exactly `len` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= len; ++i) {\n total += values[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `len-1`, but `i <= len` also executes at `i == len` and accesses `values[len]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < len; ++i) {\n total += values[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b2613c74669d005351d4272f0f617781e441174a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1500 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1500-20-60 = 1420 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1500, "iphdr": 20, "tcphdr": 60, "mss": 1420}, "prompt_sha1": "19edff08a295854382ceb5e37a07bf9b4c1310b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 010001100. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 3 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "010001100", "ones": 3, "parity": 1}, "prompt_sha1": "87d32e617482387f693b775ef42d472010647ba2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock DESC then D; T2 acquires D then DESC. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds DESC while waiting for D, while T2 holds D while waiting for DESC; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire D before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "39f04f38fc68b2a9d080304a16ca8d71e4c52afb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_27` for a 27-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_27 (\n input logic [26:0] data,\n input logic [4:0] shamt,\n output logic [26:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_27", "width": 27, "direction": "right", "arithmetic": false}, "prompt_sha1": "0c7a5a742752d85b488e3282c456b0daff1f3c13", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 96 data bits per transfer at 1600 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 96/8 = 12. Bandwidth = 12×1600×10^6×8 = 153.600000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 96, "rate_mt": 1600, "channels": 8, "gbps": 153.6}, "prompt_sha1": "32041b09eb744aaed557ed622436d6ac849049e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5695(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5695(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5695([1, 2]) == 1.5\nassert mean_5695([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5695"}, "prompt_sha1": "a428e01ce64ee9af0376155fd1d80972c68b5616", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_392754` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_392754 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_392754"}, "prompt_sha1": "be8eb963e89f1470c424b85522467ba068120c42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 144 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 14400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 144000000/(4×14400) = 2500.000000.\nNearest integer divisor D = 2500.\nActual baud = 144000000/(4×2500) = 14400.000 baud.\nError = (14400.000-14400)/14400×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 144000000, "oversample": 4, "baud": 14400, "divisor": 2500, "actual": 14400.0, "error_pct": 0.0}, "prompt_sha1": "eedf1f3ee0382aba819d85249959dd7a4a80516a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 111011111000001110000011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 13 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "111011111000001110000011", "ones": 13, "parity": 1}, "prompt_sha1": "f4858e704dbb1e436cc175a0d4fe17464f4c5911", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 4800 baud with 1 start bit, 9 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 35 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+1 = 12. Total bits = 35×12 = 420. Time = 420/4800 = 0.0875 s = 87.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 4800, "data": 9, "parity": 1, "stop": 1, "frames": 35, "seconds": 0.0875}, "prompt_sha1": "e86bff520fe1ce279ec5f24f3488995b363c9756", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 1297118217, carries 43624 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 43624+0+1 = 43625. ACK = (1297118217+43625) mod 2^32 = 1297161842.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 1297118217, "payload": 43624, "syn": 0, "fin": 1, "ack": 1297161842}, "prompt_sha1": "b9740f47e60bd41c5a10045d38ca18496b3dba64", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_30` for a 30-bit unsigned input `data`, `5-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_30 (\n input logic [29:0] data,\n input logic [4:0] shamt,\n output logic [29:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_30", "width": 30, "direction": "left", "arithmetic": false}, "prompt_sha1": "32bf81e46c9613ea5d75b92f614198f64a4a030b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xAEC5FC98B8ED851B in 8 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: AE C5 FC 98 B8 ED 85 1B.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 12593749665879262491, "endian": "big", "bytes": [174, 197, 252, 152, 184, 237, 133, 27]}, "prompt_sha1": "88ba7148f6ad25e9dd1a8a141d82c335753d10eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w63_nocin` implementing a 63-bit unsigned adder with inputs `a`, `b` and outputs `63-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w63_nocin (\n input logic [62:0] a,\n input logic [62:0] b,\n output logic [62:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w63_nocin", "width": 63, "cin": false}, "prompt_sha1": "ab37b3e2ccf59efa0ee841b43cbbaab06cbb04d2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=2700 ohm and C=3300 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=2700×3300×10^-12 s = 8.91e-06 s.\nf_c=1/(2πRC)=1/(2π×2700×3300×10^-12) = 17862.5076 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 2700, "c_f": 3.2999999999999998e-09, "tau": 8.91e-06, "fc": 17862.50764218803}, "prompt_sha1": "4679262f7868fb7c1a12d9b183cace944029f5ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_8042` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_8042 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_8042", "width": 8}, "prompt_sha1": "583ed4f200fcaaca2bfb2f8d2c7dad6f160e2001", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w30_signed` comparing two 30-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w30_signed (\n input logic signed [29:0] a,\n input logic signed [29:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w30_signed", "width": 30, "signed": true}, "prompt_sha1": "22a740146e75a90d55a49298be4b1d5b1a4ef5c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11011110011100100 using generator polynomial bits 111101. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 10111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 61, "msg_bits": 17, "msg": 113892, "remainder": 23}, "prompt_sha1": "33a7fd051cd7193579cecef6ab872a304fb88c93", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 512. Using occupancy formula `(head-tail) mod capacity`, with head index 240 and tail index 350, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (240-350) mod 512 = 402. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 512 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 512, "head": 240, "tail": 350, "occupancy": 402}, "prompt_sha1": "67946d318ba7479ff77b50eccf980f4ac26bcf51", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 8-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^8 V = 0.01953125 V = 19531.250000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 8, "vref": 5.0, "step": 0.01953125}, "prompt_sha1": "6e02fea43ce8c00d95ddf475159239e52a02b45a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 16 data bits per transfer at 2400 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 16/8 = 2. Bandwidth = 2×2400×10^6×4 = 19.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 16, "rate_mt": 2400, "channels": 4, "gbps": 19.2}, "prompt_sha1": "27208ed22a6b95dbdd31479c8c84734971d3dd37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10 Mbit/s and RTT 150 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10×10^6×150/1000/8 = 187500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "rtt_ms": 150, "bytes": 187500.0}, "prompt_sha1": "31cfd1bdbcbc522cb8e75ce58d7287d346526593", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 2.5 V across it. Compute current and dissipated power.", "output": "I=V/R=2.5/1000=0.0025 A. P=V²/R=2.5²/1000=0.00625 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 2.5, "r": 1000, "i": 0.0025, "p": 0.00625}, "prompt_sha1": "95961304bad103752a65b079d7cf0eda0ccfb7c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 54 bits wide and the system uses 2 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2048 bytes = 2^11 bytes.\nOffset bits = 11.\nVPN bits = 54-11 = 43.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 54, "page_bytes": 2048, "offset_bits": 11, "vpn_bits": 43}, "prompt_sha1": "523f6feea87a28b9586fdf6bcda377da8082a87f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3496426385, carries 8823 payload bytes, SYN=0, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 8823+0+1 = 8824. ACK = (3496426385+8824) mod 2^32 = 3496435209.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3496426385, "payload": 8823, "syn": 0, "fin": 1, "ack": 3496435209}, "prompt_sha1": "b8cd35d237f2d5451cc3fbaf1d378ab558da2a94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 5000000 Hz. Consecutive rising edges are 32431 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 32431/5000000 s; frequency = 5000000/32431 = 154.173476 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 5000000, "delta": 32431, "hz": 154.1734759951898}, "prompt_sha1": "2afc983d5bb01832513bfae15e841fc1c28a3cd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_9_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 9 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_9_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 4'd9;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_9_ignore", "cycles": 9, "retrigger": false}, "prompt_sha1": "2f733866ed3f0e3c96c97afaa49c0b4d33bcbf5b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=2200 nF and is stepped to 2.5 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=2.5(1-e^-4)=2.454211 V; τ=0.01034 s and t=0.04136 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 2.2e-06, "multiple": 4, "vin": 2.5, "vc": 2.4542109027781644}, "prompt_sha1": "c08173ea45b9d3904b83a6bb389fc2fffc55a349", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w24_cin` implementing a 24-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `24-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w24_cin (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic cin,\n output logic [23:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w24_cin", "width": 24, "cin": true}, "prompt_sha1": "4508711425af53878e923623b71c6ea869a6b5e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 100 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 19200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 100000000/(8×19200) = 651.041667.\nNearest integer divisor D = 651.\nActual baud = 100000000/(8×651) = 19201.229 baud.\nError = (19201.229-19200)/19200×100% = 0.0064%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 100000000, "oversample": 8, "baud": 19200, "divisor": 651, "actual": 19201.228878648235, "error_pct": 0.006400409626223791}, "prompt_sha1": "5b26aea0deb72388fb5b3ecd34ea063ce6418701", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock A then C; task_B acquires C then A. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds A while waiting for C, while task_B holds C while waiting for A; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire A before C. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "7f5b774e1564c18a2e57fca5ef5ec20b00d81eb2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w27_unsigned` comparing two 27-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w27_unsigned (\n input logic [26:0] a,\n input logic [26:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w27_unsigned", "width": 27, "signed": false}, "prompt_sha1": "fdce9a267b711607ba079cba886e98d4c244bb9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 51 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 51 = 53.\nClock pulses = 53×9 = 477.\nTime = 477/400000 s = 1192.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 51, "clocks": 477, "time_s": 0.0011925}, "prompt_sha1": "12a5e7d03dbf711dad504068778aa9b175d2b6cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2112339121, carries 36748 payload bytes, SYN=0, FIN=0. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 36748+0+0 = 36748. ACK = (2112339121+36748) mod 2^32 = 2112375869.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2112339121, "payload": 36748, "syn": 0, "fin": 0, "ack": 2112375869}, "prompt_sha1": "c0880684789cbe312343bfdf6f60a495cb3f7ac8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111100011 using generator polynomial bits 11101. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 1100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 29, "msg_bits": 9, "msg": 483, "remainder": 12}, "prompt_sha1": "02b1a01619e991ce9d55e717daefafdcd0d884d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 10% of instructions, the branch misprediction rate is 5%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.100 × 0.050 × 3 = 0.015000.\nEffective CPI = 1.1 + 0.015000 = 1.115000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.1, "mispred": 0.05, "penalty": 3, "result": 1.115}, "prompt_sha1": "61a894a6317e5450c87a15958e5c31ad11c25c6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 921600 baud with 1 start bit, 7 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 43 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+2 = 11. Total bits = 43×11 = 473. Time = 473/921600 = 0.000513237847 s = 0.513238 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 921600, "data": 7, "parity": 1, "stop": 2, "frames": 43, "seconds": 0.0005132378472222222}, "prompt_sha1": "1b7b9b0293432f90293c0f8b240fea6f3adfcca4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `buf`, an array of exactly `samples` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n total += buf[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `buf[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n total += buf[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "6520884575fa06db52dcf0ec4c95f802b2fe4514", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_4688` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_4688 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_4688"}, "prompt_sha1": "db8cf1facb9b8219fc20c39c4fd63487f372300c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 3 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×3/(3.5×10^9) = 0.0857142857 s = 85.714286 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 3.0, "ghz": 3.5, "sec": 0.08571428571428572}, "prompt_sha1": "34aee5e6e7c02d2e81b3364ee2f3a6aad9d8cfdb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 5 ns and L2 local hit rate is 80%. An L2 miss adds 60 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.010×(5+0.200×60) = 1.670000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.99, "l2": 5, "l2_hit": 0.8, "mem": 60, "amat": 1.6700000000000002}, "prompt_sha1": "9651dd70d8e346d6b44476b8df0d9b99e59d2f68", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 4000 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×4000×10^6×6 = 120.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 4000, "channels": 6, "gbps": 120.0}, "prompt_sha1": "2fe51255df9d568b58674c59cee9b2ea6c11cac4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x4C. Extract the 3-bit field starting at bit 3 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0x4C >> 3) & 0x7 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 3, "lsb": 3, "value": 76, "mask": 7, "field": 1}, "prompt_sha1": "e7201e3c154e452df3a566a978e8ae392c67414d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=47 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×22/(47+22) = 1.594203 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 47, "r2": 22, "vout": 1.5942028985507246}, "prompt_sha1": "93aa68ec52f2e897c4b9b5623729634ce64ed7aa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 56 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 56 = 58.\nClock pulses = 58×9 = 522.\nTime = 522/1000000 s = 522.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 56, "clocks": 522, "time_s": 0.000522}, "prompt_sha1": "aaa5e1651512262597ef9d21844495ec7549e359", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 15-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^15 V = 9.1552734375e-05 V = 91.552734 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 15, "vref": 3.0, "step": 9.1552734375e-05}, "prompt_sha1": "599eaf0283ca9a4008d1793527598ba25761e756", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=390000 ohm and C=4700 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=390000×4700×10^-12 s = 0.001833 s.\nf_c=1/(2πRC)=1/(2π×390000×4700×10^-12) = 86.8276 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 390000, "c_f": 4.7e-09, "tau": 0.001833, "fc": 86.82757397266522}, "prompt_sha1": "17c3d6e0b12a0d5d4cf1268e5efb87c391f4a164", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 8081 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 8081/(8081+40+8) = 0.994095 = 99.41%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 8081, "iphdr": 40, "eff": 0.9940952146635502}, "prompt_sha1": "3aae62914b254b2e9e8a0bfe51d45c5127fcdc17", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.22 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 0.22×10^-3/100 = 2.2e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.00022, "r": 100, "tau": 2.2e-06}, "prompt_sha1": "12513d6e3a9117e5eddad2d1085b5f695e23bc76", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 32-bit register has value 0xABC8CCCE. Extract the 2-bit field starting at bit 15 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 2 bits = (1<<2)-1 = 0x3.\nfield = (0xABC8CCCE >> 15) & 0x3 = 0x1 (1).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 32, "field_width": 2, "lsb": 15, "value": 2882063566, "mask": 3, "field": 1}, "prompt_sha1": "a5b0d911981d3cc6ab80faa446172a750679cb3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 24 data bits per transfer at 5600 MT/s across 6 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 24/8 = 3. Bandwidth = 3×5600×10^6×6 = 100.800000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 24, "rate_mt": 5600, "channels": 6, "gbps": 100.8}, "prompt_sha1": "bb478959e68e71e97e5ffc51ead99543babe3c9d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 38400 baud with 1 start bit, 6 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 53 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+6+1+1 = 9. Total bits = 53×9 = 477. Time = 477/38400 = 0.012421875 s = 12.421875 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 38400, "data": 6, "parity": 1, "stop": 1, "frames": 53, "seconds": 0.012421875}, "prompt_sha1": "978bf1c4fd9cfb90be03ef95b86e249521245e4e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 10 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 10×10^6 / (256×8) = 4882.812500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 10, "frame_bytes": 256, "pps": 4882.8125}, "prompt_sha1": "ac418b85868b98923c3fd0323d51b040451448a5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1455(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1455(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1455([1, 2]) == 1.5\nassert mean_1455([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1455"}, "prompt_sha1": "4db4ec64a1112770bdc5b18324a27ec361c7b556", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 2 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×80×10^6 = 160000000 B/s. Time = 16384/160000000 = 0.0001024 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 2, "rate_mhz": 80, "sec": 0.0001024}, "prompt_sha1": "809287bf209b275425eaca83e74305700b90afab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 5-bit left-shift register module `shiftreg_left_5`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `5-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_5 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [4:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[3:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_5", "width": 5, "direction": "left"}, "prompt_sha1": "bdc1314ca938d9e53b44d93dc79c27a50c639d4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `jobs = jobs + 5` on one shared integer without synchronization. Assume `jobs` initially equals 491. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 491; T2 reads 491; both compute 496; T1 writes 496; T2 writes 496. The observed final value is 496, but two serial increments would produce 501.\n\n```\nlock(mutex)\njobs = jobs + 5\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "4013c60f081258d6521f3e2fb35eccdf7d2ce328", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 16 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 14400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 16000000/(4×14400) = 277.777778.\nNearest integer divisor D = 278.\nActual baud = 16000000/(4×278) = 14388.489 baud.\nError = (14388.489-14400)/14400×100% = -0.0799%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 16000000, "oversample": 4, "baud": 14400, "divisor": 278, "actual": 14388.489208633093, "error_pct": -0.07993605115907738}, "prompt_sha1": "e0f10f700cec71c92b699836519791f311b6eff7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1600 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 1600 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 1600}, "prompt_sha1": "b8e897e4e4a108f39e82501cc83789fcf5c47627", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [5, 20, 2, 30, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [16, 63, 8, 83, 80].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [5, 20, 2, 30, 26], "finish": [16, 63, 8, 83, 80]}, "prompt_sha1": "10e245ab1ec9e350719f2bca0d55f55b079ae828", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 800 MHz CPU services an interrupt at 50 Hz. Each ISR consumes 4542 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 50×4542/(800×10^6) = 0.000283875 = 0.028387%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 800, "irq_hz": 50, "cycles": 4542, "load": 0.000283875}, "prompt_sha1": "552b722672a69374ad530a8d5e8b8c71ba505c56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 128 data bits per transfer at 6400 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 128/8 = 16. Bandwidth = 16×6400×10^6×1 = 102.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 128, "rate_mt": 6400, "channels": 1, "gbps": 102.4}, "prompt_sha1": "7226237d5d655c1a43e8130b1e6a4c8aecfad784", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 17370 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 17370/1000000 s; frequency = 1000000/17370 = 57.570524 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 17370, "hz": 57.570523891767415}, "prompt_sha1": "7c30ca1192e413e4a90dc3340147422bc846cf2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 2.2e+06 Hz satisfies it.", "output": "Nyquist minimum is 2×1000000 = 2000000 Hz. Proposed rate 2.2e+06 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000000, "min_fs": 2000000, "proposed": 2200000.0}, "prompt_sha1": "034da514a10d4f1abaa61dfb293717e1368c2ff4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3 V reference and returns code 13251. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 13251/16383 × 3 V = 2.426479 V.\nThus the estimated input is about 2.4265 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.0, "code": 13251, "volts": 2.426478666910822}, "prompt_sha1": "6c63d390e5e902d3f38950500ad1d78e1b05e157", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65402; x = x + 143;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65402+143 = 65545. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65545) mod 2^16 = 9. So `x` stores 9. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65402, "add": 143, "result": 9}, "prompt_sha1": "4a94a292833d64f9c6957a1326b5e8562ddff121", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 250 counts per period. What compare/high-time count produces exactly 90% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.9 × 250 = 225. Verification: 225/250 = 0.9, which is 90%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 250, "duty": 90, "high": 225}, "prompt_sha1": "5ddc6a51aeba81d9505dc2d8f10e6b7b9e516afa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_16x40_no_bypass` with 16 entries of 40 bits. Inputs: `clk`, `we`, `4-bit waddr`, `40-bit wdata`, `4-bit raddr`; output `40-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_16x40_no_bypass (\n input logic clk,\n input logic we,\n input logic [3:0] waddr,\n input logic [39:0] wdata,\n input logic [3:0] raddr,\n output logic [39:0] rdata\n);\n logic [39:0] mem [0:15];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_16x40_no_bypass", "entries": 16, "width": 40, "mode": "no_bypass"}, "prompt_sha1": "7e3e65b4c6805421cd308b7244db4b4a9c37b901", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 5% of instructions, the branch misprediction rate is 5%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.050 × 3 = 0.007500.\nEffective CPI = 1.2 + 0.007500 = 1.207500.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.05, "mispred": 0.05, "penalty": 3, "result": 1.2075}, "prompt_sha1": "d71c5b14402e039c7708e51aa89542b20506f5a3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 12880 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 12880/1000000 s; frequency = 1000000/12880 = 77.639752 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 12880, "hz": 77.63975155279503}, "prompt_sha1": "81362e1c0d285a89d677965c37fd6ca2c29908fd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.9 V source drives a 680 ohm resistor in series with an LED whose forward voltage is assumed to be 2.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.9-2.9 = 9 V.\nI = V/R = 9/680 A = 13.2353 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.9, "vf": 2.9, "r": 680, "current_a": 0.013235294117647059}, "prompt_sha1": "bfc964c792561f80c20e2dc00f6b7cdcf79dcece", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_24_5064` converting a 24-bit binary input `bin` to 24-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_24_5064 (\n input logic [23:0] bin,\n output logic [23:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_24_5064", "width": 24}, "prompt_sha1": "c76deeabcef501cfa4fa3d27ff963d12392e9441", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 128. Using occupancy formula `(head-tail) mod capacity`, with head index 111 and tail index 116, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (111-116) mod 128 = 123. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 128 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 128, "head": 111, "tail": 116, "occupancy": 123}, "prompt_sha1": "ab9cc1942b70e0262afe8094211d2f0b8d198a31", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 496, and period is 36417 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(496×36417) = 8.857969 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 496, "period": 36417, "hz": 8.857968672907992}, "prompt_sha1": "7d9a4f2492b9a2ef8d43f2094db6c84d50fe20b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 78 and initial occupancy is 35. In an abstract batch, producer attempts to enqueue 180 items first, dropping any excess beyond capacity; then consumer removes up to 71 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=78, dropped=137; consumed=71; final occupancy=7.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 78, "start": 35, "prod": 180, "cons": 71, "dropped": 137, "consumed": 71, "final": 7}, "prompt_sha1": "3adf85af6692c3e1bbcbf001648339a912dbe13b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 4. Apply operations ['V', 'V', 'V', 'V', 'V', 'V', 'V', 'P', 'V', 'P', 'V', 'P', 'V', 'V', 'P', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 11 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 4, "ops": ["V", "V", "V", "V", "V", "V", "V", "P", "V", "P", "V", "P", "V", "V", "P", "P", "P", "V", "V"], "value": 11, "blocked": 0}, "prompt_sha1": "eff98833d30b16716ceac90b9517a35ea114958c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 22-bit up/down counter `updown_22_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_22_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [21:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_22_wrap", "width": 22, "wrap": true}, "prompt_sha1": "d44f27ff06142305e4232d800ca04879087c8285", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 9-bit data word is 101010001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 4 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101010001", "ones": 4, "parity": 0}, "prompt_sha1": "65717a5eb91d3b015addfaa0efd647466bd6e75f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_412225` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_412225 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_412225"}, "prompt_sha1": "6be91ecd0afa0511b99096fca8e97e34ccafaeb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 80 MHz, prescaler divisor is 884, and period is 5128 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 80000000/(884×5128) = 17.647765 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 80000000, "prescaler": 884, "period": 5128, "hz": 17.647764734118777}, "prompt_sha1": "1f0b5076b26e65d8a605e43d675f889a67bf5322", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 70%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.100×(6+0.300×100) = 5.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.9, "l2": 6, "l2_hit": 0.7, "mem": 100, "amat": 5.6}, "prompt_sha1": "6ea4cc19821db075f77af294a7f513ad2c34a489", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 5% of instructions, the branch misprediction rate is 8%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.050 × 0.080 × 2 = 0.008000.\nEffective CPI = 1 + 0.008000 = 1.008000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.05, "mispred": 0.08, "penalty": 2, "result": 1.008}, "prompt_sha1": "9ba69312902dcbff1fd1af9c101c0b601f58d3e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6869-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6869×8 = 54952 bits.\nSerialization delay = bits/rate = 54952/(10000×10^6) s = 5.4952e-06 s = 5.495200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6869, "rate_mbps": 10000, "delay_s": 5.4952e-06}, "prompt_sha1": "a84ba1bb6f22151dce493a1a8c5401036696f19f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_24_7999` implementing a 2-to-1 multiplexer for two 24-bit inputs `a` and `b`, select `sel`, and 24-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_24_7999 (\n input logic [23:0] a,\n input logic [23:0] b,\n input logic sel,\n output logic [23:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_24_7999"}, "prompt_sha1": "595c7e16329a6dc2e253462148ee6a01a335addf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 10101111110010001 using generator polynomial bits 100010111. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 11100001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 279, "msg_bits": 17, "msg": 90001, "remainder": 225}, "prompt_sha1": "64911c59514f7ec43ecee9905e556a29da7980da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_10` for a synchronous sampled input `noisy`. Update output `clean` only after observing 10 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_10 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 9) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_10", "stable_samples": 10}, "prompt_sha1": "e618e658925b5b30b4e0ed3a9ab6934c4dea8526", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 6-bit up/down counter `updown_6_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_6_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [5:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_6_wrap", "width": 6, "wrap": true}, "prompt_sha1": "4d43d47189cdd5cda6f0f32e8e1505044323bbc8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_18_43_2` with RED, GREEN, YELLOW states. Hold RED for 18 clock cycles, GREEN for 43, and YELLOW for 2; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_18_43_2 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 17) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 42) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 1) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_18_43_2", "red": 18, "green": 43, "yellow": 2}, "prompt_sha1": "e84a20020cf27489d91a87a488d1dfa33fa0032b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w32_1048` implementing a dual-clock asynchronous FIFO with depth 8 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w32_1048 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 32,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w32_1048", "depth": 8, "width": 32, "ptr_w": 3}, "prompt_sha1": "92ba812a23b06c05cbc870ace46303c679681c37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_53_lsb` for `53-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_53_lsb (\n input logic [52:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 52; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_53_lsb", "width": 53, "priority": "low"}, "prompt_sha1": "e2708e9ec0eb28a76e399e169472a6bff7d2e6a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=22 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×22/(22+22) = 2.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 22, "r2": 22, "vout": 2.5}, "prompt_sha1": "6f82dd5b6c5f8f9362416b9788287c5f771f4c3b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_66_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 66 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_66_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd66;\n end else begin\n if (pulse_in)\n count <= 7'd66;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_66_retrig", "cycles": 66, "retrigger": true}, "prompt_sha1": "7f5e1d0fbddfc2ea58fe494b20a6adfe7799d0c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 96 payload bytes plus 28 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 96/(96+28) = 0.774194 = 77.42%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 96, "overhead": 28, "efficiency": 0.7741935483870968}, "prompt_sha1": "93e59e4f9a9d3480fbda49f986a33e874939a93b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x4F, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x4F<<1)|1 = 0x9F = 10011111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 79, "rw": 1, "byte": 159}, "prompt_sha1": "57eb663dd92988abd44cf683dc8bb4f5142a30e6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1450 bytes, IP header 20 bytes, and TCP header 60 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1450-20-60 = 1370 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1450, "iphdr": 20, "tcphdr": 60, "mss": 1370}, "prompt_sha1": "d732146eaba1f661cfc3e9dfd7deb213501afbd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 4 on a 3 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×4/(3×10^9) = 0.0266666667 s = 26.666667 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 4.0, "ghz": 3.0, "sec": 0.02666666666666667}, "prompt_sha1": "309dc303aa113c9f1dcdf52c4970741ebb2c1437", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=47 nF and is stepped to 1.8 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=1.8(1-e^-4)=1.767032 V; τ=4.7e-05 s and t=0.000188 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 4.7000000000000004e-08, "multiple": 4, "vin": 1.8, "vc": 1.7670318500002784}, "prompt_sha1": "f7761dca3e1a091931f30b05fa38662542f1fafb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 48 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 921600 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 48000000/(16×921600) = 3.255208.\nNearest integer divisor D = 3.\nActual baud = 48000000/(16×3) = 1000000.000 baud.\nError = (1000000.000-921600)/921600×100% = 8.5069%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 48000000, "oversample": 16, "baud": 921600, "divisor": 3, "actual": 1000000.0, "error_pct": 8.506944444444445}, "prompt_sha1": "c24f0b5f0c0210e6d8c53d53037735c1b80e5cfd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x12_write_bypass` with 32 entries of 12 bits. Inputs: `clk`, `we`, `5-bit waddr`, `12-bit wdata`, `5-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [11:0] wdata,\n input logic [4:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x12_write_bypass", "entries": 32, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "2f8783f908500e2246f1a916308275fa947d3983", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x8_no_bypass` with 128 entries of 8 bits. Inputs: `clk`, `we`, `7-bit waddr`, `8-bit wdata`, `7-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [7:0] wdata,\n input logic [6:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x8_no_bypass", "entries": 128, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "737cd61eb8c2c29fadf52aa1e40fa80515c242b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 95%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.100×(15+0.050×100) = 3.000000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.9, "l2": 15, "l2_hit": 0.95, "mem": 100, "amat": 3.0}, "prompt_sha1": "c9b5850a3ea34a2bfc2bc7180c15cb2194572397", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 2 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 2×10^6 / (9000×8) = 27.777778 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 2, "frame_bytes": 9000, "pps": 27.77777777777778}, "prompt_sha1": "67783cbd1eb0b9f69c03b70846a2a716fd6da89b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 8 bytes per beat at 20 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×20×10^6 = 160000000 B/s. Time = 16384/160000000 = 0.0001024 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 8, "rate_mhz": 20, "sec": 0.0001024}, "prompt_sha1": "d3c3444caa3854696474c5ae4ca4798e92cbf792", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11010100101000101010001 using generator polynomial bits 111000001. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01000001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 449, "msg_bits": 23, "msg": 6967633, "remainder": 65}, "prompt_sha1": "c32bffbb5999afd1d4e36f52c4f9243b38917424", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_8_2554` implementing a 2-to-1 multiplexer for two 8-bit inputs `a` and `b`, select `sel`, and 8-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_8_2554 (\n input logic [7:0] a,\n input logic [7:0] b,\n input logic sel,\n output logic [7:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_8_2554"}, "prompt_sha1": "4db03c249934f1e0080b5d758419a9efb7a5c04e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 144 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 144000000/400 = 360000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 360000 that also keeps the period count within 16 bits is 8000.\nPeriod count = 360000/8000 = 45.\nPSC register = 8000-1 = 7999.\nARR register = 45-1 = 44.\nVerification: 144000000/(8000×45) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 144000000, "target_hz": 400, "total_division": 360000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 8000, "period": 45, "psc_reg": 7999, "arr_reg": 44}, "prompt_sha1": "71fd564e9a03becd3d54bef39991075d00bbbb9e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=47 kOhm, and Vin=0.1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -47/10 = -4.700000.\nVout = A_v×Vin = -4.700000×0.1 = -0.470000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 47, "vin": 0.1, "gain": -4.7, "vout": -0.47000000000000003}, "prompt_sha1": "4e181fb5fae766a295cf5dad529ceb93dd99c4f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=470 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/470 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 470, "tau": 1e-05}, "prompt_sha1": "194bb1ee1f1104251917de77e5ef98d44e8da17a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x16_no_bypass` with 128 entries of 16 bits. Inputs: `clk`, `we`, `7-bit waddr`, `16-bit wdata`, `7-bit raddr`; output `16-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x16_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [15:0] wdata,\n input logic [6:0] raddr,\n output logic [15:0] rdata\n);\n logic [15:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x16_no_bypass", "entries": 128, "width": 16, "mode": "no_bypass"}, "prompt_sha1": "cfd632e5aee1aeb83290f94ec0f8c8687822b5fa", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 17-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^17 V = 4.57763671875e-05 V = 45.776367 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 17, "vref": 6.0, "step": 4.57763671875e-05}, "prompt_sha1": "e91812bf77cf186971fb692a285f6267531b6677", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_56_msb` for `56-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_56_msb (\n input logic [55:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 56; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_56_msb", "width": 56, "priority": "high"}, "prompt_sha1": "fec276ababc6943d6f2a8a5bd2509a5cdb6e938c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 100 Mbit/s and RTT 300 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 100×10^6×300/1000/8 = 3750000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 100, "rtt_ms": 300, "bytes": 3750000.0}, "prompt_sha1": "a89733ac9f0642521c7a5f2d5da24c51d7b9e377", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_2244` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_2244 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_2244", "width": 8}, "prompt_sha1": "888a3e6c7f4e910d24111ef282cd479c027164b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w53_unsigned` comparing two 53-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w53_unsigned (\n input logic [52:0] a,\n input logic [52:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w53_unsigned", "width": 53, "signed": false}, "prompt_sha1": "c1419838f514146ec5caca4be2537723867dcba4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock QUEUE then CACHE; consumer acquires CACHE then QUEUE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds QUEUE while waiting for CACHE, while consumer holds CACHE while waiting for QUEUE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before QUEUE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "6bfd84b2de2859a4781417f2995b25575f27ea1e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 13; x = x + 278;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 13+278 = 291. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (291) mod 2^8 = 35. So `x` stores 35. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 13, "add": 278, "result": 35}, "prompt_sha1": "65307016ffa8d5cbc585814c662885ca5d9e4b5a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 3 on a 2.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×3/(2.5×10^9) = 0.06 s = 60.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 3.0, "ghz": 2.5, "sec": 0.06}, "prompt_sha1": "e2d184a310b6d3d2d147cb4032a2edeaabc75929", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x6A, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x6A<<1)|0 = 0xD4 = 11010100.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 106, "rw": 0, "byte": 212}, "prompt_sha1": "61d9b3c85bfa3d42759501bb835ad85af7f80016", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=39000 ohm and C=150000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=39000×150000×10^-12 s = 0.00585 s.\nf_c=1/(2πRC)=1/(2π×39000×150000×10^-12) = 27.2060 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 39000, "c_f": 1.5e-07, "tau": 0.00585, "fc": 27.205973178101768}, "prompt_sha1": "af61f085b1c02d64ad8ade7de53ba225ef72c749", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.2 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 20 ns and L2 local hit rate is 90%. An L2 miss adds 100 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.2 + 0.080×(20+0.100×100) = 3.600000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.2, "l1_hit": 0.92, "l2": 20, "l2_hit": 0.9, "mem": 100, "amat": 3.5999999999999988}, "prompt_sha1": "6c9f3b0691eb2769666536443e31c29252d210ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 1.2 on a 1.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×1.2/(1.2×10^9) = 0.05 s = 50.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 1.2, "ghz": 1.2, "sec": 0.05}, "prompt_sha1": "9a3d14b599379eafeed606ecd64aba6ebc1dadad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 20 Mbit/s using fixed 9000-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 20×10^6 / (9000×8) = 277.777778 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 20, "frame_bytes": 9000, "pps": 277.77777777777777}, "prompt_sha1": "162d1d8c9a9908428764acdb702811794e0bc8a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=47 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×22/(47+22) = 1.052174 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 47, "r2": 22, "vout": 1.0521739130434782}, "prompt_sha1": "5bdfc17ff9156b559660d1f5992c217af74f2b5d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×0.1/1000/8 = 62500.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 0.1, "bytes": 62500.0}, "prompt_sha1": "758204182ca2ababb29756fe42975f9e26ecc2b0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 66 and initial occupancy is 38. In an abstract batch, producer attempts to enqueue 90 items first, dropping any excess beyond capacity; then consumer removes up to 172 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=66, dropped=62; consumed=66; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 66, "start": 38, "prod": 90, "cons": 172, "dropped": 62, "consumed": 66, "final": 0}, "prompt_sha1": "3338cf79e48632bfdebe01ca3c84805abceec967", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 20%, and each misprediction costs 8 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.200 × 8 = 0.240000.\nEffective CPI = 1.2 + 0.240000 = 1.440000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.2, "penalty": 8, "result": 1.44}, "prompt_sha1": "c3566a2e98c305157309d5fb9e5a2fe5a0b387ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 12-bit ADC uses a 5 V reference and returns code 1991. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^12-1 = 4095.\nV = 1991/4095 × 5 V = 2.431013 V.\nThus the estimated input is about 2.4310 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 12, "vref": 5.0, "code": 1991, "volts": 2.431013431013431}, "prompt_sha1": "03d64dea24178a2f1d118725de5a37b52c0c90bf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_8579(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_8579(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_8579([1, 2]) == 1.5\nassert mean_8579([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_8579"}, "prompt_sha1": "083350142252ee042b45ef14ca47077dc580dbf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 10 Mbit/s and RTT 60 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 10×10^6 × 60/1000 = 600000 bits = 75000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 10, "rtt_ms": 60, "bits": 600000.0, "bytes": 75000.0}, "prompt_sha1": "338a172f6a2575076762c4c1816d0e49c15dfb2d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 192 counts per period. What compare/high-time count produces exactly 12.5% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.125 × 192 = 24. Verification: 24/192 = 0.125, which is 12.5%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 192, "duty": 12.5, "high": 24}, "prompt_sha1": "6c01bcd930dfad68671ace3d05847b6eea09b7ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 9 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 9 = 12.\nClock pulses = 12×9 = 108.\nTime = 108/1000000 s = 108.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 9, "clocks": 108, "time_s": 0.000108}, "prompt_sha1": "42de2a687c0c6bca881b6ef889126d185af2ea7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=100 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/100 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 100, "tau": 0.01}, "prompt_sha1": "30b4d484c0a1a66a20ea6a2b7ad83bf8ee59a7e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.143.118.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.143.118.0\nBroadcast address: 10.143.118.31\nUsable host range: 10.143.118.1 to 10.143.118.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.143.118.0/27", "usable": 30, "first": "10.143.118.1", "last": "10.143.118.30", "broadcast": "10.143.118.31"}, "prompt_sha1": "e6e2c3784e44d0e57071d87799c2231dd3d05404", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 216 MHz and must generate an exact 50 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 2048. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 216000000/50 = 4320000.\nWith prescaler divisor limited to at most 2048, the largest divisor of 4320000 that also keeps the period count within 16 bits is 2000.\nPeriod count = 4320000/2000 = 2160.\nPSC register = 2000-1 = 1999.\nARR register = 2160-1 = 2159.\nVerification: 216000000/(2000×2160) = 50 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 216000000, "target_hz": 50, "total_division": 4320000, "max_prescaler": 2048, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 2000, "period": 2160, "psc_reg": 1999, "arr_reg": 2159}, "prompt_sha1": "d65fe88303558841ca170906ea1b9122a17cbb83", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 14 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 14 = 16.\nClock pulses = 16×9 = 144.\nTime = 144/400000 s = 360.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 14, "clocks": 144, "time_s": 0.00036}, "prompt_sha1": "182b9373e4148e4068c4cdae95b35ba1b1470cac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 8 and tail index 5, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (8-5) mod 32 = 3. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 8, "tail": 5, "occupancy": 3}, "prompt_sha1": "f3a53b4f66978c57ef46aebd7c71057ce3c91d07", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 38-bit virtual address space with 65536 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^38/2^16 = 2^22 = 4194304 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 38, "page_exp": 16, "entries": 4194304}, "prompt_sha1": "33c82aae5de1c91d89e7b0ca97b763f55d70d270", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_1577(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_1577(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_1577([1, 2]) == 1.5\nassert mean_1577([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_1577"}, "prompt_sha1": "68f3bfd15edd5b3cf3709937ccf6d1f029dd9734", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 230400 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 44 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 44×9 = 396. Time = 396/230400 = 0.00171875 s = 1.718750 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 230400, "data": 5, "parity": 1, "stop": 2, "frames": 44, "seconds": 0.00171875}, "prompt_sha1": "d1b0eee6450fe7ae7dd992ecd194efc047770256", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 354 and tail index 235, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (354-235) mod 1024 = 119. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 354, "tail": 235, "occupancy": 119}, "prompt_sha1": "16a3ba450ffc2a682ccb26506434fd1bc98f4bcd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=220 nF and is stepped to 5 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=5(1-e^-2)=4.323324 V; τ=0.000484 s and t=0.000968 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 2.2e-07, "multiple": 2, "vin": 5, "vc": 4.323323583816936}, "prompt_sha1": "f5b732a356318d55a285a66acc698237cdf5e7e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 8 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×8 KiB = 768 KiB = 786432 bytes = 0.750000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 8, "reach": 786432}, "prompt_sha1": "52d04a730893908400415d7ff40e92cd19b0ba9a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_33` for a 33-bit unsigned input `data`, `6-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_33 (\n input logic [32:0] data,\n input logic [5:0] shamt,\n output logic [32:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_33", "width": 33, "direction": "right", "arithmetic": false}, "prompt_sha1": "f2074764e79e3478f86c27066b3ed3d16acdffe7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 18 and tail index 8, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (18-8) mod 32 = 10. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 18, "tail": 8, "occupancy": 10}, "prompt_sha1": "ca7e103ba2bf1be1ce41a07731ce888383ceca86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 3` on one shared integer without synchronization. Assume `credits` initially equals 31. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 31; T2 reads 31; both compute 34; T1 writes 34; T2 writes 34. The observed final value is 34, but two serial increments would produce 37.\n\n```\nlock(mutex)\ncredits = credits + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "046ea1db1c0eaae9d70f72212e96584e3accc940", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 2747179469, carries 60405 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 60405+1+1 = 60407. ACK = (2747179469+60407) mod 2^32 = 2747239876.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 2747179469, "payload": 60405, "syn": 1, "fin": 1, "ack": 2747239876}, "prompt_sha1": "f2b0d672e09c11a26095f97f99f1e32030fa47e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 79.5 cycles and conversion consumes 20 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 79.5+20 = 99.5. Period = 99.5/16000000 = 6.21875e-06 s. Maximum rate = 1/period = 160804.020101 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 79.5, "conv_cycles": 20, "period": 6.21875e-06, "rate": 160804.0201005025}, "prompt_sha1": "4d76e6eb6b43d5bd5865a1e81110cec47a9ec5ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_2363(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_2363(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_2363([1, 2]) == 1.5\nassert mean_2363([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_2363"}, "prompt_sha1": "f45111ce29e877d648ff56919bcee5d2979e3582", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_15_22_12` with RED, GREEN, YELLOW states. Hold RED for 15 clock cycles, GREEN for 22, and YELLOW for 12; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_15_22_12 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 14) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 21) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 11) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_15_22_12", "red": 15, "green": 22, "yellow": 12}, "prompt_sha1": "ec8e4d571eef64db82f293af4b009de3176ea1e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=3 ms,T=20 ms, C=5 ms,T=20 ms, C=1 ms,T=5 ms, C=4 ms,T=5 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 3/20 + 5/20 + 1/5 + 4/5 = 1.400000 = 140.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[3, 20], [5, 20], [1, 5], [4, 5]], "utilization": 1.4000000000000001}, "prompt_sha1": "e344d3ce233e156cb8faa58c44440ec2cd3f0d60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 5208-byte frame is serialized onto a 25000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 5208×8 = 41664 bits.\nSerialization delay = bits/rate = 41664/(25000×10^6) s = 1.66656e-06 s = 1.666560 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 5208, "rate_mbps": 25000, "delay_s": 1.66656e-06}, "prompt_sha1": "1a1e54a2d8d5117edad74997c1bd1234264e3027", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.141.147.0/28, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.240\nNetwork address: 10.141.147.0\nBroadcast address: 10.141.147.15\nUsable host range: 10.141.147.1 to 10.141.147.14\nTotal addresses = 2^(32-28) = 16; usable hosts = 16-2 = 14.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.141.147.0/28", "usable": 14, "first": "10.141.147.1", "last": "10.141.147.14", "broadcast": "10.141.147.15"}, "prompt_sha1": "added8b895c494d00a5d1b8ec09730c834ee9763", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0xB4. Extract the 4-bit field starting at bit 2 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0xB4 >> 2) & 0xF = 0xD (13).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 2, "value": 180, "mask": 15, "field": 13}, "prompt_sha1": "6b21fb6000d10c6d18afca7c4e1f5e552057943a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x5B, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x5B<<1)|1 = 0xB7 = 10110111.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 91, "rw": 1, "byte": 183}, "prompt_sha1": "1f1f178244a20d109e6e2fff512b0aed0c9a2b73", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "worker_1 acquires lock CACHE then DESC; task_B acquires DESC then CACHE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if worker_1 holds CACHE while waiting for DESC, while task_B holds DESC while waiting for CACHE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before DESC. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "1530c8d0061c8d240c49f2fc3b70116d154de00d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=2.2 kOhm, and Vin=1 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -2.2/10 = -0.220000.\nVout = A_v×Vin = -0.220000×1 = -0.220000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 2.2, "vin": 1.0, "gain": -0.22000000000000003, "vout": -0.22000000000000003}, "prompt_sha1": "b81fa3430b497d2c1ae09e78b9f6b0f5f2892454", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 95.8% hit rate, and a 85 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.958 = 0.042.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.042×85 ns = 8.0700 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.958, "penalty": 85, "result": 8.070000000000004}, "prompt_sha1": "c95148a7ccb9fc7b7d80b465384c76ad449a20af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 128 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 128×1024 KiB = 131072 KiB = 134217728 bytes = 128.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 128, "page_kib": 1024, "reach": 134217728}, "prompt_sha1": "9e3b95ac0997a0a5cd2476d4dd73c48afa2c3d60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 32 MHz CPU services an interrupt at 10000 Hz. Each ISR consumes 3489 CPU cycles. Ignoring queuing and interrupt interference, compute the idealized CPU-time demand as a percentage of one processor. If the demand exceeds 100%, identify the workload as overloaded rather than claiming achievable sustained CPU utilization.", "output": "Idealized CPU-time demand = 10000×3489/(32×10^6) = 1.0903125 = 109.031250%. This exceeds 100% of one processor: the workload is overloaded, and this is demanded capacity, not attainable sustained CPU utilization.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 32, "irq_hz": 10000, "cycles": 3489, "load": 1.0903125}, "prompt_sha1": "28b3cad92d929d8d74a95aa39504ce5c96d37ecd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916, "historical_prompt_sha1": "49380e013fc2df04b3d1d45e148fa3c7e5e94aea", "content_sha256_scheme": "rc1-v1:sha256(canonical-json:{generator_id,input,output})", "content_sha256": "db76e6cca7f3f0476e0a9ad8c7bed8c58f3c3099cc25fb2bfc4f679e5f952d53", "release_correction": {"kind": "isr_overload_terminology", "from_frozen_v5_sha256": "ac7f3071f9724dad72811fd4264e3780c35d44907cce10c176056afc32bd9729", "source_line": 7669, "original_row_sha256": "41c73a59d3047e7dc4c7e1bf4306f31faa660f4adee7f2a335b27ea8a8cda1dc", "version": "v1.0.0-rc1"}}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_37_lsb` for `37-bit in`. The lowest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_37_lsb (\n input logic [36:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 36; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_37_lsb", "width": 37, "priority": "low"}, "prompt_sha1": "d1cb84df6eb2b4a1ae2dd9c0822ae00d600fda1d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 24 MHz, prescaler divisor is 335, and period is 42628 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 24000000/(335×42628) = 1.680628 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 24000000, "prescaler": 335, "period": 42628, "hz": 1.680627546325798}, "prompt_sha1": "9d8c1ff9daf2d8873d9d4bf5535dee2fb8c69fdf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×512 KiB = 524288 KiB = 536870912 bytes = 512.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 512, "reach": 536870912}, "prompt_sha1": "ab25a1db22191f7fd1f0fef9825cfd20050098c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/47 = 2.12765957e-06 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 47, "tau": 2.1276595744680853e-06}, "prompt_sha1": "cd54a3c20009745b62be5d4e569226e00ba160c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_2611` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_2611 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_2611"}, "prompt_sha1": "84fe7cc32e61344c5a885f8f69ac9a67e5fefa34", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=4700 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=0.01034 s and t=0.01034 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 4.7e-06, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "f3cd6f1f2e2abfab7018e72c9294b8f8fdb49214", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 2 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 80%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 2 + 0.100×(12+0.200×50) = 4.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 2.0, "l1_hit": 0.9, "l2": 12, "l2_hit": 0.8, "mem": 50, "amat": 4.199999999999999}, "prompt_sha1": "7a2be940dbe416ee7b09c222ac9a4f34478631c8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=470 ohm, C=470 nF and is stepped to 9 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=9(1-e^-3)=8.551916 V; τ=0.0002209 s and t=0.0006627 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 470, "c": 4.7000000000000005e-07, "multiple": 3, "vin": 9, "vc": 8.551916384689225}, "prompt_sha1": "d7924fafeb64a26e71cdbd96c795d97c4cbc8f06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_4910` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_4910 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_4910"}, "prompt_sha1": "d364bd659ca0663cb283662493ee2b948c3b1022", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=100 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×100/(100+100) = 4.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 100, "r2": 100, "vout": 4.5}, "prompt_sha1": "cd45f197ae421de3b75fd63b0f4efcb90fa4af53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 15-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^15 V = 0.00018310546875 V = 183.105469 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 15, "vref": 6.0, "step": 0.00018310546875}, "prompt_sha1": "2e4532399b30c82244a9930ec1dcd26159c9fd84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 16 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 16×2048 KiB = 32768 KiB = 33554432 bytes = 32.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 16, "page_kib": 2048, "reach": 33554432}, "prompt_sha1": "7f6a51978e4eda1a1d02cc816cc4eb7bd3e0321d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 94%. On an L1 miss, L2 lookup costs 8 ns and L2 local hit rate is 97%. An L2 miss adds 120 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.060×(8+0.030×120) = 2.196000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.94, "l2": 8, "l2_hit": 0.97, "mem": 120, "amat": 2.1960000000000006}, "prompt_sha1": "8c66aba2d46110e128e754c2eafbf608dddc0aa7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=100 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×100/(100+100) = 1.650000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 100, "r2": 100, "vout": 1.65}, "prompt_sha1": "512cb89589807e77088a853162441290f416173e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2063-byte frame is serialized onto a 100 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2063×8 = 16504 bits.\nSerialization delay = bits/rate = 16504/(100×10^6) s = 0.00016504 s = 165.040000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2063, "rate_mbps": 100, "delay_s": 0.00016504}, "prompt_sha1": "d5d3ba6a7cded4ab80a00e4af1e82fb2856886c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 32 KiB cache with 64-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "0fdd4968ce3540565eb2d5992ecbdbedb1a613f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 2400 baud with 1 start bit, 9 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 18 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+9+1+2 = 13. Total bits = 18×13 = 234. Time = 234/2400 = 0.0975 s = 97.500000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 2400, "data": 9, "parity": 1, "stop": 2, "frames": 18, "seconds": 0.0975}, "prompt_sha1": "3366e0acf222b85922bc89396713cfa8125deb6b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 12-bit data word is 101110011010. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 7 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "101110011010", "ones": 7, "parity": 1}, "prompt_sha1": "5493d6b8b4e64ce6876faca7ad4e29ba7eb98c11", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 15% of instructions, the branch misprediction rate is 10%, and each misprediction costs 12 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.100 × 12 = 0.180000.\nEffective CPI = 1.2 + 0.180000 = 1.380000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.15, "mispred": 0.1, "penalty": 12, "result": 1.38}, "prompt_sha1": "49d42d3e99f92ec9d8eccf002bcfbfccbf4c473f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 32 data bits per transfer at 5600 MT/s across 1 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 32/8 = 4. Bandwidth = 4×5600×10^6×1 = 22.400000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 32, "rate_mt": 5600, "channels": 1, "gbps": 22.4}, "prompt_sha1": "f29e8079dc2b12c11593dbc1698d5373f54f7862", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 1 µF is charged to 100 V. Compute stored energy using E=½CV².", "output": "E=0.5×1e-06×100²=0.005 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 1e-06, "v": 100, "energy": 0.004999999999999999}, "prompt_sha1": "48eeb84c4e3e0c48fc2797be26115a91be74842e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 100 MHz, prescaler divisor is 544, and period is 28413 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 100000000/(544×28413) = 6.469698 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 100000000, "prescaler": 544, "period": 28413, "hz": 6.4696980048486505}, "prompt_sha1": "68f053a7134d30f3609db18494f74ec1d432f2f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 2 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×2/1000/8 = 1250.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 2, "bytes": 1250.0}, "prompt_sha1": "6862d6887a90e174b56070386396364fd17eca42", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/2.2 = 0.01 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 2.2, "tau": 0.009999999999999998}, "prompt_sha1": "5bc51410efd5d6d9d6ded8a9c90aac3a4d2f2f99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 50000 Mbit/s and RTT 30 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 50000×10^6 × 30/1000 = 1.5e+09 bits = 1.875e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 50000, "rtt_ms": 30, "bits": 1500000000.0, "bytes": 187500000.0}, "prompt_sha1": "9ff31eaa3420271196b9440ff2653ab9fd957b7c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 1460 payload bytes plus 44 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 1460/(1460+44) = 0.970745 = 97.07%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 1460, "overhead": 44, "efficiency": 0.9707446808510638}, "prompt_sha1": "63b521432c7f220e2d2e5a2933147f93dbd473c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=22 nF and is stepped to 1 V. Compute capacitor voltage after 1 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=1τ, Vc=1(1-e^-1)=0.632121 V; τ=0.00022 s and t=0.00022 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 2.2000000000000002e-08, "multiple": 1, "vin": 1, "vc": 0.6321205588285577}, "prompt_sha1": "d161f6b1bff6fa4812495e6aa3cc4552d98a3a06", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 23-bit ADC spanning 0 to 1.2 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 1.2/2^23 V = 1.43051147461e-07 V = 0.143051 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 23, "vref": 1.2, "step": 1.430511474609375e-07}, "prompt_sha1": "f2462746892a36a5168e57afa08c7126aaac09de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 1024 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 1024/(12×10^6) s = 85.333333 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 1024, "time_us": 85.33333333333334}, "prompt_sha1": "002ca08a825c8ecb83aba7bacffe6357d3e42bfb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 22554 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 22554/100000 s; frequency = 100000/22554 = 4.433803 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 22554, "hz": 4.433803316484881}, "prompt_sha1": "ba8e7565cba1186118c5edd30f619284ebf8ec38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['P', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["P", "V", "P", "P", "P", "P", "P", "V", "V", "P", "V", "V", "V", "V"], "value": 7, "blocked": 0}, "prompt_sha1": "fca70830ece78231ccf01132957c723056fc024e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w32_9165` implementing a dual-clock asynchronous FIFO with depth 8 and data width 32. Inputs: `clk_w`, `rst_w`, `wr_en`, `32`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `32`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w32_9165 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 32,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w32_9165", "depth": 8, "width": 32, "ptr_w": 3}, "prompt_sha1": "51d6e7d587e7f275a78fafcfcc9fa2c3f957d67b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.5 ns hit time, 99.3% hit rate, and a 160 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.993 = 0.007.\nAMAT = hit time + miss rate × miss penalty\n= 4.5 ns + 0.007×160 ns = 5.6200 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.5, "hit_rate": 0.993, "penalty": 160, "result": 5.620000000000001}, "prompt_sha1": "2ac52c8fd55b67b1c49bd678be16f145beb00715", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_9934` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_9934 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_9934", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "b1bd7057cf7585017ad8e23e28041b02f74eedad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 10 million instructions at average CPI 1.2 on a 0.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 10×10^6×1.2/(0.5×10^9) = 0.024 s = 24.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 10, "cpi": 1.2, "ghz": 0.5, "sec": 0.024}, "prompt_sha1": "831ca575ac729d2d221b654d12221466b6f2ecd4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 64 KiB cache with 64-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "35acc2e3d1c7d325b0713193f71399c975415ab0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_51` for a 51-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_51 (\n input logic [50:0] data,\n input logic [5:0] shamt,\n output logic [50:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_51", "width": 51, "direction": "left", "arithmetic": false}, "prompt_sha1": "2dd5de3bb83b00811bdc43399a81d1e1c5951ac6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 10000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 40000 Hz satisfies it.", "output": "Nyquist minimum is 2×10000 = 20000 Hz. Proposed rate 40000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 10000, "min_fs": 20000, "proposed": 40000}, "prompt_sha1": "fdb0db386c1b33f39fdffeadab0a4acc3d693e3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d32_w64_3815` implementing a dual-clock asynchronous FIFO with depth 32 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 5-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d32_w64_3815 #(\n parameter int DEPTH = 32,\n parameter int WIDTH = 64,\n parameter int PTR_W = 5\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d32_w64_3815", "depth": 32, "width": 64, "ptr_w": 5}, "prompt_sha1": "82747bbcabbe8cde40989950ea50942b180cee23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 680 ohm and 82 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (680×82)/(680+82) = 73.175853 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 680, "r2": 82, "req": 73.1758530183727}, "prompt_sha1": "0daa950607f5e8bd682adeed1bc8ad2ffff1f959", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=4.7 nF and is stepped to 9 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=9(1-e^-4)=8.835159 V; τ=4.7e-05 s and t=0.000188 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 4.700000000000001e-09, "multiple": 4, "vin": 9, "vc": 8.835159250001393}, "prompt_sha1": "d881bffc6b8d609de2e25817dc0ff23660933d23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_108_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 108 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_108_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd108;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_108_ignore", "cycles": 108, "retrigger": false}, "prompt_sha1": "6b5437d743ff80356c11b8b51eaf44d949882adf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 21-bit ADC spanning 0 to 6 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 6/2^21 V = 2.86102294922e-06 V = 2.861023 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 21, "vref": 6.0, "step": 2.86102294921875e-06}, "prompt_sha1": "c44834dda29a0f16d9fff6d82f9e7e6f9f548131", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 43-bit up/down counter `updown_43_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_43_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [42:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 43'd8796093022207) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_43_sat", "width": 43, "wrap": false}, "prompt_sha1": "79b7c762425030cb3932d8fb4223c83267b73073", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "task_A acquires lock BUF then CACHE; worker_2 acquires CACHE then BUF. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if task_A holds BUF while waiting for CACHE, while worker_2 holds CACHE while waiting for BUF; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire BUF before CACHE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "52dc586b714b1cecd0d744378c11bb0a9cce494f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 10000000 Hz. Consecutive rising edges are 26846 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 26846/10000000 s; frequency = 10000000/26846 = 372.494971 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 10000000, "delta": 26846, "hz": 372.49497131788723}, "prompt_sha1": "9a94371340b473cf92579aa77e5b4c3766273cdc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 820 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×820)/(4700+820) = 698.188406 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 820, "req": 698.1884057971015}, "prompt_sha1": "b90acd0a434c88f5e92ea1daa50f27e607bf06a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 8-bit register has value 0x35. Extract the 4-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 4 bits = (1<<4)-1 = 0xF.\nfield = (0x35 >> 4) & 0xF = 0x3 (3).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 8, "field_width": 4, "lsb": 4, "value": 53, "mask": 15, "field": 3}, "prompt_sha1": "df5c90836688259f9cad234d80d6b173f935a917", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 47-bit virtual address space with 32768 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^47/2^15 = 2^32 = 4294967296 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 47, "page_exp": 15, "entries": 4294967296}, "prompt_sha1": "7ff5a0a36c9381645b72e7ba617a21d6d52ef31e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w10_signed` comparing two 10-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w10_signed (\n input logic signed [9:0] a,\n input logic signed [9:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w10_signed", "width": 10, "signed": true}, "prompt_sha1": "8ea24c6ce1be1c308474e13e86c7f6913ece6c46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 96 payload bytes plus 20 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 96/(96+20) = 0.827586 = 82.76%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 96, "overhead": 20, "efficiency": 0.8275862068965517}, "prompt_sha1": "67c8cd34a281420d4719bea73a83f94c749eeda6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=1000 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 1000×10^-3/1000 = 0.001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 1.0, "r": 1000, "tau": 0.001}, "prompt_sha1": "f0389958d35ddadfaa6f98cb52994912c0f6992f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 4000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 2000 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 2000-24 = 1976 bytes.\nRound down to an 8-byte multiple: floor((1976)/8)×8 = 1976 bytes.\nFragments required = ceil(4000/1976) = 3.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 2000, "header": 24, "payload": 4000, "max_payload": 1976, "fragments": 3}, "prompt_sha1": "abcfe22133cbe303e32da737adfe24e7de0b0612", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11010110100110010 using generator polynomial bits 10111001. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1000101.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 185, "msg_bits": 17, "msg": 109874, "remainder": 69}, "prompt_sha1": "0ea1fd5913983cb6009ee77865dd3fe7cd72bd60", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 4 MHz, prescaler divisor is 1005, and period is 33414 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 4000000/(1005×33414) = 0.119115 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 4000000, "prescaler": 1005, "period": 33414, "hz": 0.11911472743423601}, "prompt_sha1": "6d85be29c6876c3ad825a61732965ec6cad2df91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 192 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 192×512 KiB = 98304 KiB = 100663296 bytes = 96.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 192, "page_kib": 512, "reach": 100663296}, "prompt_sha1": "724fe9aaea11d28c32010ac93a19dbcdf3ce89de", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x47F2. Extract the 3-bit field starting at bit 8 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 3 bits = (1<<3)-1 = 0x7.\nfield = (0x47F2 >> 8) & 0x7 = 0x7 (7).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 3, "lsb": 8, "value": 18418, "mask": 7, "field": 7}, "prompt_sha1": "00c2b6dfec57fa7057732ed9ab38cb1c5940a664", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 1048576 bytes over a datapath transferring 2 bytes per beat at 80 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 2×80×10^6 = 160000000 B/s. Time = 1048576/160000000 = 0.0065536 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 1048576, "width": 2, "rate_mhz": 80, "sec": 0.0065536}, "prompt_sha1": "ace198953d49733ece9648e8fdca7c20a52f015f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 7` on one shared integer without synchronization. Assume `credits` initially equals 303. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 303; T2 reads 303; both compute 310; T1 writes 310; T2 writes 310. The observed final value is 310, but two serial increments would produce 317.\n\n```\nlock(mutex)\ncredits = credits + 7\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "97165e8421864354df8cedf9d1cea887f859b7d8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 23.8 V source drives a 2200 ohm resistor in series with an LED whose forward voltage is assumed to be 2.2 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 23.8-2.2 = 21.6 V.\nI = V/R = 21.6/2200 A = 9.8182 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 23.8, "vf": 2.2, "r": 2200, "current_a": 0.00981818181818182}, "prompt_sha1": "254a56e421b5c9a2204a84fed4243fba9673235f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 36 MHz source using integer divider 4. Compute SCLK frequency.", "output": "SCLK = 36 MHz / 4 = 9.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 36000000.0, "divider": 4, "spi_hz": 9000000.0}, "prompt_sha1": "49a01b60c11eb087000bd9eaf2fa5db5fe8f4e4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 128 KiB cache with 32-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "cb58c7f634c75695f049f8d04439721f5a3f63b8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_46_msb` for `46-bit in`. The highest numbered asserted bit has priority. Output `6-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_46_msb (\n input logic [45:0] in,\n output logic [5:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 0; i < 46; i++) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_46_msb", "width": 46, "priority": "high"}, "prompt_sha1": "2f39b1b5d089217855eb8c43d77bb3afc787ed15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 2200 ohm has 1.8 V across it. Compute current and dissipated power.", "output": "I=V/R=1.8/2200=0.000818181818 A. P=V²/R=1.8²/2200=0.00147272727 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 1.8, "r": 2200, "i": 0.0008181818181818182, "p": 0.001472727272727273}, "prompt_sha1": "36c920031be1f138f9c104639fe6f7805f24cd53", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_44` for a synchronous sampled input `noisy`. Update output `clean` only after observing 44 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_44 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 43) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_44", "stable_samples": 44}, "prompt_sha1": "dfa4f9e2e4f5029f5191702c8ce0f5aa5eee7605", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 4700 µF is charged to 5 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0047×5²=0.05875 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 0.0047, "v": 5, "energy": 0.05875}, "prompt_sha1": "b3774120e5a08949b145352157ee2cce042742cb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1200 ohm and C=330000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1200×330000×10^-12 s = 0.000396 s.\nf_c=1/(2πRC)=1/(2π×1200×330000×10^-12) = 401.9064 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1200, "c_f": 3.3e-07, "tau": 0.00039600000000000003, "fc": 401.90642194923066}, "prompt_sha1": "b6b7950be9492d5b7754f45433e14f11f3339662", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 60 MHz source using integer divider 128. Compute SCLK frequency.", "output": "SCLK = 60 MHz / 128 = 0.468750 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 60000000.0, "divider": 128, "spi_hz": 468750.0}, "prompt_sha1": "8fd34bf7a9bf3e82f79fcb19d5f4a1e88d7590da", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_9_38_8` with RED, GREEN, YELLOW states. Hold RED for 9 clock cycles, GREEN for 38, and YELLOW for 8; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_9_38_8 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [5:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 8) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 37) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 7) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_9_38_8", "red": 9, "green": 38, "yellow": 8}, "prompt_sha1": "2f6c3fb5df98e71aacd5d4fea637a8b91e4f6451", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 64 MHz. Sampling consumes 160.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+10 = 170.5. Period = 170.5/64000000 = 2.6640625e-06 s. Maximum rate = 1/period = 375366.568915 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 64000000.0, "sample_cycles": 160.5, "conv_cycles": 10, "period": 2.6640625e-06, "rate": 375366.568914956}, "prompt_sha1": "6e7eefb149c8bcfd0ca2b35d760ed10fccff3009", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 922 elements. Review loop `for i in range(922-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(922-1)` produces indices 0 through 920, so index 921 is skipped. Correct loop: `for i in range(922):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 922, "variant": "miss_last"}, "prompt_sha1": "62c817ed2d8a6c37b67dcfa0c7ba9316c86f15e1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 5 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 12 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+1+2 = 9. Total bits = 12×9 = 108. Time = 108/19200 = 0.005625 s = 5.625000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 5, "parity": 1, "stop": 2, "frames": 12, "seconds": 0.005625}, "prompt_sha1": "b3cff194d7928b100aca8802e35ad37848e9ff6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 200 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 200 MHz / 256 = 0.781250 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 200000000.0, "divider": 256, "spi_hz": 781250.0}, "prompt_sha1": "32a53347abae61ffad4d911a61cff20c06fa90c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w46_unsigned` comparing two 46-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w46_unsigned (\n input logic [45:0] a,\n input logic [45:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w46_unsigned", "width": 46, "signed": false}, "prompt_sha1": "41b1a6ba1c4274eac42592457dc398e38cf990cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 16384 bytes over a datapath transferring 8 bytes per beat at 4 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 8×4×10^6 = 32000000 B/s. Time = 16384/32000000 = 0.000512 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 16384, "width": 8, "rate_mhz": 4, "sec": 0.000512}, "prompt_sha1": "3c3cc430a32d66a0693e7f776b33af6cfaa3daac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 100 and initial occupancy is 71. In an abstract batch, producer attempts to enqueue 11 items first, dropping any excess beyond capacity; then consumer removes up to 1 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=82, dropped=0; consumed=1; final occupancy=81.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 100, "start": 71, "prod": 11, "cons": 1, "dropped": 0, "consumed": 1, "final": 81}, "prompt_sha1": "65ead19aaf414effdaf6c6d5244a910f3e24f789", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=100 kOhm from Vin to Vout, and R2=2.2 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×2.2/(100+2.2) = 0.107632 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 100, "r2": 2.2, "vout": 0.10763209393346379}, "prompt_sha1": "ce25e3cccb2494c2b6253fc640f1d5467914e08c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock IO then CACHE; consumer acquires CACHE then IO. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds IO while waiting for CACHE, while consumer holds CACHE while waiting for IO; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire CACHE before IO. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "17e3abc8e43c26f2c1594f3757660b58e93001a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 500000 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 500000}, "prompt_sha1": "0701e8438604caf3327ca5e2bfdec89cd580f68a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=1000 ohm, C=100 nF and is stepped to 1.8 V. Compute capacitor voltage after 5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=5τ, Vc=1.8(1-e^-5)=1.787872 V; τ=0.0001 s and t=0.0005 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 1000, "c": 1.0000000000000001e-07, "multiple": 5, "vin": 1.8, "vc": 1.7878716954016463}, "prompt_sha1": "2cf0d82def9b3bf253227cbef840a9bf341135f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 862-byte frame is serialized onto a 5000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 862×8 = 6896 bits.\nSerialization delay = bits/rate = 6896/(5000×10^6) s = 1.3792e-06 s = 1.379200 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 862, "rate_mbps": 5000, "delay_s": 1.3792e-06}, "prompt_sha1": "302ad9c84abd6a52c41f91cc262ceca0c018d9ff", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 500 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 500×10^6 / (512×8) = 122070.312500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 500, "frame_bytes": 512, "pps": 122070.3125}, "prompt_sha1": "136343c11cb3ae73b75e375b8156d83f7393c8ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=4 ms,T=25 ms, C=2 ms,T=40 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 4/25 + 2/40 = 0.210000 = 21.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[4, 25], [2, 40]], "utilization": 0.21000000000000002}, "prompt_sha1": "7e308f829f86599f25187ff08f69b7d66455e31d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=1800 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=1800×12000×10^-12 s = 2.16e-05 s.\nf_c=1/(2πRC)=1/(2π×1800×12000×10^-12) = 7368.2844 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 1800, "c_f": 1.2e-08, "tau": 2.16e-05, "fc": 7368.284402402563}, "prompt_sha1": "cf88f91f8d77b84fb7f2dc1e4f147bf08c392f48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_5062` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_5062 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_5062", "width": 16}, "prompt_sha1": "f34d18bf400bfe8ce2fb1dbf915e7716b2503e8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 100 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/100=0.12 A. P=V²/R=12²/100=1.44 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 100, "i": 0.12, "p": 1.44}, "prompt_sha1": "ba5d68aef0f21eed3059a335624f69f1f247764b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x32_no_bypass` with 128 entries of 32 bits. Inputs: `clk`, `we`, `7-bit waddr`, `32-bit wdata`, `7-bit raddr`; output `32-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_128x32_no_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [31:0] wdata,\n input logic [6:0] raddr,\n output logic [31:0] rdata\n);\n logic [31:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x32_no_bypass", "entries": 128, "width": 32, "mode": "no_bypass"}, "prompt_sha1": "9c8d4fe5d28f373ccec3454a6c17f80cf277a153", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 62500 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 62500 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 62500.0}, "prompt_sha1": "b6632d4d24028e4663dde48a2266991d45ede003", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 6. Apply operations ['V', 'V', 'P', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'P', 'P', 'P', 'P', 'V', 'P', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 4 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 6, "ops": ["V", "V", "P", "V", "P", "V", "V", "V", "V", "P", "P", "P", "P", "P", "V", "P", "P", "P"], "value": 4, "blocked": 0}, "prompt_sha1": "beb9d3947d7dc6b593219398592ca91979fedc23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 682 elements. Review loop `for i in range(682-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(682-1)` produces indices 0 through 680, so index 681 is skipped. Correct loop: `for i in range(682):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 682, "variant": "miss_last"}, "prompt_sha1": "dfb8f8abc50f372aafb3301657b935c5d756c768", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=2.2 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/2.2 = 0.0213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 2.2, "tau": 0.021363636363636362}, "prompt_sha1": "4c2bba4db2210a9dd491529ab1345da55f9312b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 27-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^27/2^13 = 2^14 = 16384 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 27, "page_exp": 13, "entries": 16384}, "prompt_sha1": "540e0443ddca2e709ad3f6c670c368f1c0abc832", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 460800 baud with 1 start bit, 5 data bits, no parity bit, and 1 stop bit(s). How long does transmission of 37 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+5+0+1 = 7. Total bits = 37×7 = 259. Time = 259/460800 = 0.000562065972 s = 0.562066 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 460800, "data": 5, "parity": 0, "stop": 1, "frames": 37, "seconds": 0.0005620659722222223}, "prompt_sha1": "7145ef3e84359ec3b6e0e3e89444e8bf05a5c9c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `samples` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n total += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `samples[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n total += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "f93440a09aea1a1d8cbc5cc2c9ec4fcaacbb91f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_79` for a synchronous sampled input `noisy`. Update output `clean` only after observing 79 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_79 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 78) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_79", "stable_samples": 79}, "prompt_sha1": "80f489eca49b07f4a3e2d2d2b27c080acd372c57", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x8_no_bypass` with 32 entries of 8 bits. Inputs: `clk`, `we`, `5-bit waddr`, `8-bit wdata`, `5-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. There is no write-data bypass: the combinational read output is always `mem[raddr]`. Do not describe this mode as a guaranteed vendor-independent read-first memory primitive. Complete RTL only.", "output": "module regfile_32x8_no_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [7:0] wdata,\n input logic [4:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x8_no_bypass", "entries": 32, "width": 8, "mode": "no_bypass"}, "prompt_sha1": "34b21ee90b75c59e53ae847150912d700062d1d0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 2.048 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.048/2^13 V = 0.00025 V = 250.000000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 2.048, "step": 0.00025}, "prompt_sha1": "dfca791dd551c0b7e471a101258ee5c0e72b5cce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25 Mbit/s and RTT 10 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25×10^6 × 10/1000 = 250000 bits = 31250 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25, "rtt_ms": 10, "bits": 250000.0, "bytes": 31250.0}, "prompt_sha1": "8b4019efbc7049ef1a55960b166443e1cd615908", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.1. Branches are 15% of instructions, the branch misprediction rate is 10%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.100 × 3 = 0.045000.\nEffective CPI = 1.1 + 0.045000 = 1.145000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.1, "branch_frac": 0.15, "mispred": 0.1, "penalty": 3, "result": 1.145}, "prompt_sha1": "03953cb2c7fecfd5eec1cf4c2d6dc3863c0a903c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 58-bit right-shift register module `shiftreg_right_58`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `58-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_58 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [57:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[57:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_58", "width": 58, "direction": "right"}, "prompt_sha1": "380f129f29c56021152a904bf40ac992f940e1a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=220 ohm, C=1 nF and is stepped to 3.3 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=3.3(1-e^-3)=3.135703 V; τ=2.2e-07 s and t=6.6e-07 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 220, "c": 1e-09, "multiple": 3, "vin": 3.3, "vc": 3.135702674386049}, "prompt_sha1": "3c98f39bcd62e478dc3cc9542b9d602ad43a808c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 44-bit virtual address space with 262144 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^44/2^18 = 2^26 = 67108864 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 44, "page_exp": 18, "entries": 67108864}, "prompt_sha1": "c6fba780af1706b33d6f1d88b50cd3f616e1dbcf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 8 and all processes arrive at time 0 with CPU bursts [16, 22, 12, 18, 7]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [47, 73, 59, 75, 39].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 8, "bursts": [16, 22, 12, 18, 7], "finish": [47, 73, 59, 75, 39]}, "prompt_sha1": "84491328fdcbe8b611ea80ad9ec4c6a1e7074505", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 11381 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 11381/1000 s; frequency = 1000/11381 = 0.087866 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 11381, "hz": 0.08786574114752659}, "prompt_sha1": "4676d2f6c647ee8a3dbb38fb5128c8e9dae25792", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_246` generating a one-clock-cycle `tick` every 246 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_246 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 245) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_246", "divide": 246}, "prompt_sha1": "fc221e84bd8e1dcdf52995d457051260d2e97146", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 675 elements. Review loop `for i in range(675-1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(675-1)` produces indices 0 through 673, so index 674 is skipped. Correct loop: `for i in range(675):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 675, "variant": "miss_last"}, "prompt_sha1": "b2abb185ce21868d2f6ef0c610d2df0949013d8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_16_5720` converting a 16-bit binary input `bin` to 16-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_16_5720 (\n input logic [15:0] bin,\n output logic [15:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_16_5720", "width": 16}, "prompt_sha1": "4c5b024e14a6f4a0566acd6c4c09ac8eb5cfb373", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 994-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 994×8 = 7952 bits.\nSerialization delay = bits/rate = 7952/(1000×10^6) s = 7.952e-06 s = 7.952000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 994, "rate_mbps": 1000, "delay_s": 7.952e-06}, "prompt_sha1": "bc15a3612e698da54d58c2e56d893d3bb124420b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 200 MHz CPU services an interrupt at 500 Hz. Each ISR consumes 1231 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 500×1231/(200×10^6) = 0.0030775 = 0.307750%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 200, "irq_hz": 500, "cycles": 1231, "load": 0.0030775}, "prompt_sha1": "7fce14be6e3865a51db4689fa6285ddc61f2bf84", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 16 MHz. Sampling consumes 39.5 cycles and conversion consumes 10 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 39.5+10 = 49.5. Period = 49.5/16000000 = 3.09375e-06 s. Maximum rate = 1/period = 323232.323232 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 16000000.0, "sample_cycles": 39.5, "conv_cycles": 10, "period": 3.09375e-06, "rate": 323232.3232323233}, "prompt_sha1": "92d091a4f4dfe25a497872cd1098519dc3ec28b9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 25 Mbit/s and RTT 40 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 25×10^6 × 40/1000 = 1e+06 bits = 125000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 25, "rtt_ms": 40, "bits": 1000000.0, "bytes": 125000.0}, "prompt_sha1": "68f3d52359fec2a765b3168db1b80155bb760e23", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=1 ms,T=10 ms, C=2 ms,T=10 ms, C=2 ms,T=50 ms, C=4 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 1/10 + 2/10 + 2/50 + 4/25 = 0.500000 = 50.00%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[1, 10], [2, 10], [2, 50], [4, 25]], "utilization": 0.5}, "prompt_sha1": "9ab0bd1fded65fe832e433793be7e5b987a01302", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `entries` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= entries; ++i) {\n total += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `entries-1`, but `i <= entries` also executes at `i == entries` and accesses `samples[entries]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < entries; ++i) {\n total += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "821c0811e4176a46cdf6440148691a6579f78ee4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x70, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x70<<1)|1 = 0xE1 = 11100001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 112, "rw": 1, "byte": 225}, "prompt_sha1": "a125ba1590a4bc041c3a7816b116f034dbb2057d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11101100 using generator polynomial bits 1100011. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 010110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 99, "msg_bits": 8, "msg": 236, "remainder": 22}, "prompt_sha1": "407ad69276d96f9a3901afee33517ddd10c89dab", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_128x8_write_bypass` with 128 entries of 8 bits. Inputs: `clk`, `we`, `7-bit waddr`, `8-bit wdata`, `7-bit raddr`; output `8-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_128x8_write_bypass (\n input logic clk,\n input logic we,\n input logic [6:0] waddr,\n input logic [7:0] wdata,\n input logic [6:0] raddr,\n output logic [7:0] rdata\n);\n logic [7:0] mem [0:127];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_128x8_write_bypass", "entries": 128, "width": 8, "mode": "write_bypass"}, "prompt_sha1": "181c34d32d95637dfb054685db0e424c33a91999", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w19_signed` comparing two 19-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w19_signed (\n input logic signed [18:0] a,\n input logic signed [18:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w19_signed", "width": 19, "signed": true}, "prompt_sha1": "21bbdcc0039c1ec58ea1b2225f114ff9860d360a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 100 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 500 Hz satisfies it.", "output": "Nyquist minimum is 2×100 = 200 Hz. Proposed rate 500 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 100, "min_fs": 200, "proposed": 500}, "prompt_sha1": "752fe0097983fc7a5cab3743376e87b995695f30", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 15.3 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 1.7 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 15.3-1.7 = 13.6 V.\nI = V/R = 13.6/5600 A = 2.4286 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 15.3, "vf": 1.7, "r": 5600, "current_a": 0.002428571428571429}, "prompt_sha1": "41940c380a11831acd52a81809cdf53a2160e3b1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 4 and all processes arrive at time 0 with CPU bursts [2, 15, 20]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [2, 29, 37].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 4, "bursts": [2, 15, 20], "finish": [2, 29, 37]}, "prompt_sha1": "a5444765dd5134b1213e230e6c15446472dba07b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 1000 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/1000=0.009 A. P=V²/R=9²/1000=0.081 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 1000, "i": 0.009, "p": 0.081}, "prompt_sha1": "4b48d930961c94612e4bf5fe4e0fbca358f91e86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65377; x = x + 670;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65377+670 = 66047. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (66047) mod 2^16 = 511. So `x` stores 511. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65377, "add": 670, "result": 511}, "prompt_sha1": "d7559064bbe5b15f0c78fc53a1d186d7b182727c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w49_signed` comparing two 49-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w49_signed (\n input logic signed [48:0] a,\n input logic signed [48:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w49_signed", "width": 49, "signed": true}, "prompt_sha1": "e544b5c60cfcc3f4133413c9891ba645d31eb198", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 1000 counts per period. What compare/high-time count produces exactly 10% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.1 × 1000 = 100. Verification: 100/1000 = 0.1, which is 10%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 1000, "duty": 10, "high": 100}, "prompt_sha1": "99141e9d3bd539f2d6872a6c8165e84e6d898ee3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 54-bit virtual address space with 8192 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^54/2^13 = 2^41 = 2199023255552 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 54, "page_exp": 13, "entries": 2199023255552}, "prompt_sha1": "c62c2d938ad174d84f64f047fa17bf4baf9cf06e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 96 MHz CPU services an interrupt at 2000 Hz. Each ISR consumes 3674 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 2000×3674/(96×10^6) = 0.0765416667 = 7.654167%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 96, "irq_hz": 2000, "cycles": 3674, "load": 0.07654166666666666}, "prompt_sha1": "65d738542757816061ff6f5a033c94acf5e1021d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2641 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "d06eea3ac0c66a3c1290551cd30cedd16eeff6b6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 5000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 128. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/5000 = 24000.\nWith prescaler divisor limited to at most 128, the largest divisor of 24000 that also keeps the period count within 16 bits is 125.\nPeriod count = 24000/125 = 192.\nPSC register = 125-1 = 124.\nARR register = 192-1 = 191.\nVerification: 120000000/(125×192) = 5000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 5000, "total_division": 24000, "max_prescaler": 128, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 125, "period": 192, "psc_reg": 124, "arr_reg": 191}, "prompt_sha1": "f1465baa96f7d53d510abb0ec719355cc71b36d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 5 Mbit/s and RTT 0.1 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 5×10^6 × 0.1/1000 = 500 bits = 62.5 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 5, "rtt_ms": 0.1, "bits": 500.0, "bytes": 62.5}, "prompt_sha1": "334e1c2edea5b48be71f7084b08b11e262d8129e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 55-bit right-shift register module `shiftreg_right_55`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `55-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_55 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [54:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[54:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_55", "width": 55, "direction": "right"}, "prompt_sha1": "9411e7cba55e4f65919b42e64d1beeda1bd63f90", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47 ohm has 9 V across it. Compute current and dissipated power.", "output": "I=V/R=9/47=0.191489362 A. P=V²/R=9²/47=1.72340426 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 9, "r": 47, "i": 0.19148936170212766, "p": 1.7234042553191489}, "prompt_sha1": "42ceba3f45d9d1ecba0c1e7299803f28228368d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 56 bits wide and the system uses 2 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 2048 bytes = 2^11 bytes.\nOffset bits = 11.\nVPN bits = 56-11 = 45.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 56, "page_bytes": 2048, "offset_bits": 11, "vpn_bits": 45}, "prompt_sha1": "6bb92a980a6c54a88eaa0b2be2a133070f5f5e74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.226.45.0/27, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.224\nNetwork address: 10.226.45.0\nBroadcast address: 10.226.45.31\nUsable host range: 10.226.45.1 to 10.226.45.30\nTotal addresses = 2^(32-27) = 32; usable hosts = 32-2 = 30.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.226.45.0/27", "usable": 30, "first": "10.226.45.1", "last": "10.226.45.30", "broadcast": "10.226.45.31"}, "prompt_sha1": "506d8a24ed204040c040c1f0e2178c0cbca1f520", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `packets = packets + 3` on one shared integer without synchronization. Assume `packets` initially equals 94. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 94; T2 reads 94; both compute 97; T1 writes 97; T2 writes 97. The observed final value is 97, but two serial increments would produce 100.\n\n```\nlock(mutex)\npackets = packets + 3\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "f7abc9480f527016ee73917f860522cac7c9740f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 621 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 621/(621+40+8) = 0.928251 = 92.83%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 621, "iphdr": 40, "eff": 0.9282511210762332}, "prompt_sha1": "6db8969aeae63a867d9063f38121b7ea11e511a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 18 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 1000000 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 18000000/(4×1000000) = 4.500000.\nNearest integer divisor D = 4.\nActual baud = 18000000/(4×4) = 1125000.000 baud.\nError = (1125000.000-1000000)/1000000×100% = 12.5000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 18000000, "oversample": 4, "baud": 1000000, "divisor": 4, "actual": 1125000.0, "error_pct": 12.5}, "prompt_sha1": "a331e3c43046923a1fe11be5d4cf0f3be22f8edd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `credits = credits + 1` on one shared integer without synchronization. Assume `credits` initially equals 328. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 328; T2 reads 328; both compute 329; T1 writes 329; T2 writes 329. The observed final value is 329, but two serial increments would produce 330.\n\n```\nlock(mutex)\ncredits = credits + 1\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "e77a9f347ff620f608acb010a623ecfec28014e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 41217 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 41217/50000000 s; frequency = 50000000/41217 = 1213.091685 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 41217, "hz": 1213.091685469588}, "prompt_sha1": "aec6620372446ddee814e5611f641c2154bf5505", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 24-bit ADC spanning 0 to 2.5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 2.5/2^24 V = 1.49011611938e-07 V = 0.149012 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 24, "vref": 2.5, "step": 1.4901161193847656e-07}, "prompt_sha1": "e679970b97b8915a96fec24619836e20ce5eccd3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 110011110 using generator polynomial bits 1110001. Append 6 zeros and perform modulo-2 long division. Give the 6-bit remainder.", "output": "The modulo-2 division remainder is 001001.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 6, "poly": 113, "msg_bits": 9, "msg": 414, "remainder": 9}, "prompt_sha1": "2c7175b150b2a7644b9bcf1302b2acb53887645a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint16_t`, evaluate the stored result after `x = 65312; x = x + 527;`. The mathematical sum exceeds the maximum value representable by `uint16_t`. State the value stored back into `x` under conversion to the unsigned 16-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 65312+527 = 65839. Converting that result back to the unsigned 16-bit type reduces it modulo 2^16: (65839) mod 2^16 = 303. So `x` stores 303. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint16_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 16, "start": 65312, "add": 527, "result": 303}, "prompt_sha1": "0f3bb6448cca49362b074344dc2ebda84b2575fb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=470 mH and R=22 ohm, compute time constant τ=L/R.", "output": "τ = 470×10^-3/22 = 0.0213636364 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.47000000000000003, "r": 22, "tau": 0.021363636363636366}, "prompt_sha1": "a96c4afe40f95c70b161de94faf936dc94c39b77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `items`, an array of exactly `count` elements of type `uint32_t`:\n```c\nfor (size_t i = 0; i <= count; ++i) {\n acc += items[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `count-1`, but `i <= count` also executes at `i == count` and accesses `items[count]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < count; ++i) {\n acc += items[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b2c80d563815a20fbc1de0ef7ecd05b20605780a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 0.75 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×0.75/(2×10^9) = 0.001875 s = 1.875000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 0.75, "ghz": 2.0, "sec": 0.001875}, "prompt_sha1": "d81ca915749faff96e457bbfed82d48bc6e201a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock STATE then B; task_B acquires B then STATE. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds STATE while waiting for B, while task_B holds B while waiting for STATE; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before STATE. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "854db1eb527e1e779042a5e5c4f14c7f95fde179", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_137` generating a one-clock-cycle `tick` every 137 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_137 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 136) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_137", "divide": 137}, "prompt_sha1": "e3a9dc42d53a3f2816325c9f0c778a9ce33dd3a8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 2139-byte frame is serialized onto a 1000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 2139×8 = 17112 bits.\nSerialization delay = bits/rate = 17112/(1000×10^6) s = 1.7112e-05 s = 17.112000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 2139, "rate_mbps": 1000, "delay_s": 1.7112e-05}, "prompt_sha1": "0fc146f997417a581d968f6f97a7ab4d730332a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 64 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×64 KiB = 6144 KiB = 6291456 bytes = 6.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 64, "reach": 6291456}, "prompt_sha1": "341f7685587f6b876394854cbcd5be50e3f0fa45", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 3 V reference and returns code 378. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 378/1023 × 3 V = 1.108504 V.\nThus the estimated input is about 1.1085 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 3.0, "code": 378, "volts": 1.1085043988269794}, "prompt_sha1": "afc3d035760545b35a0f457c826ba2e71417dbf3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1 ns and L1 hit rate 99%. On an L1 miss, L2 lookup costs 15 ns and L2 local hit rate is 90%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1 + 0.010×(15+0.100×50) = 1.200000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.0, "l1_hit": 0.99, "l2": 15, "l2_hit": 0.9, "mem": 50, "amat": 1.2000000000000002}, "prompt_sha1": "d25ac2a64862fecb6a2e4053ab26505574edf3ad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_8_3926` converting a 8-bit binary input `bin` to 8-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_8_3926 (\n input logic [7:0] bin,\n output logic [7:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_8_3926", "width": 8}, "prompt_sha1": "95e6ce9bf0aa19cf0cb5abbeea6674823eb76cc1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 68 ohm and 1200 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (68×1200)/(68+1200) = 64.353312 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 68, "r2": 1200, "req": 64.35331230283911}, "prompt_sha1": "fe6620a3f3fd1af9023eab7827e084ed169f6c65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 64-bit up/down counter `updown_64_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_64_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [63:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_64_wrap", "width": 64, "wrap": true}, "prompt_sha1": "73c5f85ad3034ae7949601c56e3dd7d638154795", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 24-bit data word is 011011111100010100100110. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 13 ones. For even parity, the parity bit is 1, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "011011111100010100100110", "ones": 13, "parity": 1}, "prompt_sha1": "a5e8de8e26f11d8a8b956aa2e888bb276e42ffbf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w9_m215` with clk, asynchronous active-low rst_n, active-high enable, and output logic [8:0] count. On reset count=0. When enabled it increments until 215 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w9_m215 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [8:0] count\n);\n localparam logic [8:0] LIMIT = 9'd215;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w9_m215", "width": 9, "max": 215}, "prompt_sha1": "f8c6393a22388e7c655dc58b7504c4d255d25210", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 50000 Hz satisfies it.", "output": "Nyquist minimum is 2×50000 = 100000 Hz. Proposed rate 50000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50000, "min_fs": 100000, "proposed": 50000}, "prompt_sha1": "5e92f83992dc8555788964de82c8bfc4c7448598", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'V', 'P', 'P', 'P', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 2 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "V", "P", "P", "P", "P", "V"], "value": 2, "blocked": 0}, "prompt_sha1": "8175419cb64df330e41b0ffe909b215b3595c5e9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 29-bit left-shift register module `shiftreg_left_29`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `29-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_left_29 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [28:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {q[27:0], serial_in};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_left_29", "width": 29, "direction": "left"}, "prompt_sha1": "2eed3f5675f0c68bffd15282e7631f8aedcb8b1c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 1000 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 1000 Hz satisfies it.", "output": "Nyquist minimum is 2×1000 = 2000 Hz. Proposed rate 1000 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 1000, "min_fs": 2000, "proposed": 1000}, "prompt_sha1": "8302facc8553628ffe1276292098f6a67f4f1740", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_8x12_write_bypass` with 8 entries of 12 bits. Inputs: `clk`, `we`, `3-bit waddr`, `12-bit wdata`, `3-bit raddr`; output `12-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_8x12_write_bypass (\n input logic clk,\n input logic we,\n input logic [2:0] waddr,\n input logic [11:0] wdata,\n input logic [2:0] raddr,\n output logic [11:0] rdata\n);\n logic [11:0] mem [0:7];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_8x12_write_bypass", "entries": 8, "width": 12, "mode": "write_bypass"}, "prompt_sha1": "862e7558fa8f0091f38c096751cea8e902dcccdd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `words` elements of type `double`:\n```c\nfor (size_t i = 0; i <= words; ++i) {\n sum += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `words-1`, but `i <= words` also executes at `i == words` and accesses `data[words]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < words; ++i) {\n sum += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "28611b1280dabc575f13b36306777beaa461fc5f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNTTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on T; 2->T on T; 3->T on N.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 1, 1, 0], "final_state": 2}, "prompt_sha1": "48d8f5ed1f74933efb5ab86ece54cf8ef0af9880", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 80 MHz, prescaler divisor is 119, and period is 4688 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 80000000/(119×4688) = 143.402071 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 80000000, "prescaler": 119, "period": 4688, "hz": 143.40207072590127}, "prompt_sha1": "dbd614fa20271ed074ebfc3772be5c5b661f83f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_6_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 6 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_6_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [2:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 3'd6;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_6_ignore", "cycles": 6, "retrigger": false}, "prompt_sha1": "14fec4f13a973122edd1a403fa18f50a798f991a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w6_m53` with clk, asynchronous active-low rst_n, active-high enable, and output logic [5:0] count. On reset count=0. When enabled it increments until 53 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w6_m53 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [5:0] count\n);\n localparam logic [5:0] LIMIT = 6'd53;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w6_m53", "width": 6, "max": 53}, "prompt_sha1": "8f5b1f29e8c8d52bdf53c07a147d5f0c33a3b87c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 56-bit up/down counter `updown_56_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_56_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [55:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_56_wrap", "width": 56, "wrap": true}, "prompt_sha1": "a4331075a20cc9a99a3070cde396cf844014fa6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 31-bit up/down counter `updown_31_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_31_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [30:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 31'd2147483647) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_31_sat", "width": 31, "wrap": false}, "prompt_sha1": "907b2b549e79526186501be5f05b622865dd803b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_48_1196` implementing a 2-to-1 multiplexer for two 48-bit inputs `a` and `b`, select `sel`, and 48-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_48_1196 (\n input logic [47:0] a,\n input logic [47:0] b,\n input logic sel,\n output logic [47:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_48_1196"}, "prompt_sha1": "c1330d904f2e9263828997ff36f49b652840bd10", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 2 MHz, prescaler divisor is 225, and period is 23932 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 2000000/(225×23932) = 0.371423 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 2000000, "prescaler": 225, "period": 23932, "hz": 0.37142273478559623}, "prompt_sha1": "4e8242e4a4e3bf47f02e1deedb682e3e85864a63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_left_logic_41` for a 41-bit unsigned input `data`, `6-bit shamt`, and left logical shift output `y`. Complete RTL only.", "output": "module barrel_left_logic_41 (\n input logic [40:0] data,\n input logic [5:0] shamt,\n output logic [40:0] y\n);\n always_comb begin\n y = data << shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_left_logic_41", "width": 41, "direction": "left", "arithmetic": false}, "prompt_sha1": "2b36f7abc29b41ff1c05ce8220e11c96d5b4dc74", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 7154 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 7154/(7154+40+8) = 0.993335 = 99.33%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 7154, "iphdr": 40, "eff": 0.9933351846709247}, "prompt_sha1": "28f313ace6168773226e2c54e465329f42726ded", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x8FDCB5E3AEE9 in 6 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: E9 AE E3 B5 DC 8F.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 6, "value": 158178107174633, "endian": "little", "bytes": [233, 174, 227, 181, 220, 143]}, "prompt_sha1": "7b0583a7bac9eb0c715fc96b5cfd6617e962a26e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "os_concurrency", "subdomain": "data_race", "difficulty": "medium", "input": "Two threads concurrently execute `items = items + 2` on one shared integer without synchronization. Assume `items` initially equals 135. Show a read-modify-write interleaving that loses one update, give the incorrect final value, the correct serial final value, and a mutex-protected pseudocode fix.", "output": "The expression is a read-modify-write sequence. Example: T1 reads 135; T2 reads 135; both compute 137; T1 writes 137; T2 writes 137. The observed final value is 137, but two serial increments would produce 139.\n\n```\nlock(mutex)\nitems = items + 2\nunlock(mutex)\n```\nThe mutex makes the whole read-modify-write critical section mutually exclusive.", "metadata": {"generator_id": "lost_update", "reasoning_type": "causal_debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["lost update interleaving", "mutex protects full RMW"]}, "prompt_sha1": "40a9c1e285fc50751a48a8a4d78086a585c2285f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336657336494745712748986658978559740356}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 80 MHz and must generate an exact 2000 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 16. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 80000000/2000 = 40000.\nWith prescaler divisor limited to at most 16, the largest divisor of 40000 that also keeps the period count within 16 bits is 16.\nPeriod count = 40000/16 = 2500.\nPSC register = 16-1 = 15.\nARR register = 2500-1 = 2499.\nVerification: 80000000/(16×2500) = 2000 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 80000000, "target_hz": 2000, "total_division": 40000, "max_prescaler": 16, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 16, "period": 2500, "psc_reg": 15, "arr_reg": 2499}, "prompt_sha1": "a98371050566e8172db3747c1cd4077cd795e73a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 10 MHz. Sampling consumes 160.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 160.5+16 = 176.5. Period = 176.5/10000000 = 1.765e-05 s. Maximum rate = 1/period = 56657.223796 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 10000000.0, "sample_cycles": 160.5, "conv_cycles": 16, "period": 1.765e-05, "rate": 56657.223796034}, "prompt_sha1": "571700d7a77d449176ca17dbc446d94d26283067", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 50 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 32 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 32/(50×10^6) s = 0.640000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 50, "bits": 32, "time_us": 0.64}, "prompt_sha1": "d707f6ea9c40312b19ebd0f36f83a1d9a05b66c4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 160 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 160 MHz / 256 = 0.625000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 160000000.0, "divider": 256, "spi_hz": 625000.0}, "prompt_sha1": "e8af2996427a52853a13a79dd73db0546df55fe3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 34 bits wide and the system uses 1 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 1024 bytes = 2^10 bytes.\nOffset bits = 10.\nVPN bits = 34-10 = 24.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 34, "page_bytes": 1024, "offset_bits": 10, "vpn_bits": 24}, "prompt_sha1": "665391f528e5c4fc6311386cb873ed25dbf15893", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 40000 Mbit/s and RTT 60 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 40000×10^6×60/1000/8 = 300000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 40000, "rtt_ms": 60, "bytes": 300000000.0}, "prompt_sha1": "c562602291427566cd442edb73903ea14ae63af1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 128 KiB direct-mapped data cache with 64-byte lines and 48-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 128 KiB = 131072 bytes.\nLines = 131072/64 = 2048.\nOffset bits = log2(64) = 6.\nIndex bits = log2(2048) = 11.\nTag bits = 48-11-6 = 31.\nCheck: 31+11+6 = 48 = 48 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 131072, "line": 64, "addr_bits": 48, "lines": 2048, "offset_bits": 6, "index_bits": 11, "tag_bits": 31}, "prompt_sha1": "c0631835a70e15c55cffabe8bcd06b15e64b8fd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 100000 Mbit/s and RTT 20 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 100000×10^6 × 20/1000 = 2e+09 bits = 2.5e+08 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 100000, "rtt_ms": 20, "bits": 2000000000.0, "bytes": 250000000.0}, "prompt_sha1": "0c8d033f80583d6b0cac7c1cbdc0d54de4dad483", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 50 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 50 = 52.\nClock pulses = 52×9 = 468.\nTime = 468/1000000 s = 468.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 50, "clocks": 468, "time_s": 0.000468}, "prompt_sha1": "4f5038a8a264816f6734599d2656098e6a0d6182", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.217.49.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.217.49.0\nBroadcast address: 10.217.49.7\nUsable host range: 10.217.49.1 to 10.217.49.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.217.49.0/29", "usable": 6, "first": "10.217.49.1", "last": "10.217.49.6", "broadcast": "10.217.49.7"}, "prompt_sha1": "8f70d6c41668d8fcb5e95993a1e6e9a9e8ebacf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "medium", "input": "An ADC clock is 8 MHz. Sampling consumes 7.5 cycles and conversion consumes 16 cycles. Compute total conversion period and maximum ideal sample rate.", "output": "Total cycles = 7.5+16 = 23.5. Period = 23.5/8000000 = 2.9375e-06 s. Maximum rate = 1/period = 340425.531915 samples/s.", "metadata": {"generator_id": "adc_sample_period", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute_v4", "adc_clk": 8000000.0, "sample_cycles": 7.5, "conv_cycles": 16, "period": 2.9375e-06, "rate": 340425.53191489365}, "prompt_sha1": "a6fcee8685e3925bb3dc5f06dfe2b13fa2c7370c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 20070120507017624710475211148052806664}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 470 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/470=0.10212766 A. P=V²/R=48²/470=4.90212766 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 470, "i": 0.10212765957446808, "p": 4.902127659574468}, "prompt_sha1": "321191570c2a6caa4a3050af4f7d76b8232da70e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "programming_debugging", "subdomain": "c_integer_semantics", "difficulty": "medium", "input": "In ISO C with `uint8_t`, evaluate the stored result after `x = 171; x = x + 287;`. The mathematical sum exceeds the maximum value representable by `uint8_t`. State the value stored back into `x` under conversion to the unsigned 8-bit type, and contrast this with signed overflow.", "output": "The mathematical sum is 171+287 = 458. Converting that result back to the unsigned 8-bit type reduces it modulo 2^8: (458) mod 2^8 = 202. So `x` stores 202. For narrow unsigned types, integer promotions may occur while evaluating the expression, but the conversion back to `uint8_t` still gives this modulo result. In contrast, overflow of a signed integer type is undefined behavior in ISO C; portable code must not rely on signed wraparound.", "metadata": {"generator_id": "unsigned_wrap_c", "reasoning_type": "language_semantics", "units": "none", "verification": {"kind": "recompute_v3", "bits": 8, "start": 171, "add": 287, "result": 202}, "prompt_sha1": "42d8fac7b0913e752107a5cceeb642b0bf64ce78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 51366435660573274020062960938096548625}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 95%. On an L1 miss, L2 lookup costs 6 ns and L2 local hit rate is 92%. An L2 miss adds 80 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.050×(6+0.080×80) = 1.120000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.95, "l2": 6, "l2_hit": 0.92, "mem": 80, "amat": 1.1200000000000006}, "prompt_sha1": "b513d5961d29c0fce4683a27fae65231f36a1397", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=4.7 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×100/(4.7+100) = 8.595989 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 4.7, "r2": 100, "vout": 8.595988538681949}, "prompt_sha1": "c0f70312343ca08aabb7028d57106f3eaf80f028", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.60. Using Amdahl's law, compute the theoretical speedup on 128 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.60) + 0.60/128) = 2.471042.\nThe theoretical speedup is about 2.471×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.6, "n": 128, "result": 2.471042471042471}, "prompt_sha1": "aaaa4eac3ae03c581b0a7483a0757a2d3cef821d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 7-bit ADC spanning 0 to 5 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 5/2^7 V = 0.0390625 V = 39062.500000 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 7, "vref": 5.0, "step": 0.0390625}, "prompt_sha1": "834df8c3840a3c100aadf19f6567e27cd75107a4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_61` generating a one-clock-cycle `tick` every 61 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_61 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [5:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 60) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_61", "divide": 61}, "prompt_sha1": "c01b7521e72c6ce4f37e727f9f356e6c96112bee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_17_lsb` for `17-bit in`. The lowest numbered asserted bit has priority. Output `5-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_17_lsb (\n input logic [16:0] in,\n output logic [4:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 16; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_17_lsb", "width": 17, "priority": "low"}, "prompt_sha1": "a83d4fe68d9d76efdd847a01a53878d2de23f722", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 43-bit up/down counter `updown_43_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_43_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [42:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_43_wrap", "width": 43, "wrap": true}, "prompt_sha1": "83e27ba17ac46e01131b114c6c7fd75e494133e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 32 KiB direct-mapped data cache with 32-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 32 KiB = 32768 bytes.\nLines = 32768/32 = 1024.\nOffset bits = log2(32) = 5.\nIndex bits = log2(1024) = 10.\nTag bits = 24-10-5 = 9.\nCheck: 9+10+5 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 32768, "line": 32, "addr_bits": 24, "lines": 1024, "offset_bits": 5, "index_bits": 10, "tag_bits": 9}, "prompt_sha1": "723de031eedffa09bf115de492bb144817ac2793", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 1 register-address byte(s), and 3 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 3 = 5.\nClock pulses = 5×9 = 45.\nTime = 45/1000000 s = 45.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 1, "payload": 3, "clocks": 45, "time_s": 4.5e-05}, "prompt_sha1": "ea53dfd4b3a0727c412e4f7dc4f073262420cdad", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 2000000 Hz. Consecutive rising edges are 22289 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 22289/2000000 s; frequency = 2000000/22289 = 89.730360 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 2000000, "delta": 22289, "hz": 89.73036026739648}, "prompt_sha1": "febf74327ff7a0b8988daf96dea0cc11ae5cf2c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_9019` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_9019 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_9019"}, "prompt_sha1": "e8a2fc2a089cfce316dc9ec6070a98dee155e7ae", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP segment starts at sequence number 3306960074, carries 29641 payload bytes, SYN=1, FIN=1. Assuming SYN and FIN each consume one sequence number when set, what acknowledgment number covers the segment? Use modulo-2^32 sequence arithmetic.", "output": "Sequence-space advance = 29641+1+1 = 29643. ACK = (3306960074+29643) mod 2^32 = 3306989717.", "metadata": {"generator_id": "tcp_seq_ack", "reasoning_type": "quantitative", "units": "sequence numbers", "verification": {"kind": "recompute_v4", "seq": 3306960074, "payload": 29641, "syn": 1, "fin": 1, "ack": 3306989717}, "prompt_sha1": "c677a1971794e7519f93f236631cf620bddc99d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 116914972651748990247055185977635893942}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 6133-byte frame is serialized onto a 10 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 6133×8 = 49064 bits.\nSerialization delay = bits/rate = 49064/(10×10^6) s = 0.0049064 s = 4906.400000 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 6133, "rate_mbps": 10, "delay_s": 0.0049064}, "prompt_sha1": "4c0a0129ce6e41a7120002e8601502a2f54ba36c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 1639 payload bytes over IPv4. Ignore link-layer overhead and IP options. Compute payload efficiency using 20-byte IP header and 8-byte UDP header.", "output": "Efficiency = 1639/(1639+20+8) = 0.983203 = 98.32%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 1639, "iphdr": 20, "eff": 0.9832033593281344}, "prompt_sha1": "100cc7d10bee86d94178b136696718c8f37ffa0b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 20000 Mbit/s and RTT 5 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 20000×10^6 × 5/1000 = 1e+08 bits = 1.25e+07 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 20000, "rtt_ms": 5, "bits": 100000000.0, "bytes": 12500000.0}, "prompt_sha1": "677f9d3c4f83ef38940bfdda9274a7f6f98899f3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "T1 acquires lock BUS then B; consumer acquires B then BUS. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if T1 holds BUS while waiting for B, while consumer holds B while waiting for BUS; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire B before BUS. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "67666cdc580e3ccd13cb14b63b67ce3aa9bd726f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 84 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 14400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 84000000/(4×14400) = 1458.333333.\nNearest integer divisor D = 1458.\nActual baud = 84000000/(4×1458) = 14403.292 baud.\nError = (14403.292-14400)/14400×100% = 0.0229%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 84000000, "oversample": 4, "baud": 14400, "divisor": 1458, "actual": 14403.292181069959, "error_pct": 0.02286236854138224}, "prompt_sha1": "a14ac767ea20b8efa09b0d3193622796e067adb6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=100 nF and is stepped to 9 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=9(1-e^-0.5)=3.541224 V; τ=0.00047 s and t=0.000235 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 1.0000000000000001e-07, "multiple": 0.5, "vin": 9, "vc": 3.5412240625862994}, "prompt_sha1": "e3a76e18093ab0739dcc86c04dde58542fd6842c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 24 MHz and uses 4× oversampling. Using integer divisor D with baud = f_clk/(4×D), choose the nearest integer divisor for target 4800 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 24000000/(4×4800) = 1250.000000.\nNearest integer divisor D = 1250.\nActual baud = 24000000/(4×1250) = 4800.000 baud.\nError = (4800.000-4800)/4800×100% = 0.0000%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 24000000, "oversample": 4, "baud": 4800, "divisor": 1250, "actual": 4800.0, "error_pct": 0.0}, "prompt_sha1": "a9caba73fb0b8c04a61cfaf5f4dd35007295e4e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_3` generating a one-clock-cycle `tick` every 3 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_3 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [1:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 2) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_3", "divide": 3}, "prompt_sha1": "8295d42f193410a34278d5bcf37b3c011dd662a6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 5000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 1280 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1280-28 = 1252 bytes.\nRound down to an 8-byte multiple: floor((1252)/8)×8 = 1248 bytes.\nFragments required = ceil(5000/1248) = 5.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1280, "header": 28, "payload": 5000, "max_payload": 1248, "fragments": 5}, "prompt_sha1": "dfdc074c0ff5d8f9b49278562f00653b4b1c2ab6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.83.125.0/30, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.252\nNetwork address: 10.83.125.0\nBroadcast address: 10.83.125.3\nUsable host range: 10.83.125.1 to 10.83.125.2\nTotal addresses = 2^(32-30) = 4; usable hosts = 4-2 = 2.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.83.125.0/30", "usable": 2, "first": "10.83.125.1", "last": "10.83.125.2", "broadcast": "10.83.125.3"}, "prompt_sha1": "9e69f260f56a10cb5b3f4dd8f0ed4326e5e673f0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_101` generating a one-clock-cycle `tick` every 101 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_101 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 100) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_101", "divide": 101}, "prompt_sha1": "f3514c0a9f481aa8ebdb198e4800e8b1a3968a3f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 2 register-address byte(s), and 42 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 42 = 45.\nClock pulses = 45×9 = 405.\nTime = 405/100000 s = 4050.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 2, "payload": 42, "clocks": 405, "time_s": 0.00405}, "prompt_sha1": "51c101dd7546a68d6124fdbe9e5bf542e2bc882a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_logic_25` for a 25-bit unsigned input `data`, `5-bit shamt`, and right logical shift output `y`. Complete RTL only.", "output": "module barrel_right_logic_25 (\n input logic [24:0] data,\n input logic [4:0] shamt,\n output logic [24:0] y\n);\n always_comb begin\n y = data >> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_logic_25", "width": 25, "direction": "right", "arithmetic": false}, "prompt_sha1": "1ea51eae5414ac172d05c3e2a26bc1e4feaba7af", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.65. Using Amdahl's law, compute the theoretical speedup on 32 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.65) + 0.65/32) = 2.700422.\nThe theoretical speedup is about 2.700×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.65, "n": 32, "result": 2.70042194092827}, "prompt_sha1": "01f93120ac0451d575e558a9f684fb82bc53ed3e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=3.3 V, R1=47 kOhm from Vin to Vout, and R2=100 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 3.3×100/(47+100) = 2.244898 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 3.3, "r1": 47, "r2": 100, "vout": 2.2448979591836733}, "prompt_sha1": "216ea3eb2ec97371f534bf2e7f334ababbf25031", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=1000 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/1000 = 4.7e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 1000, "tau": 4.7e-05}, "prompt_sha1": "d3c9d1822443269b20eef41f947efef069e188bc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w60_unsigned` comparing two 60-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w60_unsigned (\n input logic [59:0] a,\n input logic [59:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w60_unsigned", "width": 60, "signed": false}, "prompt_sha1": "66bd45d0bbf720be75441406f3917f9738e43b7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 4700 ohm and 270 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (4700×270)/(4700+270) = 255.331992 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 4700, "r2": 270, "req": 255.33199195171025}, "prompt_sha1": "1c9ddf127210dc126e93e38d432399fc05b1027e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 1000 Mbit/s using fixed 1024-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 1000×10^6 / (1024×8) = 122070.312500 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 1000, "frame_bytes": 1024, "pps": 122070.3125}, "prompt_sha1": "ba31d8b0bb2b864b350e2ebd0186df424450f455", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "os_concurrency", "subdomain": "scheduling", "difficulty": "medium", "input": "Round-robin scheduling has quantum 3 and all processes arrive at time 0 with CPU bursts [24, 1, 26]. Ignore context-switch overhead. Compute completion time of each process in listed order.", "output": "Simulating cyclic quanta gives completion times [46, 4, 51].", "metadata": {"generator_id": "round_robin_completion", "reasoning_type": "state_simulation", "units": "time units", "verification": {"kind": "recompute_v4", "quantum": 3, "bursts": [24, 1, 26], "finish": [46, 4, 51]}, "prompt_sha1": "ba2406d8708ce74ee681a5d79ff23c6642e38eb0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 90510674708701880475503396165561904625}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 1 KiB direct-mapped data cache with 64-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 1 KiB = 1024 bytes.\nLines = 1024/64 = 16.\nOffset bits = log2(64) = 6.\nIndex bits = log2(16) = 4.\nTag bits = 24-4-6 = 14.\nCheck: 14+4+6 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 1024, "line": 64, "addr_bits": 24, "lines": 16, "offset_bits": 6, "index_bits": 4, "tag_bits": 14}, "prompt_sha1": "43d38786673f43f5d963e133248212e9aced4096", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "embedded_systems", "subdomain": "rtos", "difficulty": "medium", "input": "A periodic real-time task set has C=2 ms,T=10 ms, C=1 ms,T=10 ms, C=3 ms,T=200 ms, C=1 ms,T=5 ms, C=1 ms,T=25 ms. Compute total processor utilization U=Σ(C_i/T_i). Report U as a fraction and percentage. Do not claim schedulability from utilization alone.", "output": "U = 2/10 + 1/10 + 3/200 + 1/5 + 1/25 = 0.555000 = 55.50%.\nThis utilization value alone is not sufficient to prove schedulability without a scheduling model and test.", "metadata": {"generator_id": "rtos_utilization", "reasoning_type": "quantitative", "units": "fraction/%", "verification": {"kind": "recompute_v3", "tasks": [[2, 10], [1, 10], [3, 200], [1, 5], [1, 25]], "utilization": 0.555}, "prompt_sha1": "46f0c20b8b5e5e048e3456e594241cf9cab40e97", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 42459644867384118574838988697463020450}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=10000 ohm, C=1 nF and is stepped to 1.8 V. Compute capacitor voltage after 0.5 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=0.5τ, Vc=1.8(1-e^-0.5)=0.708245 V; τ=1e-05 s and t=5e-06 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 10000, "c": 1e-09, "multiple": 0.5, "vin": 1.8, "vc": 0.7082448125172599}, "prompt_sha1": "d25394bd1b182612ba64ad199bf7c54b7866db4a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 12 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 512 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 512/(12×10^6) s = 42.666667 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 12, "bits": 512, "time_us": 42.66666666666667}, "prompt_sha1": "f151932845593820bf1024cb34fa04639bc1b43a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "embedded_systems", "subdomain": "dma", "difficulty": "easy", "input": "A DMA engine moves 4096 bytes over a datapath transferring 1 bytes per beat at 160 MHz, one beat per cycle. Ignoring setup and contention, compute transfer time.", "output": "Bandwidth = 1×160×10^6 = 160000000 B/s. Time = 4096/160000000 = 2.56e-05 s.", "metadata": {"generator_id": "dma_transfer_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "size": 4096, "width": 1, "rate_mhz": 160, "sec": 2.56e-05}, "prompt_sha1": "4f322116c3be622e3bd1af4af7a063a76a2ab882", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 25960206997293472779965320719862045744}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_15_retrig` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 15 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall restart the full stretch interval. Complete RTL only.", "output": "module pulse_stretch_15_retrig (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 4'd15;\n end else begin\n if (pulse_in)\n count <= 4'd15;\n else\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_15_retrig", "cycles": 15, "retrigger": true}, "prompt_sha1": "afbdbf90ec00b2e407b27e4ac68ff25cd32669d4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w22_cin` implementing a 22-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `22-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w22_cin (\n input logic [21:0] a,\n input logic [21:0] b,\n input logic cin,\n output logic [21:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w22_cin", "width": 22, "cin": true}, "prompt_sha1": "0bc519b76b89b97fe2ea3ecad7762bd9e1b9f2c6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=270000 ohm and C=330000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=270000×330000×10^-12 s = 0.0891 s.\nf_c=1/(2πRC)=1/(2π×270000×330000×10^-12) = 1.7863 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 270000, "c_f": 3.3e-07, "tau": 0.0891, "fc": 1.786250764218803}, "prompt_sha1": "f12ec4b4fe46d4fd7f0ea1b94d9a2f85620c6e77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x7D, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x7D<<1)|1 = 0xFB = 11111011.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 125, "rw": 1, "byte": 251}, "prompt_sha1": "e807ff682d5d15793e653e72d5109adb5bececd9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d8_w64_4649` implementing a dual-clock asynchronous FIFO with depth 8 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 3-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d8_w64_4649 #(\n parameter int DEPTH = 8,\n parameter int WIDTH = 64,\n parameter int PTR_W = 3\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d8_w64_4649", "depth": 8, "width": 64, "ptr_w": 3}, "prompt_sha1": "1c03eab6409a6e7f3b4af3092185cc9bc820c644", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 32-bit unsigned value 0xA5D7892A, toggle bit 4 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value ^ (1ULL << 4)`. Result = 0xA5D7893A.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 32, "value": 2782365994, "bit": 4, "op": "toggle", "result": 2782366010}, "prompt_sha1": "f1ff3689fa5e1ae39c33f7496a0150903f952f46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_32_5518` implementing a 2-to-1 multiplexer for two 32-bit inputs `a` and `b`, select `sel`, and 32-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_32_5518 (\n input logic [31:0] a,\n input logic [31:0] b,\n input logic sel,\n output logic [31:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_32_5518"}, "prompt_sha1": "b78c1689e76a12188b2ce6f8e1a51856d4edc318", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xF65571 in 3 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: F6 55 71.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 3, "value": 16143729, "endian": "big", "bytes": [246, 85, 113]}, "prompt_sha1": "d534b7c83e0a8de39584159d48f382c118dfb8e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 110100000 using generator polynomial bits 1111. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 010.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 15, "msg_bits": 9, "msg": 416, "remainder": 2}, "prompt_sha1": "7d8a03abe545cdfc0cfba6303b910dccb1b4938c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_227` generating a one-clock-cycle `tick` every 227 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_227 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 226) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_227", "divide": 227}, "prompt_sha1": "28dc93c9ca389ed4edc1bdd3f5f768f3785dfe88", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=10 kOhm, Rf=220 kOhm, and Vin=0.2 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/10 = -22.000000.\nVout = A_v×Vin = -22.000000×0.2 = -4.400000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 10, "rf": 220, "vin": 0.2, "gain": -22.0, "vout": -4.4}, "prompt_sha1": "49c3b7b766e8dfba80c3a0116d2ef0af18e89a14", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_6630` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_6630 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_6630"}, "prompt_sha1": "1ed58efb693a6cef990b171903b7f477bdcd7c2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 16-bit unsigned value 0x71BD, clear bit 14 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value & ~(1ULL << 14)`. Result = 0x31BD.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 16, "value": 29117, "bit": 14, "op": "clear", "result": 12733}, "prompt_sha1": "1c7c8dd528567bc933dcac60288965cc40034b49", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=100000 ohm, C=2200 nF and is stepped to 1.8 V. Compute capacitor voltage after 3 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=3τ, Vc=1.8(1-e^-3)=1.710383 V; τ=0.22 s and t=0.66 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 100000, "c": 2.2e-06, "multiple": 3, "vin": 1.8, "vc": 1.7103832769378449}, "prompt_sha1": "4e2525118c403874ebaf30549849cc346787877c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 28-byte IP header. The outgoing MTU is 576 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 576-28 = 548 bytes.\nRound down to an 8-byte multiple: floor((548)/8)×8 = 544 bytes.\nFragments required = ceil(8000/544) = 15.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 576, "header": 28, "payload": 8000, "max_payload": 544, "fragments": 15}, "prompt_sha1": "e140a3c0432ce53f9e15440d19b88c13e5013e59", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x74, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x74<<1)|0 = 0xE8 = 11101000.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 116, "rw": 0, "byte": 232}, "prompt_sha1": "c883a79965b1ad42f6f314a7d2430f64f96e6d8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 171 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 171/(171+40+8) = 0.780822 = 78.08%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 171, "iphdr": 40, "eff": 0.7808219178082192}, "prompt_sha1": "ad3cd678016bd2ca634d245522f3b38f42b42788", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI bus runs at 1 MHz. Ignoring chip-select setup/hold and software overhead, how long does it take to shift 2048 clocked data bits? Show the calculation.", "output": "Transfer time = bits / clock_rate = 2048/(1×10^6) s = 2048.000000 µs.", "metadata": {"generator_id": "spi_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq_mhz": 1, "bits": 2048, "time_us": 2048.0}, "prompt_sha1": "64486881d7e7f0aa3f52c53a685211d21372af15", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 267868059289185923488858628562876377907}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 3. Apply operations ['V', 'P', 'P', 'V', 'V', 'V', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 3, "ops": ["V", "P", "P", "V", "V", "V", "P", "V", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "d4202f0bf00f484e1c8a2aca414ff999d2ce9815", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 96 MHz, prescaler divisor is 940, and period is 49490 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 96000000/(940×49490) = 2.063602 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 96000000, "prescaler": 940, "period": 49490, "hz": 2.063601931187474}, "prompt_sha1": "c86e7e8c04c4883b5205fe17f44060e415742e7b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "digital_design", "subdomain": "memory_rtl", "difficulty": "medium", "input": "Write a synthesizable single-write/single-read SystemVerilog register file `regfile_32x64_write_bypass` with 32 entries of 64 bits. Inputs: `clk`, `we`, `5-bit waddr`, `64-bit wdata`, `5-bit raddr`; output `64-bit rdata`. Writes occur on the rising edge and reads are combinational. While `we=1` and `waddr==raddr`, the combinational read output shall bypass `wdata`; otherwise it shall show `mem[raddr]`. Complete RTL only.", "output": "module regfile_32x64_write_bypass (\n input logic clk,\n input logic we,\n input logic [4:0] waddr,\n input logic [63:0] wdata,\n input logic [4:0] raddr,\n output logic [63:0] rdata\n);\n logic [63:0] mem [0:31];\n\n always_ff @(posedge clk) begin\n if (we)\n mem[waddr] <= wdata;\n end\n\n always_comb begin\n rdata = (we && (waddr == raddr)) ? wdata : mem[raddr];\n end\nendmodule", "metadata": {"generator_id": "register_file_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "regfile_32x64_write_bypass", "entries": 32, "width": 64, "mode": "write_bypass"}, "prompt_sha1": "53761f9458257af5b05157f1c0bced088264e77b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 259164728690417312043150475781474158196}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1010110011110 using generator polynomial bits 11010011. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 1010111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 211, "msg_bits": 13, "msg": 5534, "remainder": 87}, "prompt_sha1": "e5c92c3ba09705cae08981dffd71d85586da0005", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1100110110 using generator polynomial bits 100111. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 01100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 39, "msg_bits": 10, "msg": 822, "remainder": 12}, "prompt_sha1": "c095a2c7f43d572d0db1758f990e7f4424c4c810", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 8-bit ADC uses a 5 V reference and returns code 51. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^8-1 = 255.\nV = 51/255 × 5 V = 1.000000 V.\nThus the estimated input is about 1.0000 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 8, "vref": 5.0, "code": 51, "volts": 1.0}, "prompt_sha1": "5321622686a74185bad2b1a32a0204077cc4d3cf", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 1 million instructions at average CPI 0.5 on a 4 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 1×10^6×0.5/(4×10^9) = 0.000125 s = 0.125000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 1, "cpi": 0.5, "ghz": 4.0, "sec": 0.000125}, "prompt_sha1": "08af18d29cd3314e33fff8296070c18fdfb1cc77", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 5. Apply operations ['P', 'P', 'V', 'P', 'P', 'V', 'V', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 6 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 5, "ops": ["P", "P", "V", "P", "P", "V", "V", "V", "V"], "value": 6, "blocked": 0}, "prompt_sha1": "c07dc4842ca3c34a35a9bf0598745ff1776f54c5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 40 data bits per transfer at 3200 MT/s across 4 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 40/8 = 5. Bandwidth = 5×3200×10^6×4 = 64.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 40, "rate_mt": 3200, "channels": 4, "gbps": 64.0}, "prompt_sha1": "d04237acdabb2a8b45c89e09a9d5a742aba74b41", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 15% of instructions, the branch misprediction rate is 2%, and each misprediction costs 5 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.150 × 0.020 × 5 = 0.015000.\nEffective CPI = 1 + 0.015000 = 1.015000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.15, "mispred": 0.02, "penalty": 5, "result": 1.015}, "prompt_sha1": "b2f7381dabf6c592a7ae13cb81bc28fa943363d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w6_unsigned` comparing two 6-bit unsigned inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w6_unsigned (\n input logic [5:0] a,\n input logic [5:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w6_unsigned", "width": 6, "signed": false}, "prompt_sha1": "493c183f767306ba32f2adf3849f39cf9a18bea0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 120 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 8192. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 120000000/400 = 300000.\nWith prescaler divisor limited to at most 8192, the largest divisor of 300000 that also keeps the period count within 16 bits is 7500.\nPeriod count = 300000/7500 = 40.\nPSC register = 7500-1 = 7499.\nARR register = 40-1 = 39.\nVerification: 120000000/(7500×40) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 120000000, "target_hz": 400, "total_division": 300000, "max_prescaler": 8192, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 7500, "period": 40, "psc_reg": 7499, "arr_reg": 39}, "prompt_sha1": "0a22fc11315639b25c37aea589f15d8bd3c33b91", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=8200 ohm and C=1800000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=8200×1800000×10^-12 s = 0.01476 s.\nf_c=1/(2πRC)=1/(2π×8200×1800000×10^-12) = 10.7829 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 8200, "c_f": 1.8e-06, "tau": 0.014759999999999999, "fc": 10.782855223028141}, "prompt_sha1": "7ce791d26cc785724a79d01f3802e56c51642d2a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.18.216.0/25, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.128\nNetwork address: 10.18.216.0\nBroadcast address: 10.18.216.127\nUsable host range: 10.18.216.1 to 10.18.216.126\nTotal addresses = 2^(32-25) = 128; usable hosts = 128-2 = 126.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.18.216.0/25", "usable": 126, "first": "10.18.216.1", "last": "10.18.216.126", "broadcast": "10.18.216.127"}, "prompt_sha1": "508281688d0164bfa72d7dcf7bc5dc1f791536e7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'P', 'P', 'V', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "P", "P", "V", "V"], "value": 7, "blocked": 0}, "prompt_sha1": "a582b1a700e342af8210fc30a6ba03be0128a697", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11100001010010111 using generator polynomial bits 111101101. Append 8 zeros and perform modulo-2 long division. Give the 8-bit remainder.", "output": "The modulo-2 division remainder is 01101111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "poly": 493, "msg_bits": 17, "msg": 115351, "remainder": 111}, "prompt_sha1": "955bba7616b3f3757516b1c2b717da335ccbe4c0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 7. Apply operations ['P', 'V', 'V', 'P', 'P', 'P', 'V', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 5 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 7, "ops": ["P", "V", "V", "P", "P", "P", "V", "P"], "value": 5, "blocked": 0}, "prompt_sha1": "7c8c3b63c5d9d46a2404eab3f4c72f1ad31bfeb3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=2.2 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×47/(2.2+47) = 4.776423 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 2.2, "r2": 47, "vout": 4.776422764227642}, "prompt_sha1": "d3dbf4924229644a5507eabb5118eb382a87e88f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 5 elements. Review loop `for i in range(5+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(5+1)` includes index 5, which is out of range for a length-5 sequence. Correct loop: `for i in range(5):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 5, "variant": "one_past"}, "prompt_sha1": "92448fb285d2ca0e5d0957dedad53389c7e6675d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 47000 ohm has 12 V across it. Compute current and dissipated power.", "output": "I=V/R=12/47000=0.000255319149 A. P=V²/R=12²/47000=0.00306382979 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 12, "r": 47000, "i": 0.0002553191489361702, "p": 0.0030638297872340424}, "prompt_sha1": "e471edfd1e615f1598b442ab31f9aac17bbdac6c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×1024 KiB = 2097152 KiB = 2147483648 bytes = 2048.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 1024, "reach": 2147483648}, "prompt_sha1": "1f727182ff14f21218b0b6b9d48630916091163d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=1 kOhm, Rf=220 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -220/1 = -220.000000.\nVout = A_v×Vin = -220.000000×0.05 = -11.000000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 1, "rf": 220, "vin": 0.05, "gain": -220.0, "vout": -11.0}, "prompt_sha1": "fc58b96946b7d9fa95cf6544bde9ae0538b8ddc5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4.25 ns hit time, 96.8% hit rate, and a 45 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.968 = 0.032.\nAMAT = hit time + miss rate × miss penalty\n= 4.25 ns + 0.032×45 ns = 5.6900 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.25, "hit_rate": 0.968, "penalty": 45, "result": 5.690000000000001}, "prompt_sha1": "287670d9cc97c0cc8f65722ab929b21235de05a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 50 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 75 Hz satisfies it.", "output": "Nyquist minimum is 2×50 = 100 Hz. Proposed rate 75 Hz does not meet the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 50, "min_fs": 100, "proposed": 75.0}, "prompt_sha1": "36240d95a110548d5620e299893abd0ff560ec9c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 72 MHz, prescaler divisor is 246, and period is 11919 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 72000000/(246×11919) = 24.555997 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 72000000, "prescaler": 246, "period": 11919, "hz": 24.555996881388396}, "prompt_sha1": "a7bf36973fc700e3cc91cb95d1ae89a4b210198d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 14 and initial occupancy is 11. In an abstract batch, producer attempts to enqueue 75 items first, dropping any excess beyond capacity; then consumer removes up to 56 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=14, dropped=72; consumed=14; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 14, "start": 11, "prod": 75, "cons": 56, "dropped": 72, "consumed": 14, "final": 0}, "prompt_sha1": "3b9d09d08349c94cbfe1eca5084a479e1c22aa7a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 96 payload bytes plus 22 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 96/(96+22) = 0.813559 = 81.36%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 96, "overhead": 22, "efficiency": 0.8135593220338984}, "prompt_sha1": "6e845ccca590ab35d33ee86ee551785382bf7985", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.151.181.0/26, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.192\nNetwork address: 10.151.181.0\nBroadcast address: 10.151.181.63\nUsable host range: 10.151.181.1 to 10.151.181.62\nTotal addresses = 2^(32-26) = 64; usable hosts = 64-2 = 62.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.151.181.0/26", "usable": 62, "first": "10.151.181.1", "last": "10.151.181.62", "broadcast": "10.151.181.63"}, "prompt_sha1": "0cadda701775f640dce3a88663fd84787727ce38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x41D9. Extract the 8-bit field starting at bit 8 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 8 bits = (1<<8)-1 = 0xFF.\nfield = (0x41D9 >> 8) & 0xFF = 0x41 (65).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 8, "lsb": 8, "value": 16857, "mask": 255, "field": 65}, "prompt_sha1": "288798e1aa8d7e82102387312db18d446feaa480", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 967 and tail index 939, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (967-939) mod 1024 = 28. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 967, "tail": 939, "occupancy": 28}, "prompt_sha1": "3a785b0fc61c6cc8bf0e392541ce279e54eaf3df", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 32 MHz source using integer divider 256. Compute SCLK frequency.", "output": "SCLK = 32 MHz / 256 = 0.125000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 32000000.0, "divider": 256, "spi_hz": 125000.0}, "prompt_sha1": "433126acd27886a82dd8c75f8ca627365af1923e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `samples`, an array of exactly `size` elements of type `int16_t`:\n```c\nfor (size_t i = 0; i <= size; ++i) {\n result += samples[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `size-1`, but `i <= size` also executes at `i == size` and accesses `samples[size]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < size; ++i) {\n result += samples[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "2a2f19d9c77600560deaffeb385e4c95d97fa9cd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5 Mbit/s and RTT 0.1 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5×10^6×0.1/1000/8 = 62.500000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "rtt_ms": 0.1, "bytes": 62.5}, "prompt_sha1": "b11bb8b3c59b27ae3462f9735529db9799bfbd0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 10000 Mbit/s and RTT 60 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 10000×10^6×60/1000/8 = 75000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 10000, "rtt_ms": 60, "bytes": 75000000.0}, "prompt_sha1": "654b337e6d6617b58014dd05dfc871c169c5820f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 16 KiB 16-way set-associative cache uses 32-byte lines and 48-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 16384/32 = 512.\nSets = 512/16 = 32.\nOffset bits = log2(32) = 5; index bits = log2(32) = 5; tag bits = 48-5-5 = 38.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 16, "line": 32, "ways": 16, "addr_bits": 48, "lines": 512, "sets": 32, "offset": 5, "index": 5, "tag": 38}, "prompt_sha1": "51a65a148b4cef82c45b2d1ea2f6b4482f3a791c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w23_nocin` implementing a 23-bit unsigned adder with inputs `a`, `b` and outputs `23-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w23_nocin (\n input logic [22:0] a,\n input logic [22:0] b,\n output logic [22:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w23_nocin", "width": 23, "cin": false}, "prompt_sha1": "7abaefb043d03afd3f76e079f72b8e6bca52ce0e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 4 and initial occupancy is 0. In an abstract batch, producer attempts to enqueue 63 items first, dropping any excess beyond capacity; then consumer removes up to 157 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=4, dropped=59; consumed=4; final occupancy=0.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 4, "start": 0, "prod": 63, "cons": 157, "dropped": 59, "consumed": 4, "final": 0}, "prompt_sha1": "0a87aa4a3e65e3f0cde914c8f25a1b5e0403e522", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `cmp_w45_signed` comparing two 45-bit signed two-complement inputs `a` and `b`. Outputs `lt`, `eq`, and `gt` must indicate ab. Complete RTL only.", "output": "module cmp_w45_signed (\n input logic signed [44:0] a,\n input logic signed [44:0] b,\n output logic lt,\n output logic eq,\n output logic gt\n);\n always_comb begin\n lt = (a < b);\n eq = (a == b);\n gt = (a > b);\n end\nendmodule", "metadata": {"generator_id": "comparator_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "cmp_w45_signed", "width": 45, "signed": true}, "prompt_sha1": "d67c2207ca04553afe915fcc9aa822136f598a43", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 67890846203457839420606615533617591574}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 200 Mbit/s using fixed 512-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 200×10^6 / (512×8) = 48828.125000 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 200, "frame_bytes": 512, "pps": 48828.125}, "prompt_sha1": "bdf082efbd17a11b88462183f46a92a73244fb48", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 64 KiB 4-way set-associative cache uses 256-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 65536/256 = 256.\nSets = 256/4 = 64.\nOffset bits = log2(256) = 8; index bits = log2(64) = 6; tag bits = 32-8-6 = 18.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 64, "line": 256, "ways": 4, "addr_bits": 32, "lines": 256, "sets": 64, "offset": 8, "index": 6, "tag": 18}, "prompt_sha1": "7bec96b013c6959c613b9f7744c506eb42b66112", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog combinational module `bin_to_gray_32_8296` converting a 32-bit binary input `bin` to 32-bit Gray-code output `gray` using the standard binary-to-Gray relation. Complete RTL only.", "output": "module bin_to_gray_32_8296 (\n input logic [31:0] bin,\n output logic [31:0] gray\n);\n always_comb begin\n gray = bin ^ (bin >> 1);\n end\nendmodule", "metadata": {"generator_id": "gray_encode_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "bin_to_gray_32_8296", "width": 32}, "prompt_sha1": "92e2a51d9571144194ca42ccce74634324083be0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 207261453254187953432349184788666668497}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 17.8 V source drives a 5600 ohm resistor in series with an LED whose forward voltage is assumed to be 1.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 17.8-1.9 = 15.9 V.\nI = V/R = 15.9/5600 A = 2.8393 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 17.8, "vf": 1.9, "r": 5600, "current_a": 0.0028392857142857143}, "prompt_sha1": "47bc755416b3a386a1668116d8c62654fefdf896", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_221` generating a one-clock-cycle `tick` every 221 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_221 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [7:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 220) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_221", "divide": 221}, "prompt_sha1": "cc077a4e5d31d400adf7b91e52557a1380376b6e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 30-bit virtual address space with 4096 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^30/2^12 = 2^18 = 262144 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 30, "page_exp": 12, "entries": 262144}, "prompt_sha1": "2d80e3c1735851f4cefd393f0ebce614bd412692", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x2A, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x2A<<1)|1 = 0x55 = 01010101.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 42, "rw": 1, "byte": 85}, "prompt_sha1": "4aa5a8d7c1049f5012d1388a34319364ab5c669b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 0. Apply outcome sequence NTNNTNNNTT. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on T; 1->N on N; 0->N on N; 0->N on N; 0->N on T; 1->N on T.\nFinal state = 2.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 0, "outcomes": [0, 1, 0, 0, 1, 0, 0, 0, 1, 1], "final_state": 2}, "prompt_sha1": "0e9aabeb016b5eaadc011fc421e8a685fb33122e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=2200 ohm, C=220 nF and is stepped to 2.5 V. Compute capacitor voltage after 4 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=4τ, Vc=2.5(1-e^-4)=2.454211 V; τ=0.000484 s and t=0.001936 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 2200, "c": 2.2e-07, "multiple": 4, "vin": 2.5, "vc": 2.4542109027781644}, "prompt_sha1": "01c08dd22b9149bf4a34cf58a24ebe993d23b9f6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 64-bit unsigned value 0x5DB8E790, set bit 29 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 29)`. Result = 0x7DB8E790.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 64, "value": 1572398992, "bit": 29, "op": "set", "result": 2109269904}, "prompt_sha1": "c1e0f6bbd1d0aafd8d7d1488f5dbecd2af0b8bfb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 01111011111011001010001001111011. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 20 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "01111011111011001010001001111011", "ones": 20, "parity": 0}, "prompt_sha1": "2ace74618e4d234f30dc5a45bf60fcdf5704ca00", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 8 entries and maps 1024 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 8×1024 KiB = 8192 KiB = 8388608 bytes = 8.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 8, "page_kib": 1024, "reach": 8388608}, "prompt_sha1": "de81df1fa32c3643b4a68c56bf8a62a078230d2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 32 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 32×512 KiB = 16384 KiB = 16777216 bytes = 16.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 32, "page_kib": 512, "reach": 16777216}, "prompt_sha1": "9fa54b24630fd477dead62413f18243bd00971ee", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 22 ohm has 24 V across it. Compute current and dissipated power.", "output": "I=V/R=24/22=1.09090909 A. P=V²/R=24²/22=26.1818182 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 24, "r": 22, "i": 1.0909090909090908, "p": 26.181818181818183}, "prompt_sha1": "74e87b74968239976eb80eb4d485670081aebaac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 19200 baud with 1 start bit, 8 data bits, one parity bit, and 2 stop bit(s). How long does transmission of 37 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+8+1+2 = 12. Total bits = 37×12 = 444. Time = 444/19200 = 0.023125 s = 23.125000 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 19200, "data": 8, "parity": 1, "stop": 2, "frames": 37, "seconds": 0.023125}, "prompt_sha1": "19e7a78005b50311eb3f92784662326f36030428", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 240 MHz source using integer divider 8. Compute SCLK frequency.", "output": "SCLK = 240 MHz / 8 = 30.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 240000000.0, "divider": 8, "spi_hz": 30000000.0}, "prompt_sha1": "35768ab85621d07efe1fff778a754bd33e1d41ca", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 9 V source drives a 2700 ohm resistor in series with an LED whose forward voltage is assumed to be 3 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 9-3 = 6 V.\nI = V/R = 6/2700 A = 2.2222 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 9.0, "vf": 3.0, "r": 2700, "current_a": 0.0022222222222222222}, "prompt_sha1": "dac8ed58f91b02de6e8105c522ad4e10d8851784", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=2.2 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 2.2×10^-3/220 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0022, "r": 220, "tau": 1e-05}, "prompt_sha1": "d42ee1450aa9099970c1cdb2e259649b6a6a5f9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 1000 kHz containing one address byte, 2 register-address byte(s), and 48 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 2 + 48 = 51.\nClock pulses = 51×9 = 459.\nTime = 459/1000000 s = 459.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 1000000, "addr_bytes": 2, "payload": 48, "clocks": 459, "time_s": 0.000459}, "prompt_sha1": "f10932ff4ee8888c882da171d78db1003203dfbe", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 25% of instructions, the branch misprediction rate is 5%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.250 × 0.050 × 2 = 0.025000.\nEffective CPI = 1.2 + 0.025000 = 1.225000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.25, "mispred": 0.05, "penalty": 2, "result": 1.2249999999999999}, "prompt_sha1": "d329a24faaf99e85e8eb084014a6b5af2edeb484", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 16-bit data word is 0011100010011000. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 6 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "0011100010011000", "ones": 6, "parity": 0}, "prompt_sha1": "14590e9cdfd5a32a38ed54a62485891c69a25f9b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer clock is 160 MHz, prescaler divisor is 108, and period is 22012 counts. Using f_pwm=f_clk/(prescaler×period), compute PWM frequency.", "output": "f_pwm = 160000000/(108×22012) = 67.303356 Hz.", "metadata": {"generator_id": "pwm_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock": 160000000, "prescaler": 108, "period": 22012, "hz": 67.30335641838458}, "prompt_sha1": "7e0475f20be6b96e34cdb9b483888d92f6bcbabd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 98535885592730546557742772274774221927}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `words`, an array of exactly `samples` elements of type `int`:\n```c\nfor (size_t i = 0; i <= samples; ++i) {\n sum += words[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `samples-1`, but `i <= samples` also executes at `i == samples` and accesses `words[samples]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < samples; ++i) {\n sum += words[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "7f2f8e79e40c52782288f712b599a956ddb209b5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 2048 entries and maps 2048 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 2048×2048 KiB = 4194304 KiB = 4294967296 bytes = 4096.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 2048, "page_kib": 2048, "reach": 4294967296}, "prompt_sha1": "eee7f377e8ff1b8722b9ff22ab55ab7e7e394790", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 0.5 ns and L1 hit rate 90%. On an L1 miss, L2 lookup costs 10 ns and L2 local hit rate is 92%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 0.5 + 0.100×(10+0.080×50) = 1.900000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 0.5, "l1_hit": 0.9, "l2": 10, "l2_hit": 0.92, "mem": 50, "amat": 1.8999999999999995}, "prompt_sha1": "53a60d7a7e72325bd7f36de33978c79879894777", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 3000 payload bytes plus 14 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 3000/(3000+14) = 0.995355 = 99.54%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 3000, "overhead": 14, "efficiency": 0.9953550099535501}, "prompt_sha1": "11dfa087c698843168cf2df89523d525a4d59ba5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.73. Using Amdahl's law, compute the theoretical speedup on 64 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.73) + 0.73/64) = 3.553581.\nThe theoretical speedup is about 3.554×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.73, "n": 64, "result": 3.553581343697945}, "prompt_sha1": "5c04b5f83fd5ef527a7e3a688874562e5a1f9451", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 14-bit ADC uses a 3.3 V reference and returns code 8351. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^14-1 = 16383.\nV = 8351/16383 × 3.3 V = 1.682128 V.\nThus the estimated input is about 1.6821 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 14, "vref": 3.3, "code": 8351, "volts": 1.6821278154184214}, "prompt_sha1": "8e3d23a780bd975afb893071e9c4074d4ed490ac", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "digital_design", "subdomain": "arithmetic_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `adder_w3_cin` implementing a 3-bit unsigned adder with inputs `a`, `b`, `cin` and outputs `3-bit sum` and `cout`. Complete RTL only.", "output": "module adder_w3_cin (\n input logic [2:0] a,\n input logic [2:0] b,\n input logic cin,\n output logic [2:0] sum,\n output logic cout\n);\n always_comb begin\n {cout, sum} = a + b + cin;\n end\nendmodule", "metadata": {"generator_id": "adder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "adder_w3_cin", "width": 3, "cin": true}, "prompt_sha1": "6c57a2f9cb2d337fbe94e07eb5732c372a58cfba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 115655864700502310537468718468260043942}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "easy", "input": "A UART runs at 57600 baud with 1 start bit, 7 data bits, one parity bit, and 1 stop bit(s). How long does transmission of 11 frame(s) take, ignoring gaps?", "output": "Bits/frame = 1+7+1+1 = 10. Total bits = 11×10 = 110. Time = 110/57600 = 0.00190972222 s = 1.909722 ms.", "metadata": {"generator_id": "uart_frame_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "baud": 57600, "data": 7, "parity": 1, "stop": 1, "frames": 11, "seconds": 0.0019097222222222222}, "prompt_sha1": "c1e516e0328d9504e6e37752b92706f79ff71b79", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 139479467947928972208432738265317444244}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 1111010011000 using generator polynomial bits 1101. Append 3 zeros and perform modulo-2 long division. Give the 3-bit remainder.", "output": "The modulo-2 division remainder is 100.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 3, "poly": 13, "msg_bits": 13, "msg": 7832, "remainder": 4}, "prompt_sha1": "fa8764e3121d4ed9e360b6373f06daf97424305a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x50, form the transmitted address byte for read (R/W bit=1). Give binary and hexadecimal.", "output": "Address byte = (0x50<<1)|1 = 0xA1 = 10100001.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 80, "rw": 1, "byte": 161}, "prompt_sha1": "83a5c6846ffedb36303c2d4f3fe761e9bbc21e99", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=22 kOhm, Rf=100 kOhm, and Vin=0.25 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -100/22 = -4.545455.\nVout = A_v×Vin = -4.545455×0.25 = -1.136364 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 22, "rf": 100, "vin": 0.25, "gain": -4.545454545454546, "vout": -1.1363636363636365}, "prompt_sha1": "436f1bc4e56f371e0644ad5a509b4c8ece47404d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "electronics", "subdomain": "power", "difficulty": "easy", "input": "A resistor of 10 ohm has 48 V across it. Compute current and dissipated power.", "output": "I=V/R=48/10=4.8 A. P=V²/R=48²/10=230.4 W.", "metadata": {"generator_id": "resistor_power", "reasoning_type": "quantitative", "units": "A/W", "verification": {"kind": "recompute_v4", "v": 48, "r": 10, "i": 4.8, "p": 230.4}, "prompt_sha1": "0eef91173c7451eb97eee53888079555cd4cb425", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 325341150957222460084141520269493094913}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 1 Mbit/s and RTT 15 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 1×10^6 × 15/1000 = 15000 bits = 1875 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 1, "rtt_ms": 15, "bits": 15000.0, "bytes": 1875.0}, "prompt_sha1": "9a133217ee190e3b419ab782149d98d91eb1157f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "digital_design", "subdomain": "encoding", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog priority encoder `prioenc_12_lsb` for `12-bit in`. The lowest numbered asserted bit has priority. Output `4-bit index` and `valid`. Complete RTL only.", "output": "module prioenc_12_lsb (\n input logic [11:0] in,\n output logic [3:0] index,\n output logic valid\n);\n always_comb begin\n index = '0;\n valid = 1'b0;\n for (int i = 11; i >= 0; i--) begin\n if (in[i]) begin\n index = i;\n valid = 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "priority_encoder_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "prioenc_12_lsb", "width": 12, "priority": "low"}, "prompt_sha1": "89397957d82e73281615c49f64f393443203fb65", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188436654265765607539438894002591520565}} {"domain": "networking", "subdomain": "ipv4", "difficulty": "medium", "input": "An IPv4 datagram has 8000 bytes of IP payload and a 24-byte IP header. The outgoing MTU is 1500 bytes. Assuming fragmentation is allowed and every non-final fragment payload must be a multiple of 8 bytes, compute the maximum non-final fragment payload and the number of fragments.", "output": "Maximum raw payload per fragment = 1500-24 = 1476 bytes.\nRound down to an 8-byte multiple: floor((1476)/8)×8 = 1472 bytes.\nFragments required = ceil(8000/1472) = 6.", "metadata": {"generator_id": "ipv4_fragmentation", "reasoning_type": "quantitative", "units": "bytes/fragments", "verification": {"kind": "recompute_v3", "mtu": 1500, "header": 24, "payload": 8000, "max_payload": 1472, "fragments": 6}, "prompt_sha1": "14ac686b146a55e74ca56985cc3d68619d4f7005", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 230061262728531694558269973990105895638}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_3449` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_3449 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_3449"}, "prompt_sha1": "50a96d28e11646f5928f2ec11738c44bad080cf2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "opamp", "difficulty": "easy", "input": "An ideal inverting op-amp has Rin=100 kOhm, Rf=22 kOhm, and Vin=0.05 V. Assuming the amplifier remains in its linear output range, compute closed-loop gain and Vout.", "output": "Gain A_v = -Rf/Rin = -22/100 = -0.220000.\nVout = A_v×Vin = -0.220000×0.05 = -0.011000 V.", "metadata": {"generator_id": "opamp_inverting", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "rin": 100, "rf": 22, "vin": 0.05, "gain": -0.22, "vout": -0.011000000000000001}, "prompt_sha1": "89dabfc86e4840642ae248e6b262cc9ab62c7413", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 91157146697375103930868888386442476986}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 8. Apply operations ['P', 'V', 'V', 'P', 'P']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 8, "ops": ["P", "V", "V", "P", "P"], "value": 7, "blocked": 0}, "prompt_sha1": "80bedf28e2a9ea80f632b112db19b5b9e20379c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 11100010011011001001001 using generator polynomial bits 11011101. Append 7 zeros and perform modulo-2 long division. Give the 7-bit remainder.", "output": "The modulo-2 division remainder is 0000111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 7, "poly": 221, "msg_bits": 23, "msg": 7419465, "remainder": 7}, "prompt_sha1": "ed0146528cca910c4d93c8c5e635c220fef2da4b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=4.7 mH and R=47 ohm, compute time constant τ=L/R.", "output": "τ = 4.7×10^-3/47 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0047, "r": 47, "tau": 0.0001}, "prompt_sha1": "99bd10ec38aef3dea9384e55b5aa1cd4a5e39c8f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "embedded_systems", "subdomain": "pwm", "difficulty": "easy", "input": "A PWM timer uses 300 counts per period. What compare/high-time count produces exactly 30% duty cycle under duty = high_counts/period_counts? Show the arithmetic.", "output": "high_counts = 0.3 × 300 = 90. Verification: 90/300 = 0.3, which is 30%.", "metadata": {"generator_id": "pwm_register", "reasoning_type": "quantitative", "units": "counts", "verification": {"kind": "recompute_v3", "period": 300, "duty": 30, "high": 90}, "prompt_sha1": "0aaa3567c9207ca2c2339e055f19ccc4b9f92d20", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330484663536493421183747795959014103297}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1.2. Branches are 20% of instructions, the branch misprediction rate is 15%, and each misprediction costs 2 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.150 × 2 = 0.060000.\nEffective CPI = 1.2 + 0.060000 = 1.260000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.2, "branch_frac": 0.2, "mispred": 0.15, "penalty": 2, "result": 1.26}, "prompt_sha1": "3abfa5e1bdddc3e141dc73bf479820401d7a1186", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 96 entries and maps 512 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 96×512 KiB = 49152 KiB = 50331648 bytes = 48.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 96, "page_kib": 512, "reach": 50331648}, "prompt_sha1": "2e175b656f1d5b72097b0fdd077df30306302ac0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "computer_architecture", "subdomain": "memory_hierarchy", "difficulty": "medium", "input": "A two-level cache has L1 hit time 1.5 ns and L1 hit rate 92%. On an L1 miss, L2 lookup costs 12 ns and L2 local hit rate is 92%. An L2 miss adds 50 ns main-memory penalty. Compute AMAT.", "output": "AMAT = L1 + MR1 × (L2 + MR2 × Memory)\n= 1.5 + 0.080×(12+0.080×50) = 2.780000 ns.", "metadata": {"generator_id": "multilevel_amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute_v4", "l1": 1.5, "l1_hit": 0.92, "l2": 12, "l2_hit": 0.92, "mem": 50, "amat": 2.7799999999999994}, "prompt_sha1": "41b4b12883142fa3c708cbc92320cc5afd2bc2a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 314049649659438895850720277082504775180}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "medium", "input": "A flat single-level page table covers a 53-bit virtual address space with 1024 byte pages. Assuming one PTE per virtual page, how many PTEs are required?", "output": "Virtual pages = 2^53/2^10 = 2^43 = 8796093022208 PTEs.", "metadata": {"generator_id": "page_table_entries", "reasoning_type": "quantitative", "units": "PTEs", "verification": {"kind": "recompute_v4", "va_bits": 53, "page_exp": 10, "entries": 8796093022208}, "prompt_sha1": "9bf50a91b8d1c0afedf2b1671ece074db35ff830", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 308600096620616408755939954074846159864}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "A 16-bit register has value 0x964C. Extract the 5-bit field starting at bit 4 (LSB=bit 0) using shift-and-mask. Give the mask and extracted value.", "output": "Mask for 5 bits = (1<<5)-1 = 0x1F.\nfield = (0x964C >> 4) & 0x1F = 0x4 (4).", "metadata": {"generator_id": "bitmask_extract", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "width": 16, "field_width": 5, "lsb": 4, "value": 38476, "mask": 31, "field": 4}, "prompt_sha1": "c70465af9a9c74a930e75a4e9db921e2de5c27a1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 64718968925305500854142387090388632121}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "For 7-bit I²C address 0x03, form the transmitted address byte for write (R/W bit=0). Give binary and hexadecimal.", "output": "Address byte = (0x03<<1)|0 = 0x06 = 00000110.", "metadata": {"generator_id": "i2c_address_byte", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "addr": 3, "rw": 0, "byte": 6}, "prompt_sha1": "0d02073e974181589e4aad217c6377e5f3c1e556", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 150806915417189157748971985936107853553}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "The Python function below is intended to return the arithmetic mean but uses floor division:\n```python\ndef mean_5806(xs):\n total = 0\n for x in xs:\n total += x\n return total // len(xs)\n```\nIdentify the bug, provide a corrected implementation, include two assertions with non-integer and integer means, and state behavior for an empty input.", "output": "The bug is `//`, which performs floor division and discards the fractional part. A clear empty-input policy is to raise `ValueError`.\n\n```python\ndef mean_5806(xs):\n if not xs:\n raise ValueError(\"mean requires at least one value\")\n return sum(xs) / len(xs)\n\nassert mean_5806([1, 2]) == 1.5\nassert mean_5806([2, 4, 6]) == 4.0\n```\n\nFor an empty input, the function explicitly raises `ValueError` rather than dividing by zero or inventing a mean.", "metadata": {"generator_id": "python_mean_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "python_exec", "function": "mean_5806"}, "prompt_sha1": "8b6218fb847de633ec9c74e4b01eacea81422840", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 301186669525819253972363186545401062092}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x7C, set bit 7 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 7)`. Result = 0xFC.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 124, "bit": 7, "op": "set", "result": 252}, "prompt_sha1": "a4522da40b8f9d78a4f8a1935a5258b796639bf5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w13_m3870` with clk, asynchronous active-low rst_n, active-high enable, and output logic [12:0] count. On reset count=0. When enabled it increments until 3870 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w13_m3870 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [12:0] count\n);\n localparam logic [12:0] LIMIT = 13'd3870;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w13_m3870", "width": 13, "max": 3870}, "prompt_sha1": "7eefe25c468cf3db85b0d55c4ce44c8d189147f8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A TLB has 1024 entries and maps 256 KiB pages. Assuming each entry maps one page, compute the TLB reach in bytes, KiB, and MiB.", "output": "Reach = entries × page_size = 1024×256 KiB = 262144 KiB = 268435456 bytes = 256.000000 MiB.", "metadata": {"generator_id": "tlb_reach", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "entries": 1024, "page_kib": 256, "reach": 268435456}, "prompt_sha1": "2eaad6ed548b606d43f14c32f4ae9ce4e2bd1629", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 74040620470012523975859759805847271451}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.242.210.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.242.210.0\nBroadcast address: 10.242.210.7\nUsable host range: 10.242.210.1 to 10.242.210.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.242.210.0/29", "usable": 6, "first": "10.242.210.1", "last": "10.242.210.6", "broadcast": "10.242.210.7"}, "prompt_sha1": "1a49d2ae8157056729634a76efe51f103ccfccf6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 5 million instructions at average CPI 2.5 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 5×10^6×2.5/(2×10^9) = 0.00625 s = 6.250000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 5, "cpi": 2.5, "ghz": 2.0, "sec": 0.00625}, "prompt_sha1": "531e4cd8bde045cc34d405f6563f45d7deae8251", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 51-bit up/down counter `updown_51_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_51_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [50:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 51'd2251799813685247) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_51_sat", "width": 51, "wrap": false}, "prompt_sha1": "d23224c8cbae74e70753cdd6e322c2a53e468d56", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "programming_debugging", "subdomain": "bit_manipulation", "difficulty": "easy", "input": "For a 8-bit unsigned value 0x31, set bit 1 using a mask. Give a C-style expression and resulting hexadecimal value.", "output": "Expression: `value | (1ULL << 1)`. Result = 0x33.", "metadata": {"generator_id": "bit_set_clear", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 8, "value": 49, "bit": 1, "op": "set", "result": 51}, "prompt_sha1": "658f0ed23eaaa2080de11f2428f348ddea06f9f1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 151472211154858214217504004186047569908}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 6.6 V source drives a 560 ohm resistor in series with an LED whose forward voltage is assumed to be 1.9 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 6.6-1.9 = 4.7 V.\nI = V/R = 4.7/560 A = 8.3929 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 6.6, "vf": 1.9, "r": 560, "current_a": 0.008392857142857141}, "prompt_sha1": "b71ab274da2709fda2e42032b9fb69a68fee469f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 15-bit right-shift register module `shiftreg_right_15`. Inputs are `clk`, synchronous active-high `rst`, `enable`, and `serial_in`; output is `15-bit q`. When enabled, shift one position per clock and insert `serial_in` at the vacated end. Complete RTL only.", "output": "module shiftreg_right_15 (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic serial_in,\n output logic [14:0] q\n);\n always_ff @(posedge clk) begin\n if (rst)\n q <= '0;\n else if (enable)\n q <= {serial_in, q[14:1]};\n end\nendmodule", "metadata": {"generator_id": "shift_register_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "shiftreg_right_15", "width": 15, "direction": "right"}, "prompt_sha1": "21a3f2c58aa3dd07b26736d4654f002e22cb9b78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 216927427808191586651221286547159806269}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_24` for a synchronous sampled input `noisy`. Update output `clean` only after observing 24 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_24 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [4:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 23) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_24", "stable_samples": 24}, "prompt_sha1": "760a7ff628cedade08cc9269dad0ef2d82260b94", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "signals", "subdomain": "sampling", "difficulty": "easy", "input": "A baseband signal is known to contain no frequency components above 200 Hz. State the Nyquist minimum sampling rate and determine whether proposed sampling rate 800 Hz satisfies it.", "output": "Nyquist minimum is 2×200 = 400 Hz. Proposed rate 800 Hz meets the minimum.", "metadata": {"generator_id": "nyquist_rate", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "fmax": 200, "min_fs": 400, "proposed": 800}, "prompt_sha1": "8cb43fe077d51167304bc6997303aa2793813201", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 239220466310038675546018400360193922263}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 1024 KiB 8-way set-associative cache uses 128-byte lines and 32-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 1048576/128 = 8192.\nSets = 8192/8 = 1024.\nOffset bits = log2(128) = 7; index bits = log2(1024) = 10; tag bits = 32-7-10 = 15.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 1024, "line": 128, "ways": 8, "addr_bits": 32, "lines": 8192, "sets": 1024, "offset": 7, "index": 10, "tag": 15}, "prompt_sha1": "619959b0d06b12b220443a7dcc03751cef93a1b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 80 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 1024. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 80000000/400 = 200000.\nWith prescaler divisor limited to at most 1024, the largest divisor of 200000 that also keeps the period count within 16 bits is 1000.\nPeriod count = 200000/1000 = 200.\nPSC register = 1000-1 = 999.\nARR register = 200-1 = 199.\nVerification: 80000000/(1000×200) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 80000000, "target_hz": 400, "total_division": 200000, "max_prescaler": 1024, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 1000, "period": 200, "psc_reg": 999, "arr_reg": 199}, "prompt_sha1": "6f2648ad10ffaee00e64877d13c6698231a7301b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000 Hz. Consecutive rising edges are 2649 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 2649/1000 s; frequency = 1000/2649 = 0.377501 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000, "delta": 2649, "hz": 0.3775009437523594}, "prompt_sha1": "d9334d2f16e6cd4be23b8a4eb9c450887e06dc9f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x91038CB35C in 5 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 91 03 8C B3 5C.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 5, "value": 622829810524, "endian": "big", "bytes": [145, 3, 140, 179, 92]}, "prompt_sha1": "5051a006a7dbb5cd4ccc6a06427206f43b21e573", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w64_7981` implementing a dual-clock asynchronous FIFO with depth 64 and data width 64. Inputs: `clk_w`, `rst_w`, `wr_en`, `64`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `64`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w64_7981 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 64,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w64_7981", "depth": 64, "width": 64, "ptr_w": 6}, "prompt_sha1": "9e2919d67f8b344788a21eb2b352c62d477c131c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "os_concurrency", "subdomain": "producer_consumer", "difficulty": "easy", "input": "A bounded buffer capacity is 68 and initial occupancy is 60. In an abstract batch, producer attempts to enqueue 8 items first, dropping any excess beyond capacity; then consumer removes up to 55 items. Compute dropped items, consumed items, and final occupancy.", "output": "After production occupancy=68, dropped=0; consumed=55; final occupancy=13.", "metadata": {"generator_id": "producer_consumer_occupancy", "reasoning_type": "quantitative", "units": "items", "verification": {"kind": "recompute_v4", "capacity": 68, "start": 60, "prod": 8, "cons": 55, "dropped": 0, "consumed": 55, "final": 13}, "prompt_sha1": "36bc2624e2f94f9d150dbd8ff61738b2224434ba", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 100675981048015422282577743273548349083}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 50000000 Hz. Consecutive rising edges are 15386 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 15386/50000000 s; frequency = 50000000/15386 = 3249.707526 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 50000000, "delta": 15386, "hz": 3249.707526322631}, "prompt_sha1": "3da958f0f42ad45cc2647a04039881a990c6edf8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "electronics", "subdomain": "filters", "difficulty": "medium", "input": "For a first-order RC low-pass with R=33000 ohm and C=12000 pF, compute the time constant and -3 dB cutoff frequency. Show equations and units.", "output": "τ=RC=33000×12000×10^-12 s = 0.000396 s.\nf_c=1/(2πRC)=1/(2π×33000×12000×10^-12) = 401.9064 Hz.", "metadata": {"generator_id": "rc_lowpass", "reasoning_type": "quantitative", "units": "s/Hz", "verification": {"kind": "recompute", "r": 33000, "c_f": 1.2e-08, "tau": 0.000396, "fc": 401.90642194923066}, "prompt_sha1": "55cf915390b94eae12e3f2992c5e1f90f837f05f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 257649226733571284348938984022627258627}} {"domain": "digital_design", "subdomain": "cdc_fifo", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `async_fifo_d64_w8_6443` implementing a dual-clock asynchronous FIFO with depth 64 and data width 8. Inputs: `clk_w`, `rst_w`, `wr_en`, `8`-bit `din`; `clk_r`, `rst_r`, `rd_en`; outputs: `8`-bit `dout`, `full`, `empty`. Use standard binary-reflected Gray-coded 6-bit read/write pointers with two-stage CDC synchronizers for cross-domain pointer transfer. Full detection in write domain by comparing next write Gray pointer against synchronized read Gray pointer with its two highest bits inverted. Empty detection in read domain by comparing next read Gray pointer against synchronized write Gray pointer. Registered full/empty flags to avoid combinational loops. Correct wraparound behavior. Complete RTL only.", "output": "module async_fifo_d64_w8_6443 #(\n parameter int DEPTH = 64,\n parameter int WIDTH = 8,\n parameter int PTR_W = 6\n) (\n input logic clk_w,\n input logic rst_w,\n input logic wr_en,\n input logic [WIDTH-1:0] din,\n output logic full,\n\n input logic clk_r,\n input logic rst_r,\n input logic rd_en,\n output logic [WIDTH-1:0] dout,\n output logic empty\n);\n\n logic [WIDTH-1:0] mem [0:DEPTH-1];\n\n logic [PTR_W:0] wr_ptr_bin, wr_ptr_bin_next;\n logic [PTR_W:0] rd_ptr_bin, rd_ptr_bin_next;\n logic [PTR_W:0] wr_ptr_gray, wr_ptr_gray_next;\n logic [PTR_W:0] rd_ptr_gray, rd_ptr_gray_next;\n\n logic [PTR_W:0] wr_ptr_gray_sync1, wr_ptr_gray_sync2;\n logic [PTR_W:0] rd_ptr_gray_sync1, rd_ptr_gray_sync2;\n\n assign wr_ptr_bin_next = wr_ptr_bin + (wr_en & ~full);\n assign rd_ptr_bin_next = rd_ptr_bin + (rd_en & ~empty);\n assign wr_ptr_gray_next = (wr_ptr_bin_next ^ (wr_ptr_bin_next >> 1));\n assign rd_ptr_gray_next = (rd_ptr_bin_next ^ (rd_ptr_bin_next >> 1));\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n wr_ptr_bin <= '0;\n wr_ptr_gray <= '0;\n end else begin\n wr_ptr_bin <= wr_ptr_bin_next;\n wr_ptr_gray <= wr_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n rd_ptr_bin <= '0;\n rd_ptr_gray <= '0;\n end else begin\n rd_ptr_bin <= rd_ptr_bin_next;\n rd_ptr_gray <= rd_ptr_gray_next;\n end\n end\n\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w) begin\n rd_ptr_gray_sync1 <= '0;\n rd_ptr_gray_sync2 <= '0;\n end else begin\n rd_ptr_gray_sync1 <= rd_ptr_gray;\n rd_ptr_gray_sync2 <= rd_ptr_gray_sync1;\n end\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r) begin\n wr_ptr_gray_sync1 <= '0;\n wr_ptr_gray_sync2 <= '0;\n end else begin\n wr_ptr_gray_sync1 <= wr_ptr_gray;\n wr_ptr_gray_sync2 <= wr_ptr_gray_sync1;\n end\n end\n\n // Standard Gray-to-binary conversion (all bits)\n function automatic logic [PTR_W:0] gray2bin(input logic [PTR_W:0] gray);\n logic [PTR_W:0] bin;\n bin[PTR_W] = gray[PTR_W];\n for (int i = PTR_W-1; i >= 0; i--) begin\n bin[i] = bin[i+1] ^ gray[i];\n end\n return bin;\n endfunction\n\n logic [PTR_W:0] rd_ptr_bin_wclk, wr_ptr_bin_rclk;\n assign rd_ptr_bin_wclk = gray2bin(rd_ptr_gray_sync2);\n assign wr_ptr_bin_rclk = gray2bin(wr_ptr_gray_sync2);\n\n // Registered full/empty using NEXT pointers (avoids combinational loop, full DEPTH capacity)\n always_ff @(posedge clk_w or posedge rst_w) begin\n if (rst_w)\n full <= 1'b0;\n else\n full <= (wr_ptr_gray_next == {~rd_ptr_gray_sync2[PTR_W], ~rd_ptr_gray_sync2[PTR_W-1], rd_ptr_gray_sync2[PTR_W-2:0]});\n end\n\n always_ff @(posedge clk_r or posedge rst_r) begin\n if (rst_r)\n empty <= 1'b1;\n else\n empty <= (rd_ptr_gray_next == wr_ptr_gray_sync2);\n end\n\n always_ff @(posedge clk_w) begin\n if (wr_en & ~full)\n mem[wr_ptr_bin[PTR_W-1:0]] <= din;\n end\n\n always_ff @(posedge clk_r) begin\n if (rd_en & ~empty)\n dout <= mem[rd_ptr_bin[PTR_W-1:0]];\n end\n\nendmodule", "metadata": {"generator_id": "async_fifo_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "async_fifo_d64_w8_6443", "depth": 64, "width": 8, "ptr_w": 6}, "prompt_sha1": "2c16d6fb3f1374cc83028eb30de45d6c30207a8a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 189809023386943488517782988852792357180}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact steady-state junction temperature for a device dissipating 25 W, but ambient temperature and thermal resistance are not provided.", "output": "The exact junction temperature cannot be computed without ambient temperature and an appropriate thermal resistance/path model. A simple estimate is Tj=Ta+P×θJA, but both Ta and θJA are missing.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "1e0ee1380d8b05522fc3adab38c0d3ebc053c3d6", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "digital_design", "subdomain": "error_detection", "difficulty": "easy", "input": "A 32-bit data word is 00111011011010000100011110101001. Determine the even-parity bit, show the number of 1 bits, and state what odd/even numbers of bit flips a single parity bit can guarantee to detect.", "output": "The data contains 16 ones. For even parity, the parity bit is 0, making the total number of ones even. Single parity guarantees detection of any odd number of flipped bits; it does not guarantee detection of an even number of flipped bits.", "metadata": {"generator_id": "parity_even", "reasoning_type": "quantitative+concept", "units": "bits", "verification": {"kind": "recompute_v3", "bits": "00111011011010000100011110101001", "ones": 16, "parity": 0}, "prompt_sha1": "ac2145b252194e5249d4d67a4d2fcada061eed50", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 226607655293888929511755651204811846157}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111111001001 using generator polynomial bits 10101. Append 4 zeros and perform modulo-2 long division. Give the 4-bit remainder.", "output": "The modulo-2 division remainder is 0111.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 4, "poly": 21, "msg_bits": 12, "msg": 4041, "remainder": 7}, "prompt_sha1": "bc968f18721a4d432548663a530bd332fd95b769", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.60. Using Amdahl's law, compute the theoretical speedup on 192 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.60) + 0.60/192) = 2.480620.\nThe theoretical speedup is about 2.481×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.6, "n": 192, "result": 2.4806201550387597}, "prompt_sha1": "2b0f3178801e4549b6d160f6fa1b75d4c8d145c2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_106` for a synchronous sampled input `noisy`. Update output `clean` only after observing 106 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_106 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 105) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_106", "stable_samples": 106}, "prompt_sha1": "9b52deb354ef409a2cdfddfc8f4c2d8446a3d3b4", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "os_concurrency", "subdomain": "synchronization", "difficulty": "medium", "input": "A counting semaphore starts at 2. Apply operations ['V', 'V', 'P', 'V', 'V', 'P', 'P', 'V', 'P', 'P', 'V', 'V', 'P', 'V', 'V', 'V', 'V', 'P', 'V']. Use this abstract rule: P decrements if value>0, otherwise one caller becomes blocked; V first wakes one blocked caller if any, otherwise increments the value. Report final semaphore value and number of blocked callers.", "output": "Following the stated rules gives final value 7 and 0 blocked caller(s).", "metadata": {"generator_id": "semaphore_trace", "reasoning_type": "state_simulation", "units": "none", "verification": {"kind": "recompute_v4", "start": 2, "ops": ["V", "V", "P", "V", "V", "P", "P", "V", "P", "P", "V", "V", "P", "V", "V", "V", "V", "P", "V"], "value": 7, "blocked": 0}, "prompt_sha1": "ce10ada537c97f67c8cf447da7c33919b072908e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 253070543254246824751154863450935680970}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 60 bits wide and the system uses 512 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 524288 bytes = 2^19 bytes.\nOffset bits = 19.\nVPN bits = 60-19 = 41.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 60, "page_bytes": 524288, "offset_bits": 19, "vpn_bits": 41}, "prompt_sha1": "8448952d6adb2d606042b71b08a31f8148cffc2f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 20 million instructions at average CPI 0.5 on a 3.2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 20×10^6×0.5/(3.2×10^9) = 0.003125 s = 3.125000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 20, "cpi": 0.5, "ghz": 3.2, "sec": 0.003125}, "prompt_sha1": "92d02446f19375fc9f981d962ba6142e6f66c086", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0xD721262FBA60A60D in 8 bytes using little-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 0D A6 60 BA 2F 26 21 D7.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 8, "value": 15501713378818172429, "endian": "little", "bytes": [13, 166, 96, 186, 47, 38, 33, 215]}, "prompt_sha1": "0f144fc090791213da66cb6cf8698c4b506e909d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w4_m10` with clk, asynchronous active-low rst_n, active-high enable, and output logic [3:0] count. On reset count=0. When enabled it increments until 10 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w4_m10 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [3:0] count\n);\n localparam logic [3:0] LIMIT = 4'd10;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w4_m10", "width": 4, "max": 10}, "prompt_sha1": "07d8a9c331e303f6174145e207afdf2dda75bd67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=5 V, R1=47 kOhm from Vin to Vout, and R2=47 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 5×47/(47+47) = 2.500000 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 5, "r1": 47, "r2": 47, "vout": 2.5}, "prompt_sha1": "6d456d1d81e170354feac82b9ec6bd094162c335", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 100 kHz containing one address byte, 1 register-address byte(s), and 14 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 14 = 16.\nClock pulses = 16×9 = 144.\nTime = 144/100000 s = 1440.000 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 100000, "addr_bytes": 1, "payload": 14, "clocks": 144, "time_s": 0.00144}, "prompt_sha1": "dbb5ce5e98966e7066b7ee03cc102d133afa2d86", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "interrupts", "difficulty": "medium", "input": "A 72 MHz CPU services an interrupt at 10 Hz. Each ISR consumes 1951 CPU cycles. Assuming no overlap, compute CPU utilization caused by the ISR.", "output": "Utilization = 10×1951/(72×10^6) = 0.000270972222 = 0.027097%.", "metadata": {"generator_id": "interrupt_cpu_load", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "cpu_mhz": 72, "irq_hz": 10, "cycles": 1951, "load": 0.0002709722222222222}, "prompt_sha1": "b4df891b92ed4ea5c453c69c7f9fc0ff7cc6e4d7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 7990971392953562753144410177772009916}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_4_8646` implementing a 2-to-1 multiplexer for two 4-bit inputs `a` and `b`, select `sel`, and 4-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_4_8646 (\n input logic [3:0] a,\n input logic [3:0] b,\n input logic sel,\n output logic [3:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_4_8646"}, "prompt_sha1": "03a2a66ce4db22dcf6969c73b744d617ca9ca67a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "networking", "subdomain": "link_efficiency", "difficulty": "easy", "input": "A framed link carries 128 payload bytes plus 14 bytes of modeled per-frame overhead. Compute payload efficiency = payload/(payload+overhead) and report the percentage.", "output": "Efficiency = 128/(128+14) = 0.901408 = 90.14%.", "metadata": {"generator_id": "ethernet_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v3", "payload": 128, "overhead": 14, "efficiency": 0.9014084507042254}, "prompt_sha1": "6e5a7ab07b82407e9db2b108f594a7e00fb8e7ce", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 268484930167588739610405557356581561054}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_76` generating a one-clock-cycle `tick` every 76 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_76 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 75) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_76", "divide": 76}, "prompt_sha1": "34ece5c759a3c30e3846d78fe0073b9e9a349625", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 8 data bits per transfer at 2000 MT/s across 2 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 8/8 = 1. Bandwidth = 1×2000×10^6×2 = 4.000000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 8, "rate_mt": 2000, "channels": 2, "gbps": 4.0}, "prompt_sha1": "8fec49c96124c14985a758eb7187f74fe8dd4ee7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "An unloaded voltage divider has Vin=9 V, R1=10 kOhm from Vin to Vout, and R2=22 kOhm from Vout to ground. Compute Vout.", "output": "Vout = Vin×R2/(R1+R2) = 9×22/(10+22) = 6.187500 V.", "metadata": {"generator_id": "voltage_divider", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "vin": 9, "r1": 10, "r2": 22, "vout": 6.1875}, "prompt_sha1": "816b4651c2b6c3203c008f7feacb7bd718ad3853", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 181673646514742475284030977761822151939}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 16 MHz source using integer divider 32. Compute SCLK frequency.", "output": "SCLK = 16 MHz / 32 = 0.500000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 16000000.0, "divider": 32, "spi_hz": 500000.0}, "prompt_sha1": "d6f0446aa2045a026b542243b26f33ec74d4c11a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "computer_architecture", "subdomain": "branch_prediction", "difficulty": "medium", "input": "A 2-bit saturating branch predictor uses states 0=strongly-not-taken, 1=weakly-not-taken, 2=weakly-taken, 3=strongly-taken. It starts in state 1. Apply outcome sequence TNNNTTNNTN. Update the counter after each outcome and give the final state.", "output": "Prediction is not-taken in states 0-1 and taken in states 2-3. Taken increments the counter with saturation at 3; not-taken decrements it with saturation at 0.\nTrace: 1->N on T; 2->T on N; 1->N on N; 0->N on N; 0->N on T; 1->N on T; 2->T on N; 1->N on N; 0->N on T; 1->N on N.\nFinal state = 0.", "metadata": {"generator_id": "branch_predictor_counter", "reasoning_type": "state_machine", "units": "none", "verification": {"kind": "recompute_v3", "start": 1, "outcomes": [1, 0, 0, 0, 1, 1, 0, 0, 1, 0], "final_state": 0}, "prompt_sha1": "0596595cec2ed7da0dc7a96529e9e2af7e1f6f75", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 6238378038780529300566611558812080537}} {"domain": "digital_design", "subdomain": "pulse_logic", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `pulse_stretch_104_ignore` that stretches a one-cycle synchronous `pulse_in` into an asserted `pulse_out` lasting 104 clock cycles including the trigger cycle. Use synchronous active-high reset. While already active, a new trigger shall be ignored. Complete RTL only.", "output": "module pulse_stretch_104_ignore (\n input logic clk,\n input logic rst,\n input logic pulse_in,\n output logic pulse_out\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n end else if (count == 0) begin\n if (pulse_in)\n count <= 7'd104;\n end else begin\n count <= count - 1'b1;\n end\n end\n\n always_comb begin\n pulse_out = (count != 0);\n end\nendmodule", "metadata": {"generator_id": "pulse_stretcher_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "pulse_stretch_104_ignore", "cycles": 104, "retrigger": false}, "prompt_sha1": "076babd49826edbe525aac6b7297f4c7e6a7f426", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 199517363284768859280624409632631260355}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A link transmits at 5 Mbit/s using fixed 256-byte frames. Ignoring all additional overhead, compute maximum frame rate in frames/s.", "output": "Frames/s = 5×10^6 / (256×8) = 2441.406250 frames/s.", "metadata": {"generator_id": "packet_rate", "reasoning_type": "quantitative", "units": "frames/s", "verification": {"kind": "recompute_v4", "rate_mbps": 5, "frame_bytes": 256, "pps": 2441.40625}, "prompt_sha1": "a6e0dd2678168dd389faac4b3cbd495d9fef05a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 61727875332238882489816974042393841609}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=47 mH and R=1 ohm, compute time constant τ=L/R.", "output": "τ = 47×10^-3/1 = 0.047 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.047, "r": 1, "tau": 0.047}, "prompt_sha1": "90349457bf7ee5c76880b7010f258b233914157e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_39619` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_39619 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_39619"}, "prompt_sha1": "bcf1a1795dc0fa030ff7bb11df972597d953b667", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.51. Using Amdahl's law, compute the theoretical speedup on 12 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.51) + 0.51/12) = 1.877934.\nThe theoretical speedup is about 1.878×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.51, "n": 12, "result": 1.8779342723004695}, "prompt_sha1": "51ce46c38af834d0e90ea2643b35f5c34c4a88eb", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "digital_design", "subdomain": "timing_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `tick_div_111` generating a one-clock-cycle `tick` every 111 input clock cycles. Use synchronous active-high reset and a counter; do not generate a derived clock. Complete RTL only.", "output": "module tick_div_111 (\n input logic clk,\n input logic rst,\n output logic tick\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n count <= '0;\n tick <= 1'b0;\n end else if (count == 110) begin\n count <= '0;\n tick <= 1'b1;\n end else begin\n count <= count + 1'b1;\n tick <= 1'b0;\n end\n end\nendmodule", "metadata": {"generator_id": "clock_divider_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "tick_div_111", "divide": 111}, "prompt_sha1": "45089bbe5c675ca68c52e31a07e01b3e34539b0f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 131737808401788609101749185665219931130}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 1000000 Hz. Consecutive rising edges are 43128 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 43128/1000000 s; frequency = 1000000/43128 = 23.186793 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 1000000, "delta": 43128, "hz": 23.186792802819514}, "prompt_sha1": "e6d0058a551e257b56e292758b3e7231469f3a82", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.92. Using Amdahl's law, compute the theoretical speedup on 16 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.92) + 0.92/16) = 7.272727.\nThe theoretical speedup is about 7.273×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.92, "n": 16, "result": 7.272727272727275}, "prompt_sha1": "c1145df4e1330759ec6169609619106f5fe695a9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "energy_storage", "difficulty": "easy", "input": "A capacitor of 100 µF is charged to 1.8 V. Compute stored energy using E=½CV².", "output": "E=0.5×0.0001×1.8²=0.000162 J.", "metadata": {"generator_id": "capacitor_energy", "reasoning_type": "quantitative", "units": "J", "verification": {"kind": "recompute_v4", "c": 9.999999999999999e-05, "v": 1.8, "energy": 0.00016199999999999998}, "prompt_sha1": "d7d0cda040d6dd72eecb31bff69b8edc45426631", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 270168932674960610777434754584386665234}} {"domain": "networking", "subdomain": "tcp", "difficulty": "easy", "input": "For IPv4 MTU 1492 bytes, IP header 20 bytes, and TCP header 52 bytes, compute TCP MSS assuming no other encapsulation.", "output": "MSS = MTU - IP header - TCP header = 1492-20-52 = 1420 bytes.", "metadata": {"generator_id": "mss_from_mtu", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "mtu": 1492, "iphdr": 20, "tcphdr": 52, "mss": 1420}, "prompt_sha1": "fb6ba4fd593168d3b9929db57c2d04ab369f838f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 128147680313772789267245310884770213497}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 1024. Using occupancy formula `(head-tail) mod capacity`, with head index 528 and tail index 744, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (528-744) mod 1024 = 808. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 1024 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 1024, "head": 528, "tail": 744, "occupancy": 808}, "prompt_sha1": "9376e3a2d43bd4b45d62d5c2e06cc60782be95f9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_14_28_9` with RED, GREEN, YELLOW states. Hold RED for 14 clock cycles, GREEN for 28, and YELLOW for 9; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_14_28_9 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 13) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 27) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 8) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_14_28_9", "red": 14, "green": 28, "yellow": 9}, "prompt_sha1": "6c041cc504c9290071e0f329ff9de149a8d1646d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "digital_design", "subdomain": "cdc", "difficulty": "hard", "input": "Write a synthesizable SystemVerilog module `cdc_level_sync_5985` that synchronizes a stable single-bit level `sig_src` into unrelated destination clock domain `clk_dst`. Use exactly two flip-flop stages clocked by `clk_dst`, asynchronous active-low destination reset `rst_n_dst`, and output only the second stage as `sig_dst`. Briefly explain why this is for stable levels, not arbitrarily narrow pulses.", "output": "module cdc_level_sync_5985 (\n input logic clk_dst,\n input logic rst_n_dst,\n input logic sig_src,\n output logic sig_dst\n);\n logic sync_ff1, sync_ff2;\n\n always_ff @(posedge clk_dst or negedge rst_n_dst) begin\n if (!rst_n_dst) begin\n sync_ff1 <= 1'b0;\n sync_ff2 <= 1'b0;\n end else begin\n sync_ff1 <= sig_src;\n sync_ff2 <= sync_ff1;\n end\n end\n\n assign sig_dst = sync_ff2;\nendmodule\n\nThe two destination-clocked stages reduce the probability that metastability propagates into destination logic. This structure is appropriate when `sig_src` remains stable long enough to be sampled. An arbitrarily narrow source pulse can be missed entirely, so pulse transfer needs a pulse-stretch, toggle, or handshake scheme.", "metadata": {"generator_id": "cdc_level_sv", "reasoning_type": "code+design", "units": "none", "verification": {"kind": "iverilog", "top": "cdc_level_sync_5985"}, "prompt_sha1": "6d887dcf4a0c6a8995922d81c54ae7ce77da6f6f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 157114785073624323300210838290731403716}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=0.1 mH and R=10 ohm, compute time constant τ=L/R.", "output": "τ = 0.1×10^-3/10 = 1e-05 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.0001, "r": 10, "tau": 1e-05}, "prompt_sha1": "295cc7d8cf2b76581f28ef9bfb9e241367efd340", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A processor has a 8 KiB direct-mapped data cache with 16-byte lines and 24-bit byte addresses. Determine line count plus offset, index, and tag bits. Show the arithmetic and verify the bit-field sum.", "output": "Cache size = 8 KiB = 8192 bytes.\nLines = 8192/16 = 512.\nOffset bits = log2(16) = 4.\nIndex bits = log2(512) = 9.\nTag bits = 24-9-4 = 11.\nCheck: 11+9+4 = 24 = 24 address bits.", "metadata": {"generator_id": "cache_geometry", "reasoning_type": "quantitative", "units": "bytes/bits", "verification": {"kind": "recompute", "size_b": 8192, "line": 16, "addr_bits": 24, "lines": 512, "offset_bits": 4, "index_bits": 9, "tag_bits": 11}, "prompt_sha1": "e75b40368feaa1484e194b5059f79a94acb48655", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 80697756884665011783051190758366926317}} {"domain": "electronics", "subdomain": "resistor_networks", "difficulty": "easy", "input": "Compute equivalent resistance of 470 ohm and 12000 ohm in parallel.", "output": "R_eq = (R1×R2)/(R1+R2) = (470×12000)/(470+12000) = 452.285485 ohm.", "metadata": {"generator_id": "parallel_resistors", "reasoning_type": "quantitative", "units": "ohm", "verification": {"kind": "recompute_v4", "r1": 470, "r2": 12000, "req": 452.2854851643946}, "prompt_sha1": "ce90cf736e7c9106c2aa4348be965254908a376a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 2015918212700437949078562060178343989}} {"domain": "networking", "subdomain": "error_detection", "difficulty": "medium", "input": "Compute the CRC remainder for message bits 111111100111 using generator polynomial bits 110001. Append 5 zeros and perform modulo-2 long division. Give the 5-bit remainder.", "output": "The modulo-2 division remainder is 11110.", "metadata": {"generator_id": "crc_remainder", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v4", "width": 5, "poly": 49, "msg_bits": 12, "msg": 4071, "remainder": 30}, "prompt_sha1": "b8f00214644dcc4bb10bcfd85d96a41525852ec3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 221929315298880889906239916686817885500}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.192.154.0/29, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.248\nNetwork address: 10.192.154.0\nBroadcast address: 10.192.154.7\nUsable host range: 10.192.154.1 to 10.192.154.6\nTotal addresses = 2^(32-29) = 8; usable hosts = 8-2 = 6.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.192.154.0/29", "usable": 6, "first": "10.192.154.1", "last": "10.192.154.6", "broadcast": "10.192.154.7"}, "prompt_sha1": "a252819567ad94da3a12ba4a23bc6d3b4fb998bd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "programming_debugging", "subdomain": "data_structures", "difficulty": "medium", "input": "A circular buffer has capacity 32. Using occupancy formula `(head-tail) mod capacity`, with head index 0 and tail index 19, compute the occupancy under the assumption that the buffer representation distinguishes full from empty by storing occupancy separately or reserving state.", "output": "occupancy = (0-19) mod 32 = 13. Because modulo indices alone cannot distinguish full from empty when head==tail, the stated representation must retain separate full/occupancy state if all 32 slots are usable.", "metadata": {"generator_id": "ring_buffer_occupancy", "reasoning_type": "quantitative+invariant", "units": "entries", "verification": {"kind": "recompute_v3", "cap": 32, "head": 0, "tail": 19, "occupancy": 13}, "prompt_sha1": "8d26ca69fc4cec637ab7f0b141abc06b6d80426a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 28378038214626702494445219495860096543}} {"domain": "networking", "subdomain": "link_timing", "difficulty": "easy", "input": "A 8093-byte frame is serialized onto a 10000 Mbit/s link. Ignoring framing overhead, propagation, and queueing, calculate serialization delay in seconds and microseconds.", "output": "Frame bits = 8093×8 = 64744 bits.\nSerialization delay = bits/rate = 64744/(10000×10^6) s = 6.4744e-06 s = 6.474400 µs.", "metadata": {"generator_id": "serialization_delay", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute", "size_bytes": 8093, "rate_mbps": 10000, "delay_s": 6.4744e-06}, "prompt_sha1": "4ab015f0ad33e5131c8e67e0e61ef3025b438415", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 114763991923175955585233805299339164533}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Calculate the exact tag width of a direct-mapped 32 KiB cache with 128-byte lines, but the processor address width is unspecified.", "output": "The exact tag width is underdetermined without address width. Line size determines offset bits and cache capacity determines index bits, but tag_bits = address_bits - index_bits - offset_bits still requires address_bits.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "dfa3c9652b28985a1dc8ac761ffa1bf054eab098", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 37 bits wide and the system uses 256 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 262144 bytes = 2^18 bytes.\nOffset bits = 18.\nVPN bits = 37-18 = 19.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 37, "page_bytes": 262144, "offset_bits": 18, "vpn_bits": 19}, "prompt_sha1": "6eca9495f0029a321fd7dc7f840b606a15b27688", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_9` for a synchronous sampled input `noisy`. Update output `clean` only after observing 9 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_9 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [3:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 8) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_9", "stable_samples": 9}, "prompt_sha1": "e0eff0d89982765b115e5d2de1169f9a7ecbb1a7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 33-bit up/down counter `updown_33_sat` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using saturation at 0 and maximum. Complete RTL only.", "output": "module updown_33_sat (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [32:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up) begin\n if (count != 33'd8589934591) count <= count + 1'b1;\n end else begin\n if (count != '0) count <= count - 1'b1;\n end\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_33_sat", "width": 33, "wrap": false}, "prompt_sha1": "0ebeecc4b5d6284033a6c392921b6a85210d3463", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable combinational SystemVerilog barrel shifter `barrel_right_arith_59` for a 59-bit signed input `data`, `6-bit shamt`, and right arithmetic shift output `y`. Complete RTL only.", "output": "module barrel_right_arith_59 (\n input logic signed [58:0] data,\n input logic [5:0] shamt,\n output logic signed [58:0] y\n);\n always_comb begin\n y = data >>> shamt;\n end\nendmodule", "metadata": {"generator_id": "barrel_shifter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "barrel_right_arith_59", "width": 59, "direction": "right", "arithmetic": true}, "prompt_sha1": "8027fef969eba19235e495257b988e2ac518021f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 110616944847521297770384341279340562331}} {"domain": "engineering_safety", "subdomain": "missing_inputs", "difficulty": "medium", "input": "Convert ADC code 2723 to an exact input voltage, but ADC resolution and reference voltage are not specified.", "output": "A numeric voltage cannot be determined without ADC resolution and reference voltage (and the code convention). Under a common ideal model V=code/(2^N-1)×Vref, both N and Vref are required.", "metadata": {"generator_id": "missing_input_trap", "reasoning_type": "missing_input_refusal", "units": "mixed", "verification": {"kind": "invariant", "checks": ["does not invent missing value", "states required input/formula"]}, "prompt_sha1": "c83faead57243608eaf1a192183b46a50bcf5745", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 331873039730038143565396681491453234406}} {"domain": "networking", "subdomain": "udp", "difficulty": "easy", "input": "A UDP datagram carries 695 payload bytes over IPv6. Ignore link-layer overhead and IP options. Compute payload efficiency using 40-byte IP header and 8-byte UDP header.", "output": "Efficiency = 695/(695+40+8) = 0.935397 = 93.54%.", "metadata": {"generator_id": "udp_efficiency", "reasoning_type": "quantitative", "units": "%", "verification": {"kind": "recompute_v4", "payload": 695, "iphdr": 40, "eff": 0.9353970390309556}, "prompt_sha1": "1235f361d8c67ae2a9753198f21586d48ea9206a", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 36765111164407137231014104143028908913}} {"domain": "networking", "subdomain": "tcp", "difficulty": "medium", "input": "A TCP path has bottleneck rate 5000 Mbit/s and RTT 80 ms. Ignoring protocol overhead, what minimum in-flight data window in bytes is needed to match the bandwidth-delay product?", "output": "BDP = 5000×10^6×80/1000/8 = 50000000.000000 bytes.", "metadata": {"generator_id": "tcp_window_bdp", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "rate_mbps": 5000, "rtt_ms": 80, "bytes": 50000000.0}, "prompt_sha1": "cc937fbb34b4200f465fa4203f5d4c2cebc38ffc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 217039671086905858028418960857642294385}} {"domain": "programming_debugging", "subdomain": "c_memory_safety", "difficulty": "easy", "input": "Review this C loop for `data`, an array of exactly `items` elements of type `float`:\n```c\nfor (size_t i = 0; i <= items; ++i) {\n sum += data[i];\n}\n```\nIdentify the memory-safety bug, give the corrected loop condition, and state exactly which access is invalid.", "output": "The loop has an off-by-one error. Valid indices are 0 through `items-1`, but `i <= items` also executes at `i == items` and accesses `data[items]`, one element past the array.\n\nCorrect form:\n```c\nfor (size_t i = 0; i < items; ++i) {\n sum += data[i];\n}\n```", "metadata": {"generator_id": "c_bounds_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "invariant", "checks": ["valid indices 0..n-1", "uses < not <="]}, "prompt_sha1": "b58bdac96b593dd5d43f9b88fc1bb6c4b43e10b7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 9837084990021894315612152043813737748}} {"domain": "computer_architecture", "subdomain": "memory_bandwidth", "difficulty": "easy", "input": "A memory interface transfers 128 data bits per transfer at 2400 MT/s across 8 independent channel(s). Ignoring protocol overhead, compute theoretical aggregate bandwidth in GB/s.", "output": "Bytes/transfer = 128/8 = 16. Bandwidth = 16×2400×10^6×8 = 307.200000 GB/s.", "metadata": {"generator_id": "memory_bandwidth", "reasoning_type": "quantitative", "units": "GB/s", "verification": {"kind": "recompute_v4", "width_bits": 128, "rate_mt": 2400, "channels": 8, "gbps": 307.2}, "prompt_sha1": "b90886d1cea6d6560fa2487a847b6e66295fd52c", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 288993786766496837461190853874933238086}} {"domain": "os_concurrency", "subdomain": "deadlock", "difficulty": "medium", "input": "producer acquires lock RX then L1; task_B acquires L1 then RX. Explain a deadlock interleaving and give a deterministic global lock-ordering rule that prevents this deadlock class.", "output": "Deadlock is possible if producer holds RX while waiting for L1, while task_B holds L1 while waiting for RX; this forms a circular wait. Define one global total order and require every thread to acquire locks only in that order. Under lexical ordering here, both acquire L1 before RX. This removes the circular-wait condition for this lock set.", "metadata": {"generator_id": "deadlock_order", "reasoning_type": "design", "units": "none", "verification": {"kind": "invariant", "checks": ["circular wait identified", "global ordering breaks cycle"]}, "prompt_sha1": "3b78cf0dab2b8bb650ead2446372afac93040c78", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 222212160993274605409001350698688896397}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 20.4 V source drives a 1200 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 20.4-2.6 = 17.8 V.\nI = V/R = 17.8/1200 A = 14.8333 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 20.4, "vf": 2.6, "r": 1200, "current_a": 0.01483333333333333}, "prompt_sha1": "f9c54ab37094b40cb67c1b2bf81bd97b12c07a46", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "easy", "input": "A timer capture counter ticks at 100000 Hz. Consecutive rising edges are 44742 timer counts apart. Assuming no overflow ambiguity, compute input frequency.", "output": "Period = 44742/100000 s; frequency = 100000/44742 = 2.235036 Hz.", "metadata": {"generator_id": "timer_capture_frequency", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "tick_hz": 100000, "delta": 44742, "hz": 2.235036431093827}, "prompt_sha1": "0f8d9714fbe123887517bb945d174ef2f79686e3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 208535196542894169842643827984634718596}} {"domain": "computer_architecture", "subdomain": "parallel_speedup", "difficulty": "medium", "input": "A workload has parallel fraction 0.77. Using Amdahl's law, compute the theoretical speedup on 12 processors. Show the formula and arithmetic.", "output": "Amdahl's law: S = 1 / ((1-P) + P/N).\nS = 1 / ((1-0.77) + 0.77/12) = 3.399433.\nThe theoretical speedup is about 3.399×.", "metadata": {"generator_id": "amdahl_speedup", "reasoning_type": "quantitative", "units": "x", "verification": {"kind": "recompute_v3", "p": 0.77, "n": 12, "result": 3.39943342776204}, "prompt_sha1": "7cfb87fd2eceeb3e05c3f6d87b3e7c8ba33fea72", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 13522195354463443118692786490770997073}} {"domain": "electronics", "subdomain": "transients", "difficulty": "medium", "input": "An initially discharged RC circuit has R=4700 ohm, C=470 nF and is stepped to 1.8 V. Compute capacitor voltage after 2 time constants using Vc=Vin(1-e^(-t/RC)).", "output": "At t=2τ, Vc=1.8(1-e^-2)=1.556396 V; τ=0.002209 s and t=0.004418 s.", "metadata": {"generator_id": "rc_step_response", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v4", "r": 4700, "c": 4.7000000000000005e-07, "multiple": 2, "vin": 1.8, "vc": 1.5563964901740972}, "prompt_sha1": "22101153dc63fdfc1a70575fd2bb64ee3da672e5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 252423421922394193372060808529708921804}} {"domain": "electronics", "subdomain": "adc", "difficulty": "easy", "input": "For an ideal 13-bit ADC spanning 0 to 3 V, compute the ideal 1-LSB voltage step using Vref/2^N.", "output": "1 LSB = 3/2^13 V = 0.0003662109375 V = 366.210938 µV.", "metadata": {"generator_id": "adc_lsb", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute_v3", "bits": 13, "vref": 3.0, "step": 0.0003662109375}, "prompt_sha1": "bd9ed4c106ff171fc6fe3fb0e745572b2bcfe5db", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 183645540638414687465875969476191605642}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 24 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 256. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 24000000/400 = 60000.\nWith prescaler divisor limited to at most 256, the largest divisor of 60000 that also keeps the period count within 16 bits is 250.\nPeriod count = 60000/250 = 240.\nPSC register = 250-1 = 249.\nARR register = 240-1 = 239.\nVerification: 24000000/(250×240) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 24000000, "target_hz": 400, "total_division": 60000, "max_prescaler": 256, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 250, "period": 240, "psc_reg": 249, "arr_reg": 239}, "prompt_sha1": "a948a5b80d16659781414621631aae99d164114f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "networking", "subdomain": "ipv4_subnetting", "difficulty": "easy", "input": "For IPv4 network 10.175.188.0/24, give the subnet mask, network address, broadcast address, usable host range, and number of usable host addresses.", "output": "Subnet mask: 255.255.255.0\nNetwork address: 10.175.188.0\nBroadcast address: 10.175.188.255\nUsable host range: 10.175.188.1 to 10.175.188.254\nTotal addresses = 2^(32-24) = 256; usable hosts = 256-2 = 254.", "metadata": {"generator_id": "subnetting", "reasoning_type": "quantitative", "units": "addresses", "verification": {"kind": "recompute", "cidr": "10.175.188.0/24", "usable": 254, "first": "10.175.188.1", "last": "10.175.188.254", "broadcast": "10.175.188.255"}, "prompt_sha1": "58a9025c760bf34342467123f1f1a9d63ffc946e", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 236270631380298549394678915759261159548}} {"domain": "electronics", "subdomain": "ohms_law", "difficulty": "easy", "input": "A 11.9 V source drives a 1500 ohm resistor in series with an LED whose forward voltage is assumed to be 2.6 V at the operating point. Estimate LED current using the constant-Vf model and state the approximation.", "output": "Resistor voltage = 11.9-2.6 = 9.3 V.\nI = V/R = 9.3/1500 A = 6.2000 mA. This treats LED forward voltage as constant; actual Vf depends on current and temperature.", "metadata": {"generator_id": "led_resistor", "reasoning_type": "quantitative", "units": "mA", "verification": {"kind": "recompute", "supply": 11.9, "vf": 2.6, "r": 1500, "current_a": 0.006200000000000001}, "prompt_sha1": "e9bfcf1a0d29e5437ef59fbbcaaea9242c59d218", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 198097005956727382401495423888679184442}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1506` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1506 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1506 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1506;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1506", "width": 11, "max": 1506}, "prompt_sha1": "a8c37daff45f4976a87adec5ab90c4ba116685c9", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "memory", "difficulty": "medium", "input": "A cache has 4 ns hit time, 95.9% hit rate, and a 15 ns miss penalty measured in addition to the lookup. Compute AMAT and show the miss-rate arithmetic.", "output": "Miss rate = 1-0.959 = 0.041.\nAMAT = hit time + miss rate × miss penalty\n= 4 ns + 0.041×15 ns = 4.6150 ns.", "metadata": {"generator_id": "amat", "reasoning_type": "quantitative", "units": "ns", "verification": {"kind": "recompute", "hit_ns": 4.0, "hit_rate": 0.959, "penalty": 15, "result": 4.615}, "prompt_sha1": "184cf09db3ccef6aabbe0217e94a9d802f648b67", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 285175301675717927911941544079112633450}} {"domain": "programming_debugging", "subdomain": "python", "difficulty": "easy", "input": "A Python sequence has exactly 445 elements. Review loop `for i in range(445+1):` used to index every element. Identify the off-by-one bug, give the corrected range, and explain the invalid or missing index.", "output": "`range(445+1)` includes index 445, which is out of range for a length-445 sequence. Correct loop: `for i in range(445):`.", "metadata": {"generator_id": "python_range_bug", "reasoning_type": "debugging", "units": "none", "verification": {"kind": "recompute_v4", "n": 445, "variant": "one_past"}, "prompt_sha1": "921c519aab55e1a0bc7bbe4df9b301e91485852d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336502087363264411100729960460411057797}} {"domain": "digital_design", "subdomain": "sequential_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `rise_detect_786251` that produces a one-clock-cycle pulse `rise` on a 0-to-1 transition of synchronous input `sig`. Use synchronous active-high reset `rst` and one register storing the previous sample. Complete RTL only.", "output": "module rise_detect_786251 (\n input logic clk,\n input logic rst,\n input logic sig,\n output logic rise\n);\n logic prev;\n always_ff @(posedge clk) begin\n if (rst) begin\n prev <= 1'b0;\n rise <= 1'b0;\n end else begin\n rise <= sig & ~prev;\n prev <= sig;\n end\n end\nendmodule", "metadata": {"generator_id": "edge_detector_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "rise_detect_786251"}, "prompt_sha1": "29a4c5dc86dfc975f212165e75c37a98256b37e0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 201920305897386425994686584760525798569}} {"domain": "embedded_systems", "subdomain": "timers", "difficulty": "medium", "input": "An MCU timer is clocked at 32 MHz and must generate an exact 400 Hz update event. Both the prescaler register and auto-reload register are 16-bit and store divisor-1. The prescaler divisor must not exceed 64. Using f_update = f_timer/(prescaler×period_counts), choose the largest valid prescaler divisor within that limit, determine the period count, give PSC and ARR register values, and verify the resulting frequency.", "output": "Required total division = 32000000/400 = 80000.\nWith prescaler divisor limited to at most 64, the largest divisor of 80000 that also keeps the period count within 16 bits is 64.\nPeriod count = 80000/64 = 1250.\nPSC register = 64-1 = 63.\nARR register = 1250-1 = 1249.\nVerification: 32000000/(64×1250) = 400 Hz exactly.", "metadata": {"generator_id": "timer_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute", "clock_hz": 32000000, "target_hz": 400, "total_division": 80000, "max_prescaler": 64, "period_limit": 65536, "selection_policy": "largest_valid_prescaler", "prescaler": 64, "period": 1250, "psc_reg": 63, "arr_reg": 1249}, "prompt_sha1": "972ad64f3de4935232eff3081a3a98a96af6ac38", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 271150797332510267579201486649982198763}} {"domain": "computer_architecture", "subdomain": "virtual_memory", "difficulty": "easy", "input": "A virtual address is 44 bits wide and the system uses 32 KiB pages. How many page-offset bits and virtual-page-number bits are there? Show the calculation.", "output": "Page size = 32768 bytes = 2^15 bytes.\nOffset bits = 15.\nVPN bits = 44-15 = 29.", "metadata": {"generator_id": "page_address_bits", "reasoning_type": "quantitative", "units": "bits", "verification": {"kind": "recompute_v3", "addr_bits": 44, "page_bytes": 32768, "offset_bits": 15, "vpn_bits": 29}, "prompt_sha1": "8b5e57c68fa25b374a785af9c9cf0446698cd082", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 293677214040250137083680968427954799620}} {"domain": "digital_design", "subdomain": "fsm", "difficulty": "medium", "input": "Design a synthesizable SystemVerilog Moore FSM `traffic_fsm_17_24_13` with RED, GREEN, YELLOW states. Hold RED for 17 clock cycles, GREEN for 24, and YELLOW for 13; then repeat. Use synchronous active-high reset, explicit state register, combinational next-state/output logic, and a cycle counter. Output `light[1:0]` encodes RED=00, GREEN=01, YELLOW=10.", "output": "module traffic_fsm_17_24_13 (\n input logic clk,\n input logic rst,\n output logic [1:0] light\n);\n typedef enum logic [1:0] {RED=2'b00, GREEN=2'b01, YELLOW=2'b10} state_t;\n state_t state, next_state;\n logic [4:0] count, next_count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n state <= RED;\n count <= '0;\n end else begin\n state <= next_state;\n count <= next_count;\n end\n end\n\n always_comb begin\n next_state = state;\n next_count = count;\n light = 2'b00;\n\n case (state)\n RED: begin\n light = 2'b00;\n if (count == 16) begin\n next_state = GREEN;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n GREEN: begin\n light = 2'b01;\n if (count == 23) begin\n next_state = YELLOW;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n YELLOW: begin\n light = 2'b10;\n if (count == 12) begin\n next_state = RED;\n next_count = '0;\n end else next_count = count + 1'b1;\n end\n default: begin\n next_state = RED;\n next_count = '0;\n light = 2'b00;\n end\n endcase\n end\nendmodule", "metadata": {"generator_id": "fsm_timer_sv", "reasoning_type": "code", "units": "cycles", "verification": {"kind": "iverilog", "top": "traffic_fsm_17_24_13", "red": 17, "green": 24, "yellow": 13}, "prompt_sha1": "c32ee580836ef886257602747dd5344b32a117f7", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 330388558773526457434180755554458340840}} {"domain": "embedded_systems", "subdomain": "adc", "difficulty": "easy", "input": "An ideal 10-bit ADC uses a 5 V reference and returns code 333. Using V=code/(2^N-1)×Vref, estimate the input voltage and show the arithmetic.", "output": "Maximum code = 2^10-1 = 1023.\nV = 333/1023 × 5 V = 1.627566 V.\nThus the estimated input is about 1.6276 V under the ideal-ADC assumption.", "metadata": {"generator_id": "adc_voltage", "reasoning_type": "quantitative", "units": "V", "verification": {"kind": "recompute", "bits": 10, "vref": 5.0, "code": 333, "volts": 1.627565982404692}, "prompt_sha1": "6868fa7285890e7286d4c6fcd7efb726aee2a6dd", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 23784194280052196787610737603478305052}} {"domain": "embedded_systems", "subdomain": "spi", "difficulty": "easy", "input": "An SPI peripheral derives SCLK from a 160 MHz source using integer divider 16. Compute SCLK frequency.", "output": "SCLK = 160 MHz / 16 = 10.000000 MHz.", "metadata": {"generator_id": "spi_clock_divider", "reasoning_type": "quantitative", "units": "Hz", "verification": {"kind": "recompute_v4", "clock_hz": 160000000.0, "divider": 16, "spi_hz": 10000000.0}, "prompt_sha1": "07bf052558cca22cd4abd445c0cbc25b97e477a0", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 14938885615991273182802420670361589804}} {"domain": "embedded_systems", "subdomain": "i2c", "difficulty": "easy", "input": "Estimate the clocking time for an I²C transfer at 400 kHz containing one address byte, 1 register-address byte(s), and 21 payload byte(s). Model each transferred byte as 8 data bits plus 1 ACK/NACK clock and ignore START/STOP timing. Show the calculation.", "output": "Transferred bytes = 1 + 1 + 21 = 23.\nClock pulses = 23×9 = 207.\nTime = 207/400000 s = 517.500 µs.", "metadata": {"generator_id": "i2c_transfer_time", "reasoning_type": "quantitative", "units": "us", "verification": {"kind": "recompute_v3", "freq": 400000, "addr_bytes": 1, "payload": 21, "clocks": 207, "time_s": 0.0005175}, "prompt_sha1": "951566ff6dba5516a7d36025c3efc8a703061a37", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 336740741948636897735173774098712054648}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 84 MHz and uses 8× oversampling. Using integer divisor D with baud = f_clk/(8×D), choose the nearest integer divisor for target 115200 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 84000000/(8×115200) = 91.145833.\nNearest integer divisor D = 91.\nActual baud = 84000000/(8×91) = 115384.615 baud.\nError = (115384.615-115200)/115200×100% = 0.1603%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 84000000, "oversample": 8, "baud": 115200, "divisor": 91, "actual": 115384.61538461539, "error_pct": 0.1602564102564151}, "prompt_sha1": "3b2ca0bb3ceccef58dce8b71bb5520073e257d63", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "networking", "subdomain": "performance", "difficulty": "medium", "input": "A path has bottleneck rate 2000 Mbit/s and RTT 3 ms. Compute the bandwidth-delay product in bits and bytes. Treat RTT as the round-trip interval needed to keep a sender's window full.", "output": "BDP = bandwidth × RTT = 2000×10^6 × 3/1000 = 6e+06 bits = 750000 bytes.", "metadata": {"generator_id": "bandwidth_delay_product", "reasoning_type": "quantitative", "units": "bits/bytes", "verification": {"kind": "recompute_v3", "rate_mbps": 2000, "rtt_ms": 3, "bits": 6000000.0, "bytes": 750000.0}, "prompt_sha1": "e8e4b42b91f3d8436d4431c1b3aca23e5dc1a66b", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 255564060057111713835362803003097309015}} {"domain": "electronics", "subdomain": "transients", "difficulty": "easy", "input": "For a series RL circuit with L=22 mH and R=220 ohm, compute time constant τ=L/R.", "output": "τ = 22×10^-3/220 = 0.0001 s.", "metadata": {"generator_id": "rl_time_constant", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "l_h": 0.022, "r": 220, "tau": 9.999999999999999e-05}, "prompt_sha1": "f2f95bd72e478adb0b435068845cd0d7a2e985e8", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 188501266870730351847756505511510995664}} {"domain": "computer_architecture", "subdomain": "endianness", "difficulty": "easy", "input": "Store integer 0x1846 in 2 bytes using big-endian byte order. List memory bytes from lowest address to highest.", "output": "Bytes from lowest to highest address: 18 46.", "metadata": {"generator_id": "endian_pack", "reasoning_type": "quantitative", "units": "bytes", "verification": {"kind": "recompute_v4", "nbytes": 2, "value": 6214, "endian": "big", "bytes": [24, 70]}, "prompt_sha1": "ba30b03bfaac5332cce08b1422ceb72bc9b07f8d", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 101158467274302013421904323997347932002}} {"domain": "digital_design", "subdomain": "input_conditioning", "difficulty": "medium", "input": "Write a synthesizable SystemVerilog module `debounce_84` for a synchronous sampled input `noisy`. Update output `clean` only after observing 84 consecutive samples different from the current `clean` value. Inputs are `clk` and synchronous active-high `rst`. Complete RTL only.", "output": "module debounce_84 (\n input logic clk,\n input logic rst,\n input logic noisy,\n output logic clean\n);\n logic [6:0] count;\n\n always_ff @(posedge clk) begin\n if (rst) begin\n clean <= 1'b0;\n count <= '0;\n end else if (noisy == clean) begin\n count <= '0;\n end else if (count == 83) begin\n clean <= noisy;\n count <= '0;\n end else begin\n count <= count + 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "debounce_counter_sv", "reasoning_type": "code", "units": "samples", "verification": {"kind": "iverilog", "top": "debounce_84", "stable_samples": 84}, "prompt_sha1": "3726eab0b198122096f4dbe6b46fed8be64ee0d3", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 202036058429775279970820073013518442792}} {"domain": "computer_architecture", "subdomain": "cache", "difficulty": "medium", "input": "A 8 KiB 8-way set-associative cache uses 16-byte lines and 64-bit byte addresses. Compute total lines, number of sets, offset bits, set-index bits, and tag bits.", "output": "Total lines = 8192/16 = 512.\nSets = 512/8 = 64.\nOffset bits = log2(16) = 4; index bits = log2(64) = 6; tag bits = 64-4-6 = 54.", "metadata": {"generator_id": "set_assoc_cache_geometry", "reasoning_type": "quantitative", "units": "bits/sets", "verification": {"kind": "recompute_v4", "size_kib": 8, "line": 16, "ways": 8, "addr_bits": 64, "lines": 512, "sets": 64, "offset": 4, "index": 6, "tag": 54}, "prompt_sha1": "d0e47b6f35a4ff6af4916598d5d035d315751d36", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 44274275723195297263975555817481450801}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 50 million instructions at average CPI 3 on a 3.5 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 50×10^6×3/(3.5×10^9) = 0.0428571429 s = 42.857143 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 50, "cpi": 3.0, "ghz": 3.5, "sec": 0.04285714285714286}, "prompt_sha1": "3828ec5f79dd2e3e76f9b8c49bf836b89d1447cc", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "computer_architecture", "subdomain": "performance", "difficulty": "easy", "input": "A program executes 100 million instructions at average CPI 2 on a 2 GHz processor. Ignoring other effects, compute execution time.", "output": "CPU time = instructions×CPI / clock_rate = 100×10^6×2/(2×10^9) = 0.1 s = 100.000000 ms.", "metadata": {"generator_id": "cpu_execution_time", "reasoning_type": "quantitative", "units": "s", "verification": {"kind": "recompute_v4", "inst_m": 100, "cpi": 2.0, "ghz": 2.0, "sec": 0.1}, "prompt_sha1": "58bd4f161421179fec09cb3465718c22fb82e0d5", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 94807044613210190380385919459279369984}} {"domain": "digital_design", "subdomain": "rtl_counter", "difficulty": "easy", "input": "Write synthesizable SystemVerilog module `sat_counter_w11_m1367` with clk, asynchronous active-low rst_n, active-high enable, and output logic [10:0] count. On reset count=0. When enabled it increments until 1367 and then saturates; when disabled it holds. Provide complete RTL only.", "output": "module sat_counter_w11_m1367 (\n input logic clk,\n input logic rst_n,\n input logic enable,\n output logic [10:0] count\n);\n localparam logic [10:0] LIMIT = 11'd1367;\n always_ff @(posedge clk or negedge rst_n) begin\n if (!rst_n)\n count <= '0;\n else if (enable && count < LIMIT)\n count <= count + 1'b1;\n end\nendmodule", "metadata": {"generator_id": "sat_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "sat_counter_w11_m1367", "width": 11, "max": 1367}, "prompt_sha1": "ce436067b3d9dbdec6f550ddb87116632bcc3133", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 129031675640782979390190387191915904765}} {"domain": "computer_architecture", "subdomain": "pipeline_performance", "difficulty": "medium", "input": "A processor has base CPI 1. Branches are 20% of instructions, the branch misprediction rate is 20%, and each misprediction costs 3 cycles. Ignoring other stalls, compute the effective CPI.", "output": "Extra CPI from branch mispredictions = branch_fraction × misprediction_rate × penalty\n= 0.200 × 0.200 × 3 = 0.120000.\nEffective CPI = 1 + 0.120000 = 1.120000.", "metadata": {"generator_id": "pipeline_cpi", "reasoning_type": "quantitative", "units": "cycles/instruction", "verification": {"kind": "recompute_v3", "base": 1.0, "branch_frac": 0.2, "mispred": 0.2, "penalty": 3, "result": 1.12}, "prompt_sha1": "044552bb8f3fa527d377bb55e5cf0b913c5c30f2", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 140725183026489742390213023104275153822}} {"domain": "digital_design", "subdomain": "combinational_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog module `mux2_64_6049` implementing a 2-to-1 multiplexer for two 64-bit inputs `a` and `b`, select `sel`, and 64-bit output `y`. When sel=0 choose a; when sel=1 choose b.", "output": "module mux2_64_6049 (\n input logic [63:0] a,\n input logic [63:0] b,\n input logic sel,\n output logic [63:0] y\n);\n always_comb begin\n y = sel ? b : a;\n end\nendmodule", "metadata": {"generator_id": "mux_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "mux2_64_6049"}, "prompt_sha1": "24aefaff4dd88db391a207ac3988ffdff16c22c1", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 144083819689248228884640706673439333893}} {"domain": "embedded_systems", "subdomain": "uart", "difficulty": "medium", "input": "A UART peripheral clock is 20 MHz and uses 16× oversampling. Using integer divisor D with baud = f_clk/(16×D), choose the nearest integer divisor for target 230400 baud, then compute actual baud and percentage error.", "output": "Ideal divisor = 20000000/(16×230400) = 5.425347.\nNearest integer divisor D = 5.\nActual baud = 20000000/(16×5) = 250000.000 baud.\nError = (250000.000-230400)/230400×100% = 8.5069%.", "metadata": {"generator_id": "uart_divider", "reasoning_type": "quantitative", "units": "baud/%", "verification": {"kind": "recompute_v3", "clock": 20000000, "oversample": 16, "baud": 230400, "divisor": 5, "actual": 250000.0, "error_pct": 8.506944444444445}, "prompt_sha1": "9a3d279b15f7f3f9def004c47502f3a0edb4c6ef", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 60421103783918937468424432998204641990}} {"domain": "digital_design", "subdomain": "counter_rtl", "difficulty": "easy", "input": "Write a synthesizable SystemVerilog 54-bit up/down counter `updown_54_wrap` with `clk`, synchronous `rst`, `enable`, `up`, and output `count`. When enabled it counts up if `up=1`, down otherwise, using modulo wraparound. Complete RTL only.", "output": "module updown_54_wrap (\n input logic clk,\n input logic rst,\n input logic enable,\n input logic up,\n output logic [53:0] count\n);\n always_ff @(posedge clk) begin\n if (rst)\n count <= '0;\n else if (enable) begin\n if (up)\n count <= count + 1'b1;\n else\n count <= count - 1'b1;\n end\n end\nendmodule", "metadata": {"generator_id": "updown_counter_sv", "reasoning_type": "code", "units": "none", "verification": {"kind": "iverilog", "top": "updown_54_wrap", "width": 54, "wrap": true}, "prompt_sha1": "1c2a3aa50e2c7ee2331db3d16b619267275c061f", "clean_room": true, "inherits_exp009_answer": false, "protected_eval_used": false, "pipeline_generation": "v5", "rng_seed_derivation": "sha256-v1", "generator_rng_seed": 102212874331387092468030106518675938614}}