-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparity_tb.v
More file actions
40 lines (34 loc) · 741 Bytes
/
parity_tb.v
File metadata and controls
40 lines (34 loc) · 741 Bytes
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
`timescale 1ns/1ps
module tb_parity;
reg a, b, c, d;
wire y;
parity uut (
.a(a),
.b(b),
.c(c),
.d(d),
.y(y)
);
always @(*) begin
$display("Time=%0t | a=%b b=%b c=%b d=%b | y=%b", $time, a, b, c, d, y);
end
initial begin
a=0; b=0; c=0; d=0; #5;
a=0; b=0; c=0; d=1; #5;
a=0; b=0; c=1; d=0; #5;
a=0; b=0; c=1; d=1; #5;
a=0; b=1; c=0; d=0; #5;
a=0; b=1; c=0; d=1; #5;
a=0; b=1; c=1; d=0; #5;
a=0; b=1; c=1; d=1; #5;
a=1; b=0; c=0; d=0; #5;
a=1; b=0; c=0; d=1; #5;
a=1; b=0; c=1; d=0; #5;
a=1; b=0; c=1; d=1; #5;
a=1; b=1; c=0; d=0; #5;
a=1; b=1; c=0; d=1; #5;
a=1; b=1; c=1; d=0; #5;
a=1; b=1; c=1; d=1; #5;
$finish;
end
endmodule