blob: e5efc71e3d195ab663afa61ed63151d0221ffdc1 (
plain) (
blame)
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
|
`timescale 1ns/1ps
module testbench;
reg [7:0]data_1=0;
reg [7:0]data_2=0;
//reg [7:0]data2;
//wire val;
//wire out;
wire [7:0]out;
//assign val=data;
and8 uut (
.a(data_1),
.b(data_2),
.c(out)
);
initial begin
$dumpfile("test_and8.vcd");
$dumpvars(0,testbench);
data_1=0;
data_2=0;
#10 data_1=1;
data_2=0;
#10 data_1=0;
data_2=1;
#10 data_1=1;
data_2=1;
#10 data_1=0;
data_2=0;
#10;
end
initial begin
$monitor("At time %t d1=%h(%0d) d2=%h(%0d) ",$time,data_1,data_1,data_2,data_2);
end
endmodule
|