I have built a 16 bit carry look ahead adder and randomized 5000 inputs I cant figure out how you would get an average delay of these inputs, also I am in structural iverilog. Any help would be nice. i have added my testbench below module testbench(); wire [15:0] a,b,sum; wire cin,cout; testAdder test(a,b,sum,cout,cin); cla_16_two_level adder(sum,cout,a,b,cin); endmodule module testAdder(a,b,s,cout,cin); input [15:0] s; input cout; output [15:0] a,b; output cin; reg [15:0] a,b; reg cin; integer i; integer seed =16; integer f; initial begin $monitor($time,"a=%d, b=%d, cin=%b, s=%d, cout=%b",a,b,cin,s,cout); for(i=0; i<5000; i=i+1) begin #10; a = $random(seed); b = $random(seed); cin = $random(seed); end end endmodule
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.