Question: Create testbench code to test multuple values in SystemVerilog for this OTTER Register file, this is my code that only tests one set of values:

Create testbench code to test multuple values in SystemVerilog for this OTTER Register file, this is my code that only tests one set of values:
module tb_REGFILE;
reg [4:0] ADR1;
reg [4:0] ADR2;
reg [4:0] WADR;
reg [31:0] WDATA;
reg WE;
reg clk;
logic [31:0] RS1;
logic [31:0] RS2;
REGFILE UUT (
.ADR1(ADR1),
.ADR2(ADR2),
.WADR(WADR),
.WDATA(WDATA),
.WE(WE),
.clk(clk),
.RS1(RS1),
.RS2(RS2)
);
initial begin
clk =0;
forever #10 clk = ~clk;
end
initial begin
ADR1=5'b00000;
ADR2=5'b00001;
WADR =5'b00010;
WDATA =32'h00000000;
WE =1'b0;
#10;
WDATA =32'h12345678;
WE =1'b1;
#10;
WE =1'b0;
#10;
$finish;
end
endmodule
 Create testbench code to test multuple values in SystemVerilog for this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!