-
Notifications
You must be signed in to change notification settings - Fork 0
/
testbench.v
40 lines (37 loc) · 852 Bytes
/
testbench.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module tb;
wire signed [15:0] z;
reg signed [7:0] a,b;
boothmul my_booth(.a(a),.b(b),.c(z));
initial
begin
$dumpfile("dump.vcd");
$dumpvars(0,tb);
end
initial
begin
$monitor($time," ",a," *",b," = ", z);
a = 8'b10101110;
b = 8'b100111;
#1
a = 8'b11110000;
b = 8'b11010000;
#1
a = 8'b10011101;
b = 8'b10000;
#1
a = 8'b0111;
b = 8'b01100101;
#1
b = 8'b10;
a = 8'b111;
#1
a = 8'b0011100;
b = 8'b0101;
#1
a = 8'b010001;
b = 8'b1100;
#1
a = 8'b10010;
b = 8'b1011111;
end
endmodule