forked from offlinemark/checksum
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchecksum_tb.v
40 lines (35 loc) · 898 Bytes
/
checksum_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
`include "checksum_generate.v"
module bitchecksum_tb();
reg [31:0] data;
reg clk;
wire [7:0] checksum;
bitchecksum dut(.data(data),.checksum(checksum),.clk(clk));
initial begin
clk=0;
forever
#10 clk=~clk;
end
initial begin
#8;
data=32'h00000001;
#10;
data=32'h00000010;
#10;
data=32'h00000100;
#10;
data=32'h00001000;
#10;
data=32'h00010000;
#10;
data=32'h00100000;
#10;
data=32'h01000000;
#10;
data=32'h10000000;
#10;
end
initial begin
$dumpfile("checksum.vcd");
$dumpvars(1,bitchecksum_tb);
end
endmodule