Created
April 8, 2019 19:54
-
-
Save axayjha/fb64b345c0ae81ebc2414b27d699675b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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