Skip to content

Instantly share code, notes, and snippets.

@axayjha
Created April 8, 2019 19:54
Show Gist options
  • Save axayjha/fb64b345c0ae81ebc2414b27d699675b to your computer and use it in GitHub Desktop.
Save axayjha/fb64b345c0ae81ebc2414b27d699675b to your computer and use it in GitHub Desktop.
module mul_test_bench;
reg [15:0] data_in;
reg clk, start;
wire done;
datapath DP (eqz, LdA, LdB, LdP, clrP, decB, data_in, clk);
controller CON (LdA, LdB, LdP, clrP, decB, done, clk, eqz, start);
initial
begin
clk = 1'b0;
#3 start = 1'b1;
#500 $finish;
end
always #5 clk = ~clk;
initial
begin
#17 data_in = 5;
#10 data_in = 6;
end
initial
begin
$monitor($time, " %d %b", DP.y, done);
$dumpfile("mul.vcd"); $dumpvars(0, mul_test_bench);
end
endmodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment