blob: 878744af1b86298bb65eb72648b674206b006254 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
`timescale 1ns/1ps
module test_alu_control;
reg [1:0]alu_op;
reg [3:0]opcode;
reg [2:0]alu_cnt;
alu_control uut(
.alu_op(alu_op),
.opcode(opcode),
.alu_cnt(alu_cnt)
);
initial begin
$display("test alu control");
$dumpfile("test_alu_control.vcd");
$dumpvars(0,test_alu_control);
#1
alu_op = 0;
opcode = 0;
#10
opcode = 1;
#10
opcode = 2;
#10
opcode = 3;
#10
opcode = 4;
#10
opcode = 5;
#10
opcode = 6;
#10
opcode = 7;
#10
alu_op = 1;
opcode = 0;
#10
alu_op = 2;
opcode = 1;
#10
alu_op = 3;
#10
alu_op = 3;
end
initial begin
$monitor("At time %t",$time);
end
endmodule
|