-
Notifications
You must be signed in to change notification settings - Fork 2
/
AXISoCQuadCoreModule_TopLevel_CPU0_CPU_ID.v
342 lines (342 loc) · 14.1 KB
/
AXISoCQuadCoreModule_TopLevel_CPU0_CPU_ID.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
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
`timescale 1ns/1ps
`default_nettype none
// PLEASE READ THIS, IT MAY SAVE YOU SOME TIME AND MONEY, THANK YOU!
// * This file was generated by Quokka FPGA Toolkit.
// * Generated code is your property, do whatever you want with it
// * Place custom code between [BEGIN USER ***] and [END USER ***].
// * CAUTION: All code outside of [USER] scope is subject to regeneration.
// * Bad things happen sometimes in developer's life,
// it is recommended to use source control management software (e.g. git, bzr etc) to keep your custom code safe'n'sound.
// * Internal structure of code is subject to change.
// You can use some of signals in custom code, but most likely they will not exist in future (e.g. will get shorter or gone completely)
// * Please send your feedback, comments, improvement ideas etc. to [email protected]
// * Visit https://github.com/EvgenyMuryshkin/QuokkaEvaluation to access latest version of playground
//
// DISCLAIMER:
// Code comes AS-IS, it is your responsibility to make sure it is working as expected
// no responsibility will be taken for any loss or damage caused by use of Quokka toolkit.
//
// System configuration name is AXISoCQuadCoreModule_TopLevel_CPU0_CPU_ID, clock frequency is 1Hz, Embedded
// FSM summary
// -- Packages
module AXISoCQuadCoreModule_TopLevel_CPU0_CPU_ID
(
// [BEGIN USER PORTS]
// [END USER PORTS]
input wire [31:0] Instruction,
output wire [2:0] BranchTypeCode,
output wire signed [31:0] BTypeImm,
output wire [11:0] CSRAddress,
output wire CSRWE,
output wire [2:0] Funct3,
output wire [6:0] Funct7,
output wire [3:0] IRQTypeCode,
output wire signed [31:0] ITypeImm,
output wire signed [31:0] JTypeImm,
output wire [2:0] LoadTypeCode,
output wire [6:0] OpCode,
output wire [2:0] OPCode,
output wire [2:0] OPIMMCode,
output wire [6:0] OpTypeCode,
output wire [4:0] RD,
output wire [4:0] RetTypeCode,
output wire [4:0] RS1,
output wire [4:0] RS2,
output wire signed [31:0] RTypeImm,
output wire [4:0] SHAMT,
output wire SHARITH,
output wire signed [31:0] STypeImm,
output wire SUB,
output wire [2:0] SystemCode,
output wire [2:0] SysTypeCode,
output wire signed [31:0] UTypeImm
);
// [BEGIN USER SIGNALS]
// [END USER SIGNALS]
localparam HiSignal = 1'b1;
localparam LoSignal = 1'b0;
wire Zero = 1'b0;
wire One = 1'b1;
wire true = 1'b1;
wire false = 1'b0;
wire InstructionDecoders_L20F42T43_Expr = 1'b0;
wire InstructionDecoders_L30F159T164_Expr = 1'b0;
wire [1: 0] InstructionDecoders_L48F54T55_Expr = 2'b11;
wire InstructionDecoders_L32F161T166_Expr = 1'b0;
wire [31: 0] Inputs_Instruction;
wire [31: 0] internalBits;
wire [2: 0] internalFunct3;
wire [6: 0] internalFunct7;
wire signed [31: 0] internalITypeImm;
wire [6: 0] internalOpCode;
wire [4: 0] internalRS2;
wire signed [31: 0] ZeroU32;
wire [2: 0] InstructionDecoders_L16F49T69_Index;
wire [6: 0] InstructionDecoders_L17F49T69_Index;
wire [11: 0] InstructionDecoders_L14F67T87_Index;
wire signed [11: 0] InstructionDecoders_L14F51T97_SignChange;
wire signed [31: 0] InstructionDecoders_L14F51T109_Resize;
wire [6: 0] InstructionDecoders_L15F49T67_Index;
wire [4: 0] InstructionDecoders_L18F46T66_Index;
wire [7: 0] InstructionDecoders_L41F67T87_Cast;
wire [2: 0] InstructionDecoders_L41F50T87_Cast;
wire InstructionDecoders_L30F81T97_Index;
wire InstructionDecoders_L30F99T114_Index;
wire [5: 0] InstructionDecoders_L30F116T136_Index;
wire [3: 0] InstructionDecoders_L30F138T157_Index;
wire [12: 0] InstructionDecoders_L30F40T165_Source;
wire signed [12: 0] InstructionDecoders_L30F40T174_SignChange;
wire signed [31: 0] InstructionDecoders_L30F40T186_Resize;
wire [11: 0] InstructionDecoders_L47F57T77_Index;
wire [15: 0] InstructionDecoders_L47F49T77_Cast;
wire [11: 0] InstructionDecoders_L47F39T77_Cast;
wire [1: 0] InstructionDecoders_L48F30T50_Index;
wire [7: 0] InstructionDecoders_L45F58T78_Cast;
wire [3: 0] InstructionDecoders_L45F44T78_Cast;
wire [11: 0] InstructionDecoders_L28F56T76_Index;
wire signed [11: 0] InstructionDecoders_L28F40T86_SignChange;
wire signed [31: 0] InstructionDecoders_L28F40T98_Resize;
wire InstructionDecoders_L32F81T97_Index;
wire [7: 0] InstructionDecoders_L32F99T119_Index;
wire InstructionDecoders_L32F121T137_Index;
wire [9: 0] InstructionDecoders_L32F139T159_Index;
wire [20: 0] InstructionDecoders_L32F40T167_Source;
wire signed [20: 0] InstructionDecoders_L32F40T176_SignChange;
wire signed [31: 0] InstructionDecoders_L32F40T188_Resize;
wire [7: 0] InstructionDecoders_L42F61T81_Cast;
wire [2: 0] InstructionDecoders_L42F46T81_Cast;
wire [7: 0] InstructionDecoders_L40F43T63_Cast;
wire [2: 0] InstructionDecoders_L40F34T63_Cast;
wire [7: 0] InstructionDecoders_L39F52T72_Cast;
wire [2: 0] InstructionDecoders_L39F40T72_Cast;
wire [7: 0] InstructionDecoders_L38F55T75_Cast;
wire [6: 0] InstructionDecoders_L38F42T75_Cast;
wire [4: 0] InstructionDecoders_L22F34T53_Index;
wire [7: 0] InstructionDecoders_L44F58T78_Cast;
wire [4: 0] InstructionDecoders_L44F44T78_Cast;
wire [4: 0] InstructionDecoders_L23F35T55_Index;
wire [11: 0] InstructionDecoders_L27F56T76_Index;
wire signed [11: 0] InstructionDecoders_L27F40T86_SignChange;
wire signed [31: 0] InstructionDecoders_L27F40T98_Resize;
wire [4: 0] InstructionDecoders_L34F37T59_Index;
wire InstructionDecoders_L35F32T52_Index;
wire [6: 0] InstructionDecoders_L29F81T101_Index;
wire [4: 0] InstructionDecoders_L29F103T122_Index;
wire [11: 0] InstructionDecoders_L29F40T123_Source;
wire signed [11: 0] InstructionDecoders_L29F40T132_SignChange;
wire signed [31: 0] InstructionDecoders_L29F40T144_Resize;
wire InstructionDecoders_L36F28T48_Index;
wire [7: 0] InstructionDecoders_L46F55T75_Cast;
wire [2: 0] InstructionDecoders_L46F42T75_Cast;
wire [7: 0] InstructionDecoders_L43F58T75_Cast;
wire [2: 0] InstructionDecoders_L43F44T75_Cast;
wire [19: 0] InstructionDecoders_L31F81T101_Index;
wire [11: 0] InstructionDecoders_L31F103T117_Index;
wire [31: 0] InstructionDecoders_L31F40T118_Source;
wire signed [31: 0] InstructionDecoders_L31F40T127_SignChange;
wire signed [31: 0] InstructionDecoders_L31F40T139_Resize;
wire InstructionDecoders_L48F30T55_Expr;
wire signed [2: 0] InstructionDecoders_L48F30T55_ExprLhs;
wire signed [2: 0] InstructionDecoders_L48F30T55_ExprRhs;
assign InstructionDecoders_L48F30T55_Expr = InstructionDecoders_L48F30T55_ExprLhs != InstructionDecoders_L48F30T55_ExprRhs ? 1'b1 : 1'b0;
assign InstructionDecoders_L48F30T55_ExprLhs = {
1'b0,
InstructionDecoders_L48F30T50_Index
}
;
assign InstructionDecoders_L48F30T55_ExprRhs = {
1'b0,
InstructionDecoders_L48F54T55_Expr
}
;
assign Inputs_Instruction = Instruction;
assign internalBits = Inputs_Instruction;
assign InstructionDecoders_L16F49T69_Index = internalBits[14:12];
assign internalFunct3 = InstructionDecoders_L16F49T69_Index;
assign InstructionDecoders_L17F49T69_Index = internalBits[31:25];
assign internalFunct7 = InstructionDecoders_L17F49T69_Index;
assign InstructionDecoders_L14F67T87_Index = internalBits[31:20];
assign InstructionDecoders_L14F51T97_SignChange = InstructionDecoders_L14F67T87_Index;
assign InstructionDecoders_L14F51T109_Resize = {
{20{InstructionDecoders_L14F51T97_SignChange[11]}},
InstructionDecoders_L14F51T97_SignChange
}
;
assign internalITypeImm = InstructionDecoders_L14F51T109_Resize;
assign InstructionDecoders_L15F49T67_Index = internalBits[6:0];
assign internalOpCode = InstructionDecoders_L15F49T67_Index;
assign InstructionDecoders_L18F46T66_Index = internalBits[24:20];
assign internalRS2 = InstructionDecoders_L18F46T66_Index;
assign ZeroU32 = {
{31{1'b0}},
InstructionDecoders_L20F42T43_Expr
}
;
assign InstructionDecoders_L41F67T87_Cast = {
{5{1'b0}},
internalFunct3
}
;
assign InstructionDecoders_L41F50T87_Cast = InstructionDecoders_L41F67T87_Cast[2:0];
assign BranchTypeCode = InstructionDecoders_L41F50T87_Cast;
assign InstructionDecoders_L30F81T97_Index = internalBits[31];
assign InstructionDecoders_L30F99T114_Index = internalBits[7];
assign InstructionDecoders_L30F116T136_Index = internalBits[30:25];
assign InstructionDecoders_L30F138T157_Index = internalBits[11:8];
assign InstructionDecoders_L30F40T165_Source = {
InstructionDecoders_L30F81T97_Index,
InstructionDecoders_L30F99T114_Index,
InstructionDecoders_L30F116T136_Index,
InstructionDecoders_L30F138T157_Index,
InstructionDecoders_L30F159T164_Expr
}
;
assign InstructionDecoders_L30F40T174_SignChange = InstructionDecoders_L30F40T165_Source;
assign InstructionDecoders_L30F40T186_Resize = {
{19{InstructionDecoders_L30F40T174_SignChange[12]}},
InstructionDecoders_L30F40T174_SignChange
}
;
assign BTypeImm = InstructionDecoders_L30F40T186_Resize;
assign InstructionDecoders_L47F57T77_Index = internalBits[31:20];
assign InstructionDecoders_L47F49T77_Cast = {
{4{1'b0}},
InstructionDecoders_L47F57T77_Index
}
;
assign InstructionDecoders_L47F39T77_Cast = InstructionDecoders_L47F49T77_Cast[11:0];
assign CSRAddress = InstructionDecoders_L47F39T77_Cast;
assign InstructionDecoders_L48F30T50_Index = internalBits[31:30];
assign CSRWE = InstructionDecoders_L48F30T55_Expr;
assign Funct3 = internalFunct3;
assign Funct7 = internalFunct7;
assign InstructionDecoders_L45F58T78_Cast = {
1'b0,
internalFunct7
}
;
assign InstructionDecoders_L45F44T78_Cast = InstructionDecoders_L45F58T78_Cast[3:0];
assign IRQTypeCode = InstructionDecoders_L45F44T78_Cast;
assign InstructionDecoders_L28F56T76_Index = internalBits[31:20];
assign InstructionDecoders_L28F40T86_SignChange = InstructionDecoders_L28F56T76_Index;
assign InstructionDecoders_L28F40T98_Resize = {
{20{InstructionDecoders_L28F40T86_SignChange[11]}},
InstructionDecoders_L28F40T86_SignChange
}
;
assign ITypeImm = InstructionDecoders_L28F40T98_Resize;
assign InstructionDecoders_L32F81T97_Index = internalBits[31];
assign InstructionDecoders_L32F99T119_Index = internalBits[19:12];
assign InstructionDecoders_L32F121T137_Index = internalBits[20];
assign InstructionDecoders_L32F139T159_Index = internalBits[30:21];
assign InstructionDecoders_L32F40T167_Source = {
InstructionDecoders_L32F81T97_Index,
InstructionDecoders_L32F99T119_Index,
InstructionDecoders_L32F121T137_Index,
InstructionDecoders_L32F139T159_Index,
InstructionDecoders_L32F161T166_Expr
}
;
assign InstructionDecoders_L32F40T176_SignChange = InstructionDecoders_L32F40T167_Source;
assign InstructionDecoders_L32F40T188_Resize = {
{11{InstructionDecoders_L32F40T176_SignChange[20]}},
InstructionDecoders_L32F40T176_SignChange
}
;
assign JTypeImm = InstructionDecoders_L32F40T188_Resize;
assign InstructionDecoders_L42F61T81_Cast = {
{5{1'b0}},
internalFunct3
}
;
assign InstructionDecoders_L42F46T81_Cast = InstructionDecoders_L42F61T81_Cast[2:0];
assign LoadTypeCode = InstructionDecoders_L42F46T81_Cast;
assign OpCode = internalOpCode;
assign InstructionDecoders_L40F43T63_Cast = {
{5{1'b0}},
internalFunct3
}
;
assign InstructionDecoders_L40F34T63_Cast = InstructionDecoders_L40F43T63_Cast[2:0];
assign OPCode = InstructionDecoders_L40F34T63_Cast;
assign InstructionDecoders_L39F52T72_Cast = {
{5{1'b0}},
internalFunct3
}
;
assign InstructionDecoders_L39F40T72_Cast = InstructionDecoders_L39F52T72_Cast[2:0];
assign OPIMMCode = InstructionDecoders_L39F40T72_Cast;
assign InstructionDecoders_L38F55T75_Cast = {
1'b0,
internalOpCode
}
;
assign InstructionDecoders_L38F42T75_Cast = InstructionDecoders_L38F55T75_Cast[6:0];
assign OpTypeCode = InstructionDecoders_L38F42T75_Cast;
assign InstructionDecoders_L22F34T53_Index = internalBits[11:7];
assign RD = InstructionDecoders_L22F34T53_Index;
assign InstructionDecoders_L44F58T78_Cast = {
1'b0,
internalFunct7
}
;
assign InstructionDecoders_L44F44T78_Cast = InstructionDecoders_L44F58T78_Cast[4:0];
assign RetTypeCode = InstructionDecoders_L44F44T78_Cast;
assign InstructionDecoders_L23F35T55_Index = internalBits[19:15];
assign RS1 = InstructionDecoders_L23F35T55_Index;
assign RS2 = internalRS2;
assign InstructionDecoders_L27F56T76_Index = internalBits[31:20];
assign InstructionDecoders_L27F40T86_SignChange = InstructionDecoders_L27F56T76_Index;
assign InstructionDecoders_L27F40T98_Resize = {
{20{InstructionDecoders_L27F40T86_SignChange[11]}},
InstructionDecoders_L27F40T86_SignChange
}
;
assign RTypeImm = InstructionDecoders_L27F40T98_Resize;
assign InstructionDecoders_L34F37T59_Index = internalITypeImm[4:0];
assign SHAMT = InstructionDecoders_L34F37T59_Index;
assign InstructionDecoders_L35F32T52_Index = internalITypeImm[10];
assign SHARITH = InstructionDecoders_L35F32T52_Index;
assign InstructionDecoders_L29F81T101_Index = internalBits[31:25];
assign InstructionDecoders_L29F103T122_Index = internalBits[11:7];
assign InstructionDecoders_L29F40T123_Source = {
InstructionDecoders_L29F81T101_Index,
InstructionDecoders_L29F103T122_Index
}
;
assign InstructionDecoders_L29F40T132_SignChange = InstructionDecoders_L29F40T123_Source;
assign InstructionDecoders_L29F40T144_Resize = {
{20{InstructionDecoders_L29F40T132_SignChange[11]}},
InstructionDecoders_L29F40T132_SignChange
}
;
assign STypeImm = InstructionDecoders_L29F40T144_Resize;
assign InstructionDecoders_L36F28T48_Index = internalITypeImm[10];
assign SUB = InstructionDecoders_L36F28T48_Index;
assign InstructionDecoders_L46F55T75_Cast = {
{5{1'b0}},
internalFunct3
}
;
assign InstructionDecoders_L46F42T75_Cast = InstructionDecoders_L46F55T75_Cast[2:0];
assign SystemCode = InstructionDecoders_L46F42T75_Cast;
assign InstructionDecoders_L43F58T75_Cast = {
{3{1'b0}},
internalRS2
}
;
assign InstructionDecoders_L43F44T75_Cast = InstructionDecoders_L43F58T75_Cast[2:0];
assign SysTypeCode = InstructionDecoders_L43F44T75_Cast;
assign InstructionDecoders_L31F81T101_Index = internalBits[31:12];
assign InstructionDecoders_L31F103T117_Index = ZeroU32[11:0];
assign InstructionDecoders_L31F40T118_Source = {
InstructionDecoders_L31F81T101_Index,
InstructionDecoders_L31F103T117_Index
}
;
assign InstructionDecoders_L31F40T127_SignChange = InstructionDecoders_L31F40T118_Source;
assign InstructionDecoders_L31F40T139_Resize = InstructionDecoders_L31F40T127_SignChange;
assign UTypeImm = InstructionDecoders_L31F40T139_Resize;
// [BEGIN USER ARCHITECTURE]
// [END USER ARCHITECTURE]
endmodule