-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocessor.vcd
More file actions
187 lines (187 loc) · 2.24 KB
/
processor.vcd
File metadata and controls
187 lines (187 loc) · 2.24 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
$date
Mon Mar 10 18:46:43 2025
$end
$version
Icarus Verilog
$end
$timescale
1s
$end
$scope module riscv_4bit_processor_tb $end
$var wire 4 ! result [3:0] $end
$var reg 1 " clk $end
$var reg 1 # reset $end
$scope module dut $end
$var wire 1 " clk $end
$var wire 1 # reset $end
$var wire 4 $ result [3:0] $end
$var wire 4 % rs2_data [3:0] $end
$var wire 2 & rs2_addr [1:0] $end
$var wire 4 ' rs1_data [3:0] $end
$var wire 2 ( rs1_addr [1:0] $end
$var wire 1 ) reg_we $end
$var wire 2 * rd_addr [1:0] $end
$var wire 4 + pc [3:0] $end
$var wire 12 , instruction [11:0] $end
$var wire 4 - alu_result [3:0] $end
$var wire 1 . alu_op $end
$scope module alu_inst $end
$var wire 1 . opcode $end
$var wire 4 / b [3:0] $end
$var wire 4 0 a [3:0] $end
$var reg 4 1 result [3:0] $end
$upscope $end
$scope module cu $end
$var wire 1 2 opcode $end
$var wire 12 3 instruction [11:0] $end
$var reg 1 . alu_op $end
$var reg 1 ) reg_we $end
$upscope $end
$scope module imem $end
$var wire 4 4 pc [3:0] $end
$var reg 12 5 instr [11:0] $end
$upscope $end
$scope module pc_inst $end
$var wire 1 " clk $end
$var wire 1 # reset $end
$var reg 4 6 pc [3:0] $end
$upscope $end
$scope module regfile $end
$var wire 1 " clk $end
$var wire 2 7 rd_addr [1:0] $end
$var wire 4 8 rd_data [3:0] $end
$var wire 1 # reset $end
$var wire 2 9 rs1_addr [1:0] $end
$var wire 4 : rs1_data [3:0] $end
$var wire 2 ; rs2_addr [1:0] $end
$var wire 4 < rs2_data [3:0] $end
$var wire 1 ) we $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
$comment Show the parameter values. $end
$dumpall
$end
#0
$dumpvars
b11 <
b10 ;
b10 :
b0 9
b101 8
b0 7
b0 6
b100100000 5
b0 4
b100100000 3
02
b101 1
b10 0
b11 /
0.
b101 -
b100100000 ,
b0 +
b0 *
1)
b0 (
b10 '
b10 &
b11 %
b101 $
1#
0"
b101 !
$end
#5
1"
#10
0"
0#
#15
1.
1)
12
b0 %
b0 /
b0 <
b1 &
b1 ;
b1000010001 ,
b1000010001 3
b1000010001 5
b101 !
b101 $
b101 -
b101 1
b101 8
b1 +
b1 4
b1 6
b101 '
b101 0
b101 :
1"
#20
0"
#25
1)
0.
b1000 !
b1000 $
b1000 -
b1000 1
b1000 8
02
b11 %
b11 /
b11 <
b10 &
b10 ;
b1100100000 ,
b1100100000 3
b1100100000 5
b10 +
b10 4
b10 6
1"
#30
0"
#35
b1000 %
b1000 /
b1000 <
b0 &
b0 ;
b0 ,
b0 3
b0 5
b0 !
b0 $
b0 -
b0 1
b0 8
b11 +
b11 4
b11 6
b1000 '
b1000 0
b1000 :
1"
#40
0"
#45
b0 '
b0 0
b0 :
b0 %
b0 /
b0 <
b100 +
b100 4
b100 6
1"
#50
0"
#51