-
Notifications
You must be signed in to change notification settings - Fork 0
/
mult_tb.v
55 lines (48 loc) · 1.14 KB
/
mult_tb.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//serialmult testbench
`timescale 1ps/1ps
module serialmult_tb();
reg clk = 0;
initial begin
forever begin
clk <= ~clk;
#1;
end
end
reg rst, mst, msgn;
reg [31:0] a, b;
wire [63:0] prod;
wire prodv;
multserial mult(clk, rst, mst, msgn, a, b, prod, prodv);
initial begin
$dumpfile("multserial_dump.vcd");
$dumpvars;
a = 32'b0111111111111111111111111111111;
b = 32'b1000000000000000000000000000000;
mst = 1'b1;
msgn = 1'b1;
#1;
mst = 1'b0;
#70;
a = 32'b0111111111111111111111111111111;
b = 32'b0111111111111111111111111111111;
mst = 1'b1;
msgn = 1'b1;
#1;
mst = 1'b0;
#70;
a = 32'b0000000000000000000000000000001;
b = 32'b0100000000000000000000000000000;
mst = 1'b1;
msgn = 1'b0;
#1;
mst = 1'b0;
#70;
a = 32'b0000000000000000000000000000001;
b = 32'b0100000000000000000000000000000;
mst = 1'b1;
msgn = 1'b1;
#1;
mst = 1'b0;
#70;
end
endmodule