-
Notifications
You must be signed in to change notification settings - Fork 0
/
Single Cycle.vcd
381 lines (381 loc) · 5.21 KB
/
Single Cycle.vcd
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
$date
Fri Oct 27 11:06:06 2023
$end
$version
Icarus Verilog
$end
$timescale
1s
$end
$scope module Single_Cycle_Top_Tb $end
$var reg 1 ! clk $end
$var reg 1 " rst $end
$scope module Single_Cycle_Top $end
$var wire 1 ! clk $end
$var wire 1 " rst $end
$var wire 32 # SrcB [31:0] $end
$var wire 1 $ ResultSrc $end
$var wire 32 % Result [31:0] $end
$var wire 1 & RegWrite $end
$var wire 32 ' ReadData [31:0] $end
$var wire 32 ( RD_Instr [31:0] $end
$var wire 32 ) RD2_Top [31:0] $end
$var wire 32 * RD1_Top [31:0] $end
$var wire 32 + PC_Top [31:0] $end
$var wire 32 , PCPlus4 [31:0] $end
$var wire 1 - MemWrite $end
$var wire 32 . Imm_Ext_Top [31:0] $end
$var wire 2 / ImmSrc [1:0] $end
$var wire 1 0 ALUSrc $end
$var wire 32 1 ALUResult [31:0] $end
$var wire 3 2 ALUControl_Top [2:0] $end
$scope module ALU $end
$var wire 1 3 Carry $end
$var wire 1 4 OverFlow $end
$var wire 1 5 Zero $end
$var wire 32 6 Sum [31:0] $end
$var wire 32 7 Result [31:0] $end
$var wire 1 8 Negative $end
$var wire 1 9 Cout $end
$var wire 32 : B [31:0] $end
$var wire 3 ; ALUControl [2:0] $end
$var wire 32 < A [31:0] $end
$upscope $end
$scope module Control_Unit_Top $end
$var wire 7 = Op [6:0] $end
$var wire 3 > funct3 [2:0] $end
$var wire 7 ? funct7 [6:0] $end
$var wire 1 $ ResultSrc $end
$var wire 1 & RegWrite $end
$var wire 1 - MemWrite $end
$var wire 2 @ ImmSrc [1:0] $end
$var wire 1 A Branch $end
$var wire 1 0 ALUSrc $end
$var wire 2 B ALUOp [1:0] $end
$var wire 3 C ALUControl [2:0] $end
$scope module ALU_Decoder $end
$var wire 3 D funct3 [2:0] $end
$var wire 7 E funct7 [6:0] $end
$var wire 7 F op [6:0] $end
$var wire 2 G ALUOp [1:0] $end
$var wire 3 H ALUControl [2:0] $end
$upscope $end
$scope module Main_Decoder $end
$var wire 7 I Op [6:0] $end
$var wire 1 $ ResultSrc $end
$var wire 1 & RegWrite $end
$var wire 1 - MemWrite $end
$var wire 2 J ImmSrc [1:0] $end
$var wire 1 A Branch $end
$var wire 1 0 ALUSrc $end
$var wire 2 K ALUOp [1:0] $end
$upscope $end
$upscope $end
$scope module Data_Memory $end
$var wire 32 L A [31:0] $end
$var wire 1 - WE $end
$var wire 1 ! clk $end
$var wire 1 " rst $end
$var wire 32 M WD [31:0] $end
$var wire 32 N RD [31:0] $end
$upscope $end
$scope module Instruction_Memory $end
$var wire 1 " rst $end
$var wire 32 O RD [31:0] $end
$var wire 32 P A [31:0] $end
$upscope $end
$scope module Mux_DataMemory_to_Register $end
$var wire 32 Q a [31:0] $end
$var wire 32 R b [31:0] $end
$var wire 1 $ s $end
$var wire 32 S c [31:0] $end
$upscope $end
$scope module Mux_Register_to_ALU $end
$var wire 1 0 s $end
$var wire 32 T c [31:0] $end
$var wire 32 U b [31:0] $end
$var wire 32 V a [31:0] $end
$upscope $end
$scope module PC $end
$var wire 1 ! clk $end
$var wire 1 " rst $end
$var wire 32 W PC_Next [31:0] $end
$var reg 32 X PC [31:0] $end
$upscope $end
$scope module PC_Adder $end
$var wire 32 Y a [31:0] $end
$var wire 32 Z b [31:0] $end
$var wire 32 [ c [31:0] $end
$upscope $end
$scope module Register_File $end
$var wire 5 \ A1 [4:0] $end
$var wire 5 ] A2 [4:0] $end
$var wire 5 ^ A3 [4:0] $end
$var wire 32 _ WD3 [31:0] $end
$var wire 1 & WE3 $end
$var wire 1 ! clk $end
$var wire 1 " rst $end
$var wire 32 ` RD2 [31:0] $end
$var wire 32 a RD1 [31:0] $end
$upscope $end
$scope module Sign_Extend $end
$var wire 1 b ImmSrc $end
$var wire 32 c In [31:0] $end
$var wire 32 d Imm_Ext [31:0] $end
$upscope $end
$upscope $end
$upscope $end
$enddefinitions $end
$comment Show the parameter values. $end
$dumpall
$end
#0
$dumpvars
b0 d
b0 c
0b
b0 a
b0 `
b0 _
b0 ^
b0 ]
b0 \
bx [
b100 Z
bx Y
bx X
bx W
b0 V
b0 U
b0 T
b0 S
b0 R
b0 Q
bx P
b0 O
b0 N
b0 M
b0 L
b0 K
b0 J
b0 I
b0 H
b0 G
b0 F
b0 E
b0 D
b0 C
b0 B
0A
b0 @
b0 ?
b0 >
b0 =
b0 <
b0 ;
b0 :
09
08
b0 7
b0 6
15
04
03
b0 2
b0 1
00
b0 /
b0 .
0-
bx ,
bx +
b0 *
b0 )
b0 (
b0 '
0&
b0 %
0$
b0 #
0"
0!
$end
#50
b100 ,
b100 W
b100 [
b0 +
b0 P
b0 X
b0 Y
1!
#100
0!
#150
b11 2
b11 ;
b11 C
b11 H
04
08
b101 %
b101 S
b101 _
05
1&
b101 1
b101 7
b101 L
b101 Q
b110 .
b110 U
b110 d
b10 B
b10 G
b10 K
b110011 ?
b110011 E
b110 >
b110 D
b110011 =
b110011 F
b110011 I
b1 ^
b110 ]
b101 \
b1 6
b100 #
b100 :
b100 T
bx '
bx N
bx R
b11000101110000010110011 (
b11000101110000010110011 O
b11000101110000010110011 c
b101 *
b101 <
b101 a
b100 )
b100 M
b100 V
b100 `
1"
1!
#200
0!
#250
b100 %
b100 S
b100 _
b100 1
b100 7
b100 L
b100 Q
b1001 6
b10 2
b10 ;
b10 C
b10 H
b111 >
b111 D
b11110 ^
b11000101111111100110011 (
b11000101111111100110011 O
b11000101111111100110011 c
b1000 ,
b1000 W
b1000 [
b100 +
b100 P
b100 X
b100 Y
1!
#300
0!
#350
x8
x5
x4
bx 1
bx 7
bx L
bx Q
bx %
bx S
bx _
x&
xb
x0
bx 2
bx ;
bx C
bx H
bx #
bx :
bx T
bx 6
bx .
bx U
bx d
bx /
bx @
bx J
x-
x$
xA
bx B
bx G
bx K
bx )
bx M
bx V
bx `
bx *
bx <
bx a
bx ?
bx E
bx >
bx D
bx =
bx F
bx I
bx ^
bx ]
bx \
bx (
bx O
bx c
b1100 ,
b1100 W
b1100 [
b1000 +
b1000 P
b1000 X
b1000 Y
1!
#400
0!
#450
b10000 ,
b10000 W
b10000 [
b1100 +
b1100 P
b1100 X
b1100 Y
1!
#500
0!
#550
b10100 ,
b10100 W
b10100 [
b10000 +
b10000 P
b10000 X
b10000 Y
1!
#600
0!