-
Notifications
You must be signed in to change notification settings - Fork 0
/
decoder_tb.v
60 lines (40 loc) · 842 Bytes
/
decoder_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
56
57
58
59
60
`timescale 1ns / 100ps // time-unit = 1 ns, precision = 100 ps
module decoder_tb;
reg [3:0] IN_DATA;
wire [15:0] OUT_DATA;
decoder DEC(IN_DATA, OUT_DATA);
initial
begin
IN_DATA = 4'b0000;
#15
IN_DATA = 4'b0001;
#15
IN_DATA = 4'b0010;
#15
IN_DATA = 4'b0011;
#15
IN_DATA = 4'b0100;
#15
IN_DATA = 4'b0101;
#15
IN_DATA = 4'b0110;
#15
IN_DATA = 4'b0111;
#15
IN_DATA = 4'b1000;
#15
IN_DATA = 4'b1001;
#15
IN_DATA = 4'b1010;
#15
IN_DATA = 4'b1011;
#15
IN_DATA = 4'b1100;
#15
IN_DATA = 4'b1101;
#15
IN_DATA = 4'b1110;
#15
IN_DATA = 4'b1111;
end
endmodule