-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb.v
54 lines (46 loc) · 808 Bytes
/
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
`timescale 1ns/1ns
module tb;
// Inputs
reg st = 1'd0;
reg rst = 1'd0;
reg clk = 1'd0;
reg [7:0] data_in = 8'd0;
// Outputs
wire done;
wire [7:0] dataout;
// Instantiate the Unit Under Test (UUT)
matrixMultiplier uut (
.st(st),
.rst(rst),
.clk(clk),
.data_in(data_in),
.done(done),
.dataout(dataout)
);
initial begin
#50
rst = 1;
#100
clk = ~clk;
#1000
clk = ~clk;
#1000
rst = 0;
#50
st = 1;
#100
clk = ~clk;
#1000
clk = ~clk;
#1000
st = 0;
#1000;
repeat(100) begin
#1000
clk = ~clk;
if(clk == 1'd1)
data_in = data_in + 8'd1;
end
repeat(1000) #10000 clk = ~clk;
end
endmodule