Datasets:

prompt
stringlengths
450
62.1k
response
stringlengths
1.28k
36.6k
top_module
stringlengths
1
104
instance
stringlengths
2
109
Read the SystemVerilog module `altera_up_video_decoder_add_endofpacket` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module altera_up_video_decoder_add_endofpacket ( clk, reset, stream_in_data, stream_in_startofpacket, stream_in_endofpacket...
<think> * Module Name: `altera_up_video_decoder_add_endofpacket` * Inputs: `clk`, `reset`, `stream_in_data`, `stream_in_startofpacket`, `stream_in_endofpacket`, `stream_in_valid`, `stream_out_ready`. * Outputs: `stream_in_ready`, `stream_out_data`, `stream_out_startofpacket`, `stream_out_endofpacket`, `s...
altera_up_video_decoder_add_endofpacket
altera_up_video_decoder_add_endofpacket_verif_tb
Read the SystemVerilog module `final_project_mm_interconnect_0_cmd_demux` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and ot...
<think> * Module Name: `final_project_mm_interconnect_0_cmd_demux` * Purpose: Demultiplexer for command data based on a one-hot channel signal. * Inputs: `clk`, `reset`, `sink_valid`, `sink_data` (107 bits), `sink_channel` (13 bits), `sink_startofpacket`, `sink_endofpacket`, and 13 `srcX_ready` signals. ...
final_project_mm_interconnect_0_cmd_demux
dut
Read the SystemVerilog module `accelerator_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // //...
<think> * DUT: `accelerator_design`. * Functionality: 8-bit unsigned adder with a 9-bit registered output. * Inputs: `clk`, `rst` (async active-high), `in1` [7:0], `in2` [7:0]. * Output: `out` [8:0]. * Reset: Asynchronous, forces `out` to 0. * Clock: Rising edge triggers addition. Outpu...
accelerator_design
accelerator_design_verif_tb
Read the SystemVerilog module `Decoder` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module Decoder ( input [2:0] inpt, input enb, // Enable output reg [7:0] out ); always @(*) begin if (enb) begin case (inpt) 3'b0...
<think> * DUT: `Decoder` (3-to-8 line decoder with enable). * Functionality: * `enb = 1`: `out = (1 << inpt)`. * `enb = 0`: `out = 0`. * Requirements: * Self-checking. * Follow the provided Test Plan. * Compatibility with `iverilog -g2012` (no classes, no...
Decoder
tb
Read the SystemVerilog module `som_system_altera_merlin_demultiplexer_180_uoxykti` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functio...
<think> * Module Name: `som_system_altera_merlin_demultiplexer_180_uoxykti` * Purpose: A demultiplexer for a streaming interface. It takes a single input stream (sink) and routes it to one of two output streams (src0 or src1) based on a `sink_channel` one-hot signal. * Parameters: `ST_DATA_W` = 108, `ST_...
som_system_altera_merlin_demultiplexer_180_uoxykti
tb_top
Read the SystemVerilog module `ALU` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 2021/03/10 19:0...
<think> Expert SystemVerilog Verification Engineer. `ALU` module (combinational). * `a` (32-bit), `b` (32-bit), `alucount` (3-bit). * `res` (32-bit), `zero` (1-bit). * Operation Mapping: * `000`: AND (`a & b`) * `001`: OR (`a | b`) * `010`: ADD (...
ALU
dut
Read the SystemVerilog module `accelerator_design` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ ...
<think> * Module name: `accelerator_design`. * Inputs: `clk`, `rst` (asynchronous reset, active high), `in1` [7:0], `in2` [7:0]. * Output: `out` [8:0]. * Logic: On `posedge clk`, `out <= in1 + in2`. On `posedge rst`, `out <= 0`. * Functionality: A simple registered 8-bit adder with a 9-bit ou...
accelerator_design
accelerator_design_test
Read the SystemVerilog module `ntm_design` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ ...
<think> * Top Module: `ntm_design` * Inputs: `clk` (1 bit), `rst` (1 bit), `in1` (8 bits), `in2` (8 bits). * Outputs: `out` (9 bits). * Behavior: * Asynchronous reset (`posedge rst`): `out` is reset to 0. * Clocked logic (`posedge clk`): `out` is the sum of `in1` and `in2`. ...
ntm_design
ntm_design_test
Read the SystemVerilog module `dMUL_uni` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module dMUL_uni ( input logic clk, // Clock input logic rst_n, // Asynchronous reset active low input logic [7:0] iA, input logic [7:0] iB, input logi...
<think> * Module: `dMUL_uni` * Inputs: `clk`, `rst_n`, `iA [7:0]`, `iB [7:0]`, `loadA`, `loadB`, `sobolSeqA [7:0]`, `sobolSeqB [7:0]`. * Output: `oC`. * Logic: * `iA_buf` and `iB_buf` are clocked registers. * `iA_buf` updates if `loadA == 1`. * `iB_buf` updates if `loa...
dMUL_uni
tb_dMUL_uni
Read the SystemVerilog module `STD_WRAP_CKINV` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // ---------------------------------------------------------------------- // Copyright 2024 TimingWalker // // Licensed under the Apache License, Version 2.0 (the "Lice...
<think> * DUT: `STD_WRAP_CKINV` (Simple Inverter). * Interface: `in_i` (input), `zn_o` (output). * Functionality: `zn_o = ~in_i`. * Test Plan requirements: * Reference model: `expected_zn_o = ~in_i`. * Invariants: `zn_o === ~in_i`. * Scenarios: Logic Low (0), Logic Hig...
STD_WRAP_CKINV
tb
Read the SystemVerilog module `top_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module top_module ( input clk, input reset, input [3:0] A, input [3:0] B, input load, input shift, output [3:0] final_output ); // Ripple C...
<think> * DUT: `top_module` (XOR logic via `ripple_carry_adder`, Shift-Left register with Parallel Load and Async Reset, Final Output is XOR result + register value). * XOR Logic: `adder_output = A ^ B`. * Register Priority: Reset (Async) > Load (Sync) > Shift (Sync) > Hold. * Final Output: `final_...
top_module
uut
Read the SystemVerilog module `bin2bcd` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module bin2bcd ( input [4:0] BIN, output reg [3:0] BCD0, output reg [3:0] BCD1 ); reg [3:0] temp_bcd0; reg [3:0] temp_bcd1; reg [4:0] temp_bin; alw...
<think> * Module: `bin2bcd` * Inputs: `BIN [4:0]` (5-bit unsigned integer). Range: 0 to 31 ($2^5 - 1$). * Outputs: `BCD0 [3:0]`, `BCD1 [3:0]`. * Logic: Combinational. `BCD0` is the ones digit (BIN % 10), `BCD1` is the tens digit (BIN / 10 % 10). * Design Detail: Uses blocking assignments in a...
bin2bcd
bin2bcd_test
Read the SystemVerilog module `reg32` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module reg32 (clk, reset, d_in, d_out); input clk, reset; input [31:0] d_in; output [31:0] d_out; reg [31:0] d_out; always @(pose...
<think> * DUT: `reg32` * Function: A 32-bit register with synchronous reset. * Inputs: `clk`, `reset`, `d_in` (32-bit). * Outputs: `d_out` (32-bit). * Behavior: * On `posedge clk`: * If `reset == 1`, `d_out` becomes 0. * Else, `d_out` becomes `d_in`. ...
reg32
test_reg32
Read the SystemVerilog module `soc_system_mm_interconnect_2_cmd_mux` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2016 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // software a...
<think> * DUT: `soc_system_mm_interconnect_2_cmd_mux`. * Functionality: A 1:1 combinational passthrough. * Interfaces: * Sink 0: `sink0_valid`, `sink0_data[117:0]`, `sink0_channel[1:0]`, `sink0_startofpacket`, `sink0_endofpacket`, `sink0_ready` (output). * Src: `src_valid`, `src_data[...
soc_system_mm_interconnect_2_cmd_mux
tb_top
Read the SystemVerilog module `and_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module nor_gate ( input a, input b, output out ); wire nand1, nand2; nand n1(nand1, a, b); nand n2(nand2, a, b); nand n3(out, nand1, nand2); en...
<think> * DUT: `and_module`. * Functionality: Simple 2-input AND gate. * Inputs: `a` (1 bit), `b` (1 bit). * Output: `out` (1 bit). * Test Plan requirements: Exhaustive truth table (4 cases), reference model (`expected_out = (a && b)`), self-checking, compatible with `iverilog -g2012`. *...
and_module
tb
Read the SystemVerilog module `MISTRAL_CLKBUF` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module MISTRAL_IB((* iopad_external_pin *) input PAD, output O); assign O = PAD; endmodule module MISTRAL_OB((* iopad_external_pin *) output PAD, input I); assign ...
<think> * DUT: `MISTRAL_CLKBUF` (Simple combinational buffer: `Q = A`). * Goal: Complete, self-checking SystemVerilog testbench. * Compliance: `iverilog -g2012` (limited subset). * Constraints: * No classes/constraints/covergroups (not supported by simple `iverilog` versions usually, or r...
MISTRAL_CLKBUF
MISTRAL_CLKBUF_test
Read the SystemVerilog module `c3_avmm_rdl_intf` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // SPDX-License-Identifier: Apache-2.0 // Copyright (C) 2019 Intel Corporation. All rights reserved //---------------------------------------------------------------...
<think> * DUT: `c3_avmm_rdl_intf` (AVMM to RDL interface). * Inputs: `avmm_clk`, `avmm_rst_n`, `i_avmm_write`, `i_avmm_read`, `i_avmm_addr`, `i_avmm_wdata`, `i_avmm_byte_en`. * Outputs: `o_avmm_rdata`, `o_avmm_rdatavalid`, `o_avmm_waitrequest`, `clk`, `reset`, `writedata`, `read`, `write`, `byteenable`, ...
c3_avmm_rdl_intf
c3_avmm_rdl_intf_test
Read the SystemVerilog module `wb_mux_4` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog /* Copyright (c) 2015-2016 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated document...
<think> `wb_mux_4`. Wishbone 4-port multiplexer. It takes a Wishbone master interface and routes it to one of four Wishbone slaves based on address matching. * `DATA_WIDTH` (default 32) * `ADDR_WIDTH` (default 32) * `SELECT_WIDTH` (calculated as DATA_WIDTH/8) * Master Interfac...
wb_mux_4
wb_mux_4_tb
Read the SystemVerilog module `blinking_led_child_empty` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // Copyright (c) 2001-2020 Intel Corporation // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and asso...
<think> * DUT: `blinking_led_child_empty` * Inputs: `clock` (1-bit), `counter` (32-bit). * Output: `led_three_on` (1-bit). * Logic: `led_three_on` is hard-wired to `1'b0`. * Goal: Verify `led_three_on` is always `0` regardless of inputs. * DUT Name: `uut`. * Compiler: `iverilog -...
blinking_led_child_empty
uut
Read the SystemVerilog module `chromakey` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 2025/06/05 14:29:57 //...
<think> * DUT: `chromakey` module. * Inputs: `rgbData` (12-bit), `DE` (1-bit). * Output: `bg_pixel` (1-bit). * Logic: `bg_pixel = (g > r + 1) && (g >= b + 1) && (g >= 1)` where `r, g, b` are extracted from `rgbData` if `DE=1`, else all are 0. * Components of RGB: `[11:8]`=Red, `[7:4]`=Green, ...
chromakey
tb
Read the SystemVerilog module `mux4to1` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module mux4to1(I0, I1, I2, I3, S, O); input I0, I1, I2, I3, S; output O; wire not_S, sel1, sel2; assign not_S = ~S; assign sel1 = not_S & I0 | S & I1; assign...
<think> * DUT: `mux4to1`. * Logic: $O = (S==0) ? (I0 \oplus I2) : (I1 \oplus I3)$. * Goal: Self-checking SystemVerilog testbench. * Test Plan: Exhaustive testing (32 combinations), directed functional checks, reference model. * Constraints: * DUT instance name: `mux4to1_tb` (Wait, t...
mux4to1
mux4to1_tb
Read the SystemVerilog module `sky130_fd_sc_hd__nor2b` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module sky130_fd_sc_hd__nor2b ( Y , A , B_N ); output Y ; input A ; input B_N; wire not0_out ; wire and...
<think> * Module name: `sky130_fd_sc_hd__nor2b` * Inputs: `A` (1 bit), `B_N` (1 bit). * Output: `Y` (1 bit). * Internal Logic: * `not0`: `not0_out = ~A` * `and0`: `and0_out_Y = not0_out & B_N` * `buf0`: `Y = and0_out_Y` * Simplified Logic: $Y = \overline{A} \cdot...
sky130_fd_sc_hd__nor2b
tb_top
Read the SystemVerilog module `k0_ZTS6MMstv1_ZTS6MMstv1_B4_branch` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // ------------------------------------------------------------------------- // High Level Design Compiler for Intel(R) FPGAs Version 20.4 (Release...
<think> * DUT: `k0_ZTS6MMstv1_ZTS6MMstv1_B4_branch`. * Function: Registered dispatcher/branch. * Routing: `in_valid_in` + `in_c0_exe8103` (1 -> path 0, 0 -> path 1). * Data: Latch inputs to registers on enable. * Stall logic: `out_stall_out = (out_valid_out_0 && in_stall_in_0) || (out_valid_o...
k0_ZTS6MMstv1_ZTS6MMstv1_B4_branch
uut
Read the SystemVerilog module `prim_secded_hamming_76_68_enc` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Copyright lowRISC contributors (OpenTitan project). // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-L...
<think> * Module: `prim_secded_hamming_76_68_enc` * Function: SECDED (Single Error Correction, Double Error Detection) Hamming Encoder. * Inputs: `data_i` (68 bits). * Outputs: `data_o` (76 bits). * Logic: Combinational logic using XOR reduction (`^`) on masked versions of the input. * ...
prim_secded_hamming_76_68_enc
uut
Read the SystemVerilog module `accelerator_design` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ ...
<think> * Module: `accelerator_design` * Inputs: `clk`, `rst`, `in1[7:0]`, `in2[7:0]` * Output: `out[8:0]` * Logic: An 8-bit adder with a registered output. `out = in1 + in2`. * Reset: Asynchronous active-high reset (`posedge rst`). Resets `out` to 0. * Function: Computes the sum of tw...
accelerator_design
dut
Read the SystemVerilog module `mux_2x4` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module mux_2x4 ( input [1:0] in, output reg [3:0] out ); always @(*) begin case (in) 2'b00: out = 4'b0001; 2'b01: out = 4'b0010; ...
<think> * Module Name: `mux_2x4` * Inputs: `in [1:0]` (2 bits) * Outputs: `out [3:0]` (4 bits) * Functionality: A combinational 2-to-4 decoder (labeled as a mux, but functionally a decoder). * Mapping: * `00` -> `0001` * `01` -> `0010` * `10` -> `0100` * ...
mux_2x4
mux_2x4_verif_tb
Read the SystemVerilog module `mem` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Name: Matthew Calligaro // Email: mcalligaro@g.hmc.edu // Date: 11/7/2018 // Summary: RAM module for effects ring buffer // Code adapted from Digital Design an...
<think> * Module Name: `mem` * Purpose: RAM module for an effects ring buffer. * Clock: `clk` (40 MHz). * Write Enable: `WE` (1 bit). * Address: `A` (13 bits, $2^{13} = 8192$ locations). * Write Data: `WD` (11 bits). * Read Data: `RD` (11 bits). * Logic: * Asynchro...
mem
mem_verif_tb
Read the SystemVerilog module `OAI21B2HD4X` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module OAI21B2HD4X (AN, BN, C, Z); input AN; input BN; input C; output Z; wire I0_out; wire I1_out; and I0 (I0_out, AN, BN); not I1 (I1_out, I0_out); and...
<think> * Module name: `OAI21B2HD4X` * Inputs: `AN`, `BN`, `C` (all 1 bit) * Outputs: `Z` (1 bit) * Internal logic: * `I0_out = AN & BN` * `I1_out = ~I0_out` (which is `~(AN & BN)`) * `Z = I1_out & C` (which is `~(AN & BN) & C`) * Logical Function: $Z = \text{NAN...
OAI21B2HD4X
tb_OAI21B2HD4X
Read the SystemVerilog module `bsp_top_altera_merlin_demultiplexer_1921_s6bv4pq` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2021 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions...
<think> * Module: `bsp_top_altera_merlin_demultiplexer_1921_s6bv4pq` * Purpose: Merlin Demultiplexer. It routes data from a single sink interface to one of six source interfaces based on a one-hot channel signal. * Inputs: * `clk`, `reset` (though the design is entirely combinational, these are...
bsp_top_altera_merlin_demultiplexer_1921_s6bv4pq
uut
Read the SystemVerilog module `accelerator_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // //...
<think> * DUT: `accelerator_design` (8-bit adder, registered output, asynchronous active-high reset). * Input: `clk`, `rst`, `in1` (8-bit), `in2` (8-bit). * Output: `out` (9-bit). * Goal: Complete self-checking SV testbench based on a specific test plan. * Constraints: * Compatible ...
accelerator_design
tb
Read the SystemVerilog module `altera_merlin_burst_adapter_uncompressed_only` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2019 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // s...
<think> * DUT: `altera_merlin_burst_adapter_uncompressed_only`. * Function: Combinational adapter. Pass-through for handshake, channel, SOP, EOP. Modifies a slice of `sink0_data` (`[PKT_BYTE_CNT_H : PKT_BYTE_CNT_L]`) with a constant `NUM_SYMBOLS` (`PKT_BYTEEN_H - PKT_BYTEEN_L + 1`). * Parameters: ...
altera_merlin_burst_adapter_uncompressed_only
test_altera_merlin_burst_adapter_uncompressed_only
Read the SystemVerilog module `model_write_heads_stimulus` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ ...
<think> * DUT: `model_write_heads_stimulus` * Role: Stimulus generator (Master). It generates `CLK`, `RST`, and drives control/data to an external "Accelerator" (Slave). * Inputs to DUT (Outputs from TB): `ACCELERATOR_WRITE_HEADS_READY`, `ACCELERATOR_WRITE_HEADS_W_OUT_ENABLE`, `ACCELERATOR_WRITE_HEADS_A_...
model_write_heads_stimulus
test_model_write_heads_stimulus
Read the SystemVerilog module `crypto_wallet2_nios_mm_interconnect_0_avalon_st_adapter_error_adapter_0` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design...
<think> * Module Name: `crypto_wallet2_nios_mm_interconnect_0_avalon_st_adapter_error_adapter_0` * Purpose: Avalon Streaming Error Adapter. * Inputs: `clk`, `reset_n`, `in_valid`, `in_data` [33:0], `out_ready`. * Outputs: `in_ready`, `out_valid`, `out_data` [33:0], `out_error`. * Logic: ...
crypto_wallet2_nios_mm_interconnect_0_avalon_st_adapter_error_adapter_0
tb_top
Read the SystemVerilog module `soc_system_mm_interconnect_2_router_002` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // softwar...
<think> * DUT: `soc_system_mm_interconnect_2_router_002`. * Function: A router that looks at `sink_data[92:90]` (destid) and assigns `src_channel`. * Logic: * `destid == 0` $\rightarrow$ `src_channel = 7'b0000010` (value 2). * `destid == 1` $\rightarrow$ `src_channel = 7'b0000001` (va...
soc_system_mm_interconnect_2_router_002
dut
Read the SystemVerilog module `sclk_counter` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog `timescale 1ns / 1ps ////////////////////////////////////////////////////////////////////////////////// // Company: // Engineer: // // Create Date: 18.06.2024 16:26:43...
<think> * DUT: `sclk_counter`. * Inputs: `sysclk`, `sclk`, `sysrst`. * Outputs: `edge_flag`, `cycle_counter`. * Logic: Rising edge detector for `sclk` sampled by `sysclk`. Increments `cycle_counter` on detection. Synchronous active-low reset. * Parameters: `WIDTH_CNT` (counter width), `ILA_EN...
sclk_counter
uut
Read the SystemVerilog module `float_mult` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module float_mult ( input [31:0] a, input [31:0] b, output reg [31:0] product ); reg [31:0] mantissa_a, mantissa_b, mantissa_product; reg [7:0] exponent_a, ex...
<think> * DUT: `float_mult` (combinational 32-bit floating-point multiplier). * Inputs: `a`, `b` (32-bit). * Output: `product` (32-bit). * Goal: Complete self-checking testbench following the test plan. * Constraints: * `iverilog -g2012` compatible. * No classes/constraint...
float_mult
tb
Read the SystemVerilog module `const_test` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module const_test ( input clock, output reg [7:0] a, output reg [3:0] b, output reg [7:0] c, output reg [8:0] d); always @(posedge clock) beg...
<think> * DUT: `const_test` * Input: `clock` * Outputs: `a` (8-bit), `b` (4-bit), `c` (8-bit), `d` (9-bit). * Values assigned at `posedge clock`: * `a <= 8'b00000000` (Expected: 0) * `b <= 16'hDEAD` (Expected: 4'hD because output `b` is 4 bits) * `c <= 8'o177` (Expecte...
const_test
dut
Read the SystemVerilog module `blinking_led_child` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Copyright (c) 2001-2018 Intel Corporation // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software a...
<think> * Module: `blinking_led_child` * Inputs: `clock` (1 bit), `counter` (32 bits). * Outputs: `led_three_on` (1 bit). * Logic: * `localparam COUNTER_TAP = 23;` * `led_three_on_r` is a register. * `led_three_on` is assigned to `led_three_on_r`. * On `posed...
blinking_led_child
dut
Read the SystemVerilog module `up_counter` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module up_counter(clk, rst, count); input clk, rst; output reg [2:0] count; always @(posedge clk) begin if (rst == 1) begin count <= 0; end else begin...
<think> * DUT: `up_counter` (3-bit, sync reset, up-counter). * Input: `clk`, `rst`. * Output: `count [2:0]`. * Requirement: Complete self-checking SystemVerilog testbench. * Test Plan: Power-on reset, Basic Counting, Wrap-around, Mid-count Reset, Reset Persistence. * Golden Model: Mirro...
up_counter
up_counter_verif_tb
Read the SystemVerilog module `NCenterMaze` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module NCenterMaze(clk_vga, CurrentX, CurrentY, mapData, wall); input clk_vga; input [9:0] CurrentX; input [8:0] CurrentY; input [7:0] wall; output [7:0] mapData; ...
<think> * DUT: `NCenterMaze` * Inputs: `clk_vga`, `CurrentX` (10-bit), `CurrentY` (9-bit), `wall` (8-bit). * Output: `mapData` (8-bit). * Logic: Coordinates $\rightarrow$ Color. Registered output (1-cycle delay). * Default Color: `8'b10110110`. * Reference Model: Mirror the `if-else if...
NCenterMaze
NCenterMaze_tb
Read the SystemVerilog module `CS_cell` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module CS_cell ( input Vbias, input CTRL, input CS_DRN ); endmodule ``` Cover the functional intent, port semantics, verification strategy, the co...
<think> * Module Name: `CS_cell` * Inputs: `Vbias` (1 bit), `CTRL` (1 bit), `CS_DRN` (1 bit). * Outputs: None. * Internal Logic: Empty (based on the provided code snippet). * The provided Verilog code is a shell: `module CS_cell (...); endmodule`. There is no logic inside. * Inputs: `V...
CS_cell
tb_CS_cell
Read the SystemVerilog module `soc_system_mm_interconnect_0_router_012` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2017 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // softwar...
<think> * DUT: `soc_system_mm_interconnect_0_router_012`. * Purpose: Route packets from sink to source based on `destid` (bits 77:75) and transaction type (bit 43 = Write, bit 44 = Read). * Handshake: Pass-through (`sink_ready` = `src_ready`, `src_valid` = `sink_valid`). * Routing: * Writ...
soc_system_mm_interconnect_0_router_012
test_soc_system_mm_interconnect_0_router_012
Read the SystemVerilog module `global_rst_n_controller` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Copyright (c) 2001-2018 Intel Corporation // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this softw...
<think> * Module Name: `global_rst_n_controller` * Functionality: Generates a global reset signal (`global_rst_n`) based on two inputs: `io_pll_locked` and `pcie_global_rst_n`. * Logic: `global_rst_n = (io_pll_locked & pcie_global_rst_n)`. * Inputs: `io_pll_locked` (1 bit), `pcie_global_rst_n` (1 b...
global_rst_n_controller
test_global_rst_n_controller
Read the SystemVerilog module `rstmgr` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // basic reset managemnet logic for azadi module rstmgr( input clk_i, //system clock input rst_ni, // system reset input prog_rst_ni, input logic ndmres...
<think> * DUT: `rstmgr` * Inputs: `clk_i`, `rst_ni` (AL), `prog_rst_ni` (AL), `ndmreset` (AH). * Output: `sys_rst_ni` (AL). * Logic: `sys_rst_ni` is 0 if (`!rst_ni` || `!prog_rst_ni` || `ndmreset`). * Latency: 2-cycle flip-flop pipeline. * Requirement: Complete self-checking SystemVeril...
rstmgr
tb_rstmgr
Read the SystemVerilog module `ntm_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // // ...
<think> * DUT: `ntm_design` (Registered 8-bit unsigned adder, 9-bit output). * Inputs: `clk`, `rst`, `in1` (8-bit), `in2` (8-bit). * Output: `out` (9-bit). * Timing: 1-clock cycle latency. * Reset: Asynchronous, active-high. * Test Plan: * Reference Model: `expected = in1 + in...
ntm_design
ntm_design_tb
Read the SystemVerilog module `counter` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module counter ( input clk, input reset, input enable, output reg [3:0] count ); always @(posedge clk or posedge reset) begin if (reset) begin coun...
<think> * Module: `counter` * Inputs: `clk`, `reset` (asynchronous, active high), `enable`. * Output: `count` [3:0]. * Behavior: * `reset == 1`: `count` becomes `4'b0` (asynchronous). * `reset == 0`: * `enable == 1`: `count` increments by 1 (`count <= count + 1`). ...
counter
tb_counter
Read the SystemVerilog module `Computer_System_mm_interconnect_1_rsp_demux` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2016 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // sof...
<think> * DUT: `Computer_System_mm_interconnect_1_rsp_demux`. * Function: Combinational demultiplexer for a stream. * Inputs: `sink_valid`, `sink_data` (129 bits), `sink_channel` (9 bits), `sink_startofpacket`, `sink_endofpacket`, `clk`, `reset`. * Outputs: `sink_ready`, `src0_valid`, `src0_data`, ...
Computer_System_mm_interconnect_1_rsp_demux
tb_Computer_System_mm_interconnect_1_rsp_demux
Read the SystemVerilog module `counter_3bit` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module counter_3bit ( input clk, input reset, input enable, output reg [2:0] count ); always @(posedge clk) begin if (reset) begin count <= 3'b0; ...
<think> * DUT: `counter_3bit` (a modulo-7 synchronous counter: 0-6, then wraps). * Inputs: `clk`, `reset`, `enable`. * Output: `count [2:0]`. * Behavior: * Synchronous reset (priority). * Enable increments on posedge clk. * Modulo-7 sequence (0, 1, 2, 3, 4, 5, 6, 0...)...
counter_3bit
counter_3bit_verif_tb
Read the SystemVerilog module `and_or_module` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module and_or_module (a, b, g_out, p_out); input a, b; output g_out, p_out; wire and_out, or_out; // AND gate and (and_out, a, b); // OR gat...
<think> * DUT: `and_or_module` * Inputs: `a`, `b` (1-bit each) * Outputs: `g_out` (AND of a, b), `p_out` (OR of a, b) * Logic: Purely combinational. No clock, no reset. * This is a trivial combinational module. * Functional intent: Compute AND and OR of two single-bit inputs. * ...
and_or_module
tb_top
Read the SystemVerilog module `sky130_fd_sc_lp__iso1n` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module sky130_fd_sc_lp__iso1n ( X , A , SLEEP_B ); output X ; input A ; input SLEEP_B; wire SLEEP; n...
<think> * DUT: `sky130_fd_sc_lp__iso1n` * Inputs: `A`, `SLEEP_B` * Output: `X` * Logic: `X = A | (~SLEEP_B)` (Combinational) * Truth Table: * SLEEP_B=1, A=0 -> X=0 * SLEEP_B=1, A=1 -> X=1 * SLEEP_B=0, A=0 -> X=1 * SLEEP_B=0, A=1 -> X=1 * Golden M...
sky130_fd_sc_lp__iso1n
sky130_fd_sc_lp__iso1n_test
Read the SystemVerilog module `accelerator_design` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ ...
<think> * Top module: `accelerator_design` * Inputs: `clk`, `rst` (asynchronous high), `in1[7:0]`, `in2[7:0]` * Output: `out[8:0]` (registered) * Logic: `out <= in1 + in2` on every positive edge of `clk` (if not in reset). * Reset: Asynchronous, active-high, sets `out` to 0. * It's a s...
accelerator_design
test_accelerator_design
Read the SystemVerilog module `adc_delay` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module adc_delay ( input clk, input reset, input sync, input [5:0] delay, input gated, output reg start ); reg [5:0] count; a...
<think> * `adc_delay`: * Inputs: `clk`, `reset`, `sync`, `delay[5:0]`, `gated`. * Output: `start`. * Behavior: * `reset` is asynchronous (posedge). Sets `count = 0`, `start = 0`. * `sync` is an enable signal. Logic only proceeds if `sync` is high. ...
adc_delay
adc_delay_verif_tb
Read the SystemVerilog module `shift_register` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module shift_register ( input clk, input [3:0] in, input load, output [3:0] out, output reg valid ); reg [3:0] reg1, reg2, reg3, reg4...
<think> * Module Name: `shift_register` * Inputs: `clk`, `in[3:0]`, `load` * Outputs: `out[3:0]`, `valid` * Internal State: `reg1`, `reg2`, `reg3`, `reg4` (all 4-bit) * Behavior: * On `posedge clk`: * If `load == 1`: * `reg1` gets `in` ...
shift_register
test_shift_register
Read the SystemVerilog module `my_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module my_module ( Y, A, B_N, VPWR ); output Y; input A; input [1:0] B_N; input VPWR; wire [2:0] input_signal; assign input_signal = {~A, B_N}; ass...
<think> * DUT: `my_module`. * Inputs: `A` (1 bit), `B_N` (2 bits), `VPWR` (1 bit). * Output: `Y` (1 bit). * Logic: `Y = (VPWR == 0) ? 0 : ({~A, B_N} == 3'b101) ? 1 : 0`. * Target for $Y=1$: `VPWR=1`, `A=0`, `B_N=2'b01`. * Exhaustive testing (16 combinations). * Reference model: `...
my_module
my_module_test
Read the SystemVerilog module `accelerator_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // //...
<think> * DUT: `accelerator_design` (an 8-bit registered adder). * Inputs: `clk`, `rst`, `in1 [7:0]`, `in2 [7:0]`. * Output: `out [8:0]`. * Behavior: `out` is the sum of `in1` and `in2` on the next clock edge. `rst` (async, active-high) clears `out` to 0. * Reference Model: `expected_out = i...
accelerator_design
uut
Read the SystemVerilog module `top_module` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Date: 2023-05-27 // Author: Stephen Zhang // URL: https://hdlbits.01xz.net/wiki/notgate /** Question: * Create a module that implements a NOT gate. */ m...
<think> * Module: `top_module` * Function: A NOT gate (`out = ~in`). * Inputs: `in` (1 bit). * Outputs: `out` (1 bit). * Complexity: Trivial combinational logic. * Functional Intent: Invert the input bit. * Ports: `in` (input, 1-bit), `out` (output, 1-bit). * Timing: Combin...
top_module
dut
Read the SystemVerilog module `moduleName` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog `ifndef SIC_DECODER_SV `define SIC_DECODER_SV module moduleName #( parameter DATA_WIDTH = 24, parameter OPCODE_WIDTH = 6, parameter ADDRESS_WIDTH ...
<think> * Module: `moduleName` (a simple instruction decoder). * Parameters: `DATA_WIDTH=24`, `OPCODE_WIDTH=6`, `ADDRESS_WIDTH=15`. * Inputs: `instruction` [23:0]. * Outputs: `opcode` [5:0] (bits [23:18]), `address` [14:0] (bits [17:3]), `index_flag` (bit [2]). * Nature: Purely combinational....
moduleName
tb_moduleName
Read the SystemVerilog module `accumulator` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module accumulator #( parameter n = 8, // number of bits in the accumulator parameter m = 10 // number of clock cycles over which the accumulator will sum the inputs ...
<think> * Module: `accumulator` * Parameters: `n` (width), `m` (unused). * Inputs: `clk`, `rst`, `in [n-1:0]`. * Output: `out [n-1:0]`. * Functionality: Synchronous accumulation (`sum <= sum + in`), synchronous reset (`sum <= 0`). * Output behavior: `out` is a combinational output of th...
accumulator
accumulator_tb
Read the SystemVerilog module `sky130_fd_sc_ms__ha` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module sky130_fd_sc_ms__ha ( COUT, SUM , A , B ); output COUT; output SUM ; input A ; input B ; wire and0_out_COUT...
<think> * DUT: `sky130_fd_sc_ms__ha` (Half Adder). * Inputs: `A`, `B`. * Outputs: `SUM`, `COUT`. * Truth Table: * 0,0 -> SUM=0, COUT=0 * 0,1 -> SUM=1, COUT=0 * 1,0 -> SUM=1, COUT=0 * 1,1 -> SUM=0, COUT=1 * Verification Strategy: * Exhaustive t...
sky130_fd_sc_ms__ha
tb_sky130_fd_sc_ms__ha
Read the SystemVerilog module `DEMUX` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module DEMUX #( parameter n = 2 )( input in, input [n-1:0] ctrl, output reg [2**n-1:0] out ); wire [2**n-1:0] mux_out; assign mux_out[0] = in; // default...
<think> * Module: `DEMUX` * Parameters: `n` (default 2). * Inputs: `in` (1 bit), `ctrl` (n bits). * Outputs: `out` (2^n bits). * Logic: Combinational. It routes the input `in` to the output index specified by `ctrl`. All other output bits are set to 0. * *Crucial Note:* There's a wire `...
DEMUX
uut
Read the SystemVerilog module `comparator` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module comparator ( input [3:0] A, input [3:0] B, output reg [1:0] OUT ); always @(*) begin if (A > B) begin OUT = 2'b01; end else if (A < ...
<think> * DUT: `comparator` (4-bit $A$, 4-bit $B$, 2-bit $OUT$). * Logic: $A > B \Rightarrow 01$, $A < B \Rightarrow 10$, $A = B \Rightarrow 11$. * Requirement: Self-checking, exhaustive testing (256 cases), reference model. * Constraint: `iverilog -g2012` compatibility (avoid advanced UVM/SVA feat...
comparator
tb
Read the SystemVerilog module `pc_update` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module pc_update( input logic [31:0] pc, input logic pc_en, input logic [31:0] pc_jump_addr, input logic [31:0] btb_target_pc, input logic btb_pc_valid, ...
<think> * Module: `pc_update`. * Inputs: `pc` [31:0], `pc_en`, `pc_jump_addr` [31:0], `btb_target_pc` [31:0], `btb_pc_valid`, `btb_pc_predictTaken`, `jump_en`. * Output: `next_pc` [31:0]. * Logic: * `selection = {pc_en, jump_en, (btb_pc_valid && btb_pc_predictTaken)}` * Selectio...
pc_update
pc_update_verif_tb
Read the SystemVerilog module `snps_clock_gate_high_d_ff_en_w32_0_8` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module snps_clock_gate_high_d_ff_en_w32_0_8 ( input CLK, input EN, input TE, output ENCLK ); TLATNTSCAX2TS latch ( .E...
<think> * DUT: `snps_clock_gate_high_d_ff_en_w32_0_8`. * Logic: `ENCLK` is a D-FF. On `posedge CLK`, if `TE` is high, `ENCLK <= EN`. Else, `ENCLK` holds. * Test Plan: * Reference Model: Cycle-accurate mirror. * Scenarios: Initialization, Basic Write 1, Basic Write 0, Hold High, Hold L...
snps_clock_gate_high_d_ff_en_w32_0_8
test_snps_clock_gate_high_d_ff_en_w32_0_8
Read the SystemVerilog module `register_mask` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog /* Patrick May patrickmontemay@gmail.com Spring 2018 SoC aftx04 This module masks incoming interrupts based on current mask settings */ module register_mas...
<think> * DUT: `register_mask` * Function: `interrupt_requests_masked = interrupt_requests & ~interrupt_masks` * Parameter: `N_interrupts` (default 32). * Inputs: `interrupt_requests`, `interrupt_masks`. * Output: `interrupt_requests_masked`. * Nature: Purely combinational. * Ref...
register_mask
tb
Read the SystemVerilog module `axi_address_decoder_BR` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Copyright 2014-2018 ETH Zurich and University of Bologna. // Copyright and related rights are licensed under the Solderpad Hardware // License, ...
<think> * Module: `axi_address_decoder_BR` * Purpose: Address decoder for the READ channel (backrouting). It looks at the Read ID (`rid_i`) to determine which slave port (`rvalid_o`) should receive the read response/data. * Parameters: * `N_TARG_PORT` (default 8): Number of target ports. ...
axi_address_decoder_BR
tb
Read the SystemVerilog module `jt12_pg_dt` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module jt12_pg_dt( input [ 2:0] block, input [10:0] fnum, input [ 2:0] detune, output reg [ 4:0] keycode, output ...
<think> `jt12_pg_dt`. * Inputs: `block` (3b), `fnum` (11b), `detune` (3b). * Outputs: `keycode` (5b), `detune_signed` (6b signed). * Logic: Fully combinational (`always @(*)`). No clocks, no resets. * `keycode`: Derived from `block`, `fnum[10]`, and a reduction of `fnum[9:7]`....
jt12_pg_dt
test_jt12_pg_dt
Read the SystemVerilog module `V2T_clock_gen_S2D` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module V2T_clock_gen_S2D ( input wire logic in, // input signal output wire logic out, // delayed output signal (+) output reg outb ...
<think> * DUT: `V2T_clock_gen_S2D` * Inputs: `in` * Outputs: `out`, `outb` * Logic: `out = in`, `outb = ~in` * Goal: Self-checking testbench based on a specific test plan. * Constraints: `iverilog -g2012` compatible (no classes, no concurrent SVA, no covergroups). Use `$fatal` for failu...
V2T_clock_gen_S2D
tb
Read the SystemVerilog module `niosii_mm_interconnect_0_router_002` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2015 Altera Corporation. All rights reserved. // Your use of Altera Corporation's design tools, logic functions and other ...
<think> `niosii_mm_interconnect_0_router_002`. A Merlin Router for Nios II interconnects. It routes packets based on Destination ID (since `DECODER_TYPE = 1`). * Inputs: `clk`, `reset`, `sink_valid`, `sink_data[91:0]`, `sink_startofpacket`, `sink_endofpacket`, `src_ready`. * Outputs: `sink_ready`,...
niosii_mm_interconnect_0_router_002
test_niosii_mm_interconnect_0_router_002
Read the SystemVerilog module `ddr4_v2_0_0_carry_latch_and` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog /****************************************************************************** // (c) Copyright 2013 - 2014 Xilinx, Inc. All rights reserved....
<think> * Module name: `ddr4_v2_0_0_carry_latch_and` * Functionality: Combinational logic implementing `O = CIN & ~I`. * Inputs: `CIN` (1 bit), `I` (1 bit). * Outputs: `O` (1 bit). * Parameter: `C_FAMILY` (default "virtex6"). This parameter is not used in the logic. * Nature: Trivial co...
ddr4_v2_0_0_carry_latch_and
ddr4_v2_0_0_carry_latch_and_tb
Read the SystemVerilog module `accelerator_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // //...
<think> * DUT: `accelerator_design` (a registered 8-bit adder). * Inputs: `clk`, `rst`, `in1` [7:0], `in2` [7:0]. * Output: `out` [8:0]. * Functionality: `out <= in1 + in2` on `posedge clk` or `out <= 0` on `posedge rst`. * Requirement: Complete, self-checking SystemVerilog testbench. * ...
accelerator_design
uut
Read the SystemVerilog module `comparator` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module comparator ( input [2:0] A, input [2:0] B, output reg out ); always @(*) begin if (A > B) out = 1; else if (A < B) ...
<think> * Module: `comparator` * Inputs: `A` (3 bits), `B` (3 bits). * Output: `out` (1 bit). * Logic: * If `A > B`, `out = 1`. * If `A < B`, `out = 0`. * If `A == B`, `out = 0`. * Simplified logic: `out = (A > B)`. * This is a purely combinational module....
comparator
comparator_tb
Read the SystemVerilog module `nios_wallet_mm_interconnect_0_rsp_demux_002` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // sof...
<think> * DUT: `nios_wallet_mm_interconnect_0_rsp_demux_002`. * Function: Combinational demultiplexer. * Input: `sink_valid` (1), `sink_data` (103), `sink_channel` (6), `sink_sop` (1), `sink_eop` (1). * Output: `sink_ready` (1). * Outputs (to sources): `srcX_valid` (1), `srcX_data` (103), `sr...
nios_wallet_mm_interconnect_0_rsp_demux_002
nios_wallet_mm_interconnect_0_rsp_demux_002_test
Read the SystemVerilog module `RegisterFile` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module RegisterFile( input clk, reset, regWrite, input [3:0] writeReg, readReg1, readReg2, input [31:0] writeData, output [31:0] readData1, readData2 ); ...
<think> * DUT: `RegisterFile` (16 registers, 32-bit wide). * Functional Specs: * Synchronous Reset (Active High). * Synchronous Write (`regWrite` enabled). * Asynchronous Read (`readData1`, `readData2`). * Test Plan requirements: * DUT Instance Name: `RegisterFile_...
RegisterFile
RegisterFile_test
Read the SystemVerilog module `qqq_sub` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module qqq_sub( input[31:0] A, B, output[31:0] R, input Cin ); assign R = A - B - Cin; endmodule ``` Cover the functional int...
<think> * Module: `qqq_sub` * Inputs: `A` (32-bit), `B` (32-bit), `Cin` (1-bit). * Output: `R` (32-bit). * Logic: `assign R = A - B - Cin;` * Type: Combinational logic (no clock, no reset). * The design implements a 32-bit subtraction. * It subtracts `B` and a carry-in (`Cin`) fr...
qqq_sub
qqq_sub_tb
Read the SystemVerilog module `controller` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // $Id: $ // File name: controller.sv // Created: 11/29/2016 // Author: Pranav Gupta // Lab Section: 337-04 // Version: 1.0 Initial Design Entry // Descript...
<think> * DUT: `controller` (a simple FSM). * States: `IDLE`, `RENDER`. * Inputs: `clk`, `n_rst`, `received_op`, `render_done`. * Outputs: `status` (32-bit), `render_enable` (1-bit). * Behavior: * `IDLE` $\rightarrow$ `RENDER` if `received_op == 1`. * `RENDER` $\rightarrow...
controller
tb_top
Read the SystemVerilog module `clock_gate_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module clock_gate_module ( input CLK, input EN, input TE, output reg ENCLK ); always @(posedge CLK) begin if (EN & TE) begin ENCLK <= 1'b1; end e...
<think> * DUT: `clock_gate_module`. * Logic: `ENCLK` is a registered output of `EN & TE`. * Inputs: `CLK`, `EN`, `TE`. * Output: `ENCLK`. * Key detail: Registered output (1 cycle delay). No reset. * Test Plan Requirements: * Functional Truth Table (all 4 combinations). ...
clock_gate_module
clock_gate_module_verif_tb
Read the SystemVerilog module `model` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog `default_nettype none /* PROMPT Build a circuit that pulses dout one cycle after the rising edge of din. A pulse is defined as writing a single-cycle 1 as shown ...
<think> * Goal: Create a pulse detector. * Input: `clk`, `resetn`, `din`. * Output: `dout`. * Logic: * `prev_din` is a registered version of `din` (reset to 0). * `dout = ~prev_din & din`. * Functional behavior: `dout` is 1 if `din` is 1 and the *previous* value of `din` w...
model
tb_model
Read the SystemVerilog module `ZionBasicCircuitLib_EnRsnDff` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Module name : Zio...
<think> `ZionBasicCircuitLib_EnRsnDff`. D-Flip-Flop with Enable and Synchronous Reset. `clk`, `rst` (sync, active low), `iEn` (active high), `iDat` (input data), `oDat` (output data). `WIDTH_IN`, `WIDTH_OUT`, `INI_DATA`. `oDat` updates to `iDat` on `posedge clk` if `rst` is high and `iEn` is high. If `rst` is low, `oD...
ZionBasicCircuitLib_EnRsnDff
ZionBasicCircuitLib_EnRsnDff_test
Read the SystemVerilog module `arithmetic_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module arithmetic_module( input [7:0] A, input [7:0] B, output reg [15:0] C ); always @ (A, B) begin C = A + B; if (C > 16'hFFFF) be...
<think> * DUT: `arithmetic_module` * Inputs: `A` (8-bit), `B` (8-bit) * Output: `C` (16-bit) * Functionality: `C = A + B`. (Note: the overflow check `C > 16'hFFFF` is redundant/unreachable). * Goal: A self-checking SystemVerilog testbench following a specific test plan. * Constraints: `...
arithmetic_module
test_arithmetic_module
Read the SystemVerilog module `Example` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module Example(a, b); input logic [1:0] a; output logic b; assign b = !(&a); endmodule ``` # Test Plan: Example Module ## 1. Functional Intent The `Example` mod...
<think> * DUT: `Example` (2-bit input `a`, 1-bit output `b`). * Logic: `b = !(&a)` (NAND). * Test Plan: Exhaustive testing of all 4 combinations of `a`. * Reference Model: `expected_b = !(a[0] && a[1])`. * Requirements: * Instantiate DUT as `Example_tb`. * Self-checking. ...
Example
Example_tb
Read the SystemVerilog module `mod1` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module mod1 ( input logic [1:0] in, output logic [1:0] out ); always_comb begin if (in < 2'h1) begin if (in < 2'h2) begin out = 2'h1; end else out = 2'h3...
<think> * DUT: `mod1` (2-bit input `in`, 2-bit output `out`). * Logic: * `in < 1` (i.e., `in == 0`): `out = 1` (inner `if (in < 2)` is always true for `in == 0`). * `in >= 1` (i.e., `in == 1, 2, 3`): `out = 2`. * Test Plan Requirements: * Reference model (golden function). ...
mod1
tb
Read the SystemVerilog module `u_to_s` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //By : Joe Nasti //Last Updated : 7/21/18 // //Module Summary: // Converts a one bit sign and 26 bit magnitude to a 27 bit signed value // //Inputs: // sign ...
<think> * DUT: `u_to_s`. * Function: Converts sign (1 bit) and magnitude (26 bits) to a 27-bit 2's complement signed value. * Logic: * `sign == 0` $\implies$ `frac_signed = {1'b0, frac_unsigned}`. * `sign == 1` $\implies$ `frac_signed = -{1'b0, frac_unsigned}`. * Combinational l...
u_to_s
tb
Read the SystemVerilog module `top_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module bcd_counter ( input clk, input reset, // Synchronous active-high reset input [2:0] ena, // Enable signals for upper three digits output reg [15:...
<think> * DUT: `top_module` (which contains `bcd_counter`). * Key behavior: `ena` is tied to `3'b000`. Only the ones digit `q[3:0]` increments and wraps at 9. Synchronous reset. * Test Plan Requirements: * Reference model: Track `expected_q`. * Invariants: `q[15:4] == 0`, `q[3:0] <= 9...
top_module
tb_top_module
Read the SystemVerilog module `bsp_top_altera_merlin_multiplexer_1921_pmawhwi` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2021 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions a...
<think> * Module Name: `bsp_top_altera_merlin_multiplexer_1921_pmawhwi` * Function: It's a "Merlin Multiplexer", but looking at the implementation: ```verilog assign src_valid = sink0_valid; assign src_data = sink0_data; assign src_channel = sink0_channel; assig...
bsp_top_altera_merlin_multiplexer_1921_pmawhwi
tb_top
Read the SystemVerilog module `top_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module top_module( input logic [99:0] in, output logic [99:0] out ); var integer i; always_comb begin for(i = 0; i <= 99; i = i + 1)begin ...
<think> * DUT: `top_module` (100-bit bit reverser). * Logic: `out[i] = in[99-i]`. * Test Plan Requirements: * Reference model (function). * Specific test cases: All zeros, All ones, Walking ones (LSB, MSB, Mid), Alternating bits, Random values. * Invariants: Every bit match....
top_module
test_top_module
Read the SystemVerilog module `top_module` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module top_module ( input wire [7:0] input1, input wire [7:0] input2, input wire [7:0] input3, input wire [7:0] input4, input wire sel_b1, input wir...
<think> * DUT: `top_module` (Combinational). * Inputs: `input1`, `input2`, `input3`, `input4` (8-bit each), `sel_b1`, `sel_b2` (1-bit each), `in` (16-bit). * Outputs: `out_hi` (8-bit), `out_lo` (8-bit), `out_xor` (8-bit). * Functionality: * Mux: `sel_b1, sel_b2` selects one of the 4 input...
top_module
tb_top_module
Read the SystemVerilog module `sky130_fd_sc_ms__a222oi` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module sky130_fd_sc_ms__a222oi ( Y , A1, A2, B1, B2, C1, C2 ); output Y ; input A1; input A2; input B1; ...
<think> * DUT: `sky130_fd_sc_ms__a222oi` * Logic: `Y = ~(A1 & A2) & ~(B1 & B2) & ~(C1 & C2)` or `Y = ~((A1 & A2) | (B1 & B2) | (C1 & C2))` * Inputs: `A1, A2, B1, B2, C1, C2` (6 bits) * Output: `Y` (1 bit) * Goal: Exhaustive testing (64 combinations), self-checking, reference model, compatible...
sky130_fd_sc_ms__a222oi
test_sky130_fd_sc_ms__a222oi
Read the SystemVerilog module `accelerator_design` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _ _ // //...
<think> * DUT: `accelerator_design` (an 8-bit synchronous adder). * Inputs: `clk`, `rst`, `in1 [7:0]`, `in2 [7:0]`. * Output: `out [8:0]`. * Behavior: `out <= in1 + in2` on `posedge clk`, asynchronous active-high reset `rst` sets `out` to 0. * Latency: 1 clock cycle. * Reference Model:...
accelerator_design
accelerator_design_tb
Read the SystemVerilog module `nios_cpu_mm_interconnect_0_avalon_st_adapter_error_adapter_0` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, log...
<think> `nios_cpu_mm_interconnect_0_avalon_st_adapter_error_adapter_0`. An Avalon Streaming Error Adapter. Combinational (it's all `always_comb`). * `clk`, `reset_n` (Inputs) - Though present, they aren't actually used in the logic. * `in_valid` (Input), `in_ready` (Output) - Valid/Ready handshake...
nios_cpu_mm_interconnect_0_avalon_st_adapter_error_adapter_0
dut
Read the SystemVerilog module `top_module` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog module ripple_carry_adder( input [99:0] a, // 100-bit binary numbers to be added input [99:0] b, input cin, // Carry-in output [99:0] su...
<think> * `ripple_carry_adder`: Adds two 100-bit numbers (`a`, `b`) and a carry-in (`cin`). Produces a 100-bit `sum` and a 1-bit `cout`. * `final_output_generator`: Takes `sum` and `cout`. If `cout == 1`, `final_output = ~sum`. Otherwise, `final_output = sum`. * `top_module`: Wraps both. * Overall ...
top_module
top_module_verif_tb
Read the SystemVerilog module `ibex_register_file_fpga` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // Copyright lowRISC contributors. // Copyright 2018 ETH Zurich and University of Bologna, see also CREDITS.md. // Licensed under the Apache Licen...
<think> `ibex_register_file_fpga`. RISC-V Register File optimized for FPGA (likely BRAM inference). Two async read ports (`rdata_a_o`, `rdata_b_o`), one sync write port (`waddr_a_i`, `wdata_a_i`, `we_a_i`). * `RV32E`: If 1, uses 16 registers (4-bit addr); if 0, 32 registers (5-bit addr). * `DataWi...
ibex_register_file_fpga
ibex_register_file_fpga_verif_tb
Read the SystemVerilog module `nios_system_mm_interconnect_0_router_002` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and ot...
<think> * Top Module: `nios_system_mm_interconnect_0_router_002`. * Purpose: A router that directs packets to a specific channel based on a destination ID (`destid`). * Key Parameters: `DECODER_TYPE = 1` (Destination ID decoder). * Packet Structure (mapped to `sink_data`): * Address: `[64...
nios_system_mm_interconnect_0_router_002
tb
Read the SystemVerilog module `altera_avalon_i2c_txout` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // software a...
<think> * Module: `altera_avalon_i2c_txout` * Purpose: This module manages the Output Enable (`oe`) signals for SDA and SCL lines of an I2C interface. It essentially decides when the driver should be active (`oe=1`) or high-impedance (`oe=0`). * Key Signals: * `clk`, `rst_n`: Clock and active-l...
altera_avalon_i2c_txout
tb_top
Read the SystemVerilog module `barrel_shifter` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module barrel_shifter ( input [15:0] A, input [3:0] B, output reg [15:0] Y ); always @(*) begin case (B) 4'b0000: Y = A; ...
<think> * Design: `barrel_shifter` (combinational 16-bit logical left shifter). * Inputs: `A` [15:0], `B` [3:0]. * Output: `Y` [15:0]. * Test Plan Requirements: * Reference Model: `expected_Y = A << B`. * Directed Tests: * $B=0$ (Identity). * $B=15$ (...
barrel_shifter
tb_barrel_shifter
Read the SystemVerilog module `counter_param` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog `timescale 1ns/1ps module counter_param #( parameter DATA_WIDTH = 32 ) ( input wire clk_i, input wire rstn_i, input wire inc_i, output reg [DATA_WID...
<think> * DUT: `counter_param` (parameterized `DATA_WIDTH`). * Functionality: Binary up-counter with asynchronous active-low reset (`rstn_i`) and increment enable (`inc_i`). * Test Plan: * Reference Model: Track `expected_value` based on `rstn_i` and `inc_i`. * Check: `value_o` vs `ex...
counter_param
uut
Read the SystemVerilog module `accelerator_trainer_differentiation_stimulus` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog //////////////////////////////////////////////////////////////////////////////// // __ _ _...
<think> * DUT: `accelerator_trainer_differentiation_stimulus`. * Role: Master controller/stimulus generator for an FNN accelerator. * Key Outputs (DUT drives): `CLK`, `RST`, `FNN_START`, various `_IN_ENABLE` and `_IN` data buses. * Key Inputs (DUT receives): `FNN_READY`, various `_OUT_ENABLE` and `...
accelerator_trainer_differentiation_stimulus
accelerator_trainer_differentiation_stimulus_tb
Read the SystemVerilog module `pipelined_mux` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog module pipelined_mux( input clk, input a, input b, input sel_b1, input sel_b2, output reg out_always ); reg pipeline_reg1; reg pipeline_reg2; a...
<think> * DUT: `pipelined_mux`. * Logic: * `pipeline_reg1 <= sel_b1` (on posedge clk). * `pipeline_reg2 <= sel_b2` (on posedge clk). * `out_always <= (pipeline_reg1 && pipeline_reg2) ? b : a` (on posedge clk). * Latency: * `sel_b1`, `sel_b2` $\to$ `pipeline_reg1`, ...
pipelined_mux
pipelined_mux_tb
Read the SystemVerilog module `Computer_System_mm_interconnect_0_cmd_demux_005` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2018 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions ...
<think> `Computer_System_mm_interconnect_0_cmd_demux_005`. Demultiplexer. `sink_valid` (35 bits), `sink_data` (96 bits), `sink_channel` (35 bits), `sink_startofpacket`, `sink_endofpacket`. `sink_ready`. Two sets: `src0` and `src1`. Each has `valid`, `data`, `channel`, `startofpacket`, `endofpacket`, and an input `read...
Computer_System_mm_interconnect_0_cmd_demux_005
tb_Computer_System_mm_interconnect_0_cmd_demux_005
Read the SystemVerilog module `alt_sld_fab_alt_sld_fab_ident` and the test plan below, then write a complete self-checking SystemVerilog testbench for it. ```verilog // (C) 2001-2017 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, logic functions and other // software and tool...
<think> * DUT: `alt_sld_fab_alt_sld_fab_ident` * Inputs: `address_0` (5 bits), `contrib_0` (4 bits) * Outputs: `rdata_0` (4 bits), `mixed` (4 bits) * Internal logic: * `mixed = contrib_0 ^ 4'h0` (basically `mixed = contrib_0`). * `data_0 = {mixed, 12'h0, 32'h0, 80'h97ef82f293109...
alt_sld_fab_alt_sld_fab_ident
tb_top
Read the SystemVerilog module `Embed_mm_interconnect_0_avalon_st_adapter_007_error_adapter_0` below and write a markdown test plan that a verification engineer could use to author a testbench for it. ```verilog // (C) 2001-2016 Intel Corporation. All rights reserved. // Your use of Intel Corporation's design tools, lo...
<think> * Module Name: `Embed_mm_interconnect_0_avalon_st_adapter_007_error_adapter_0` * Functionality: It's an Avalon-ST (Streaming) Error Adapter. * Inputs: `clk`, `reset_n`, `in_valid`, `in_data[17:0]`, `out_ready`. * Outputs: `in_ready`, `out_valid`, `out_data[17:0]`, `out_error`. * Logic...
Embed_mm_interconnect_0_avalon_st_adapter_007_error_adapter_0
uut