Question: This question is in Verilog code: 2. Explain why the test bench described below will execute forever. Write a working alternative that uses a FOR-loop.

This question is in Verilog code:

2. Explain why the test bench described below will execute forever. Write a working alternative that uses a FOR-loop. (hint: If you arent wondering why count was declared separately from ins and then assigned to ins in the procedure, then maybe you should be. The solution is not as simple as that, but it is a factor that should enter into your thinking.)

module tb_problem1_for(); reg [4:0] ins; wire out; reg [4:0] count; problem1 dut(ins, out); // Instantiate the design being tested. initial begin for(count = 0; count < 32; count = count + 1) begin ins = count; #20; end end endmodule

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!