-
Notifications
You must be signed in to change notification settings - Fork 5
/
Tile.fir
470 lines (428 loc) · 24 KB
/
Tile.fir
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
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
;buildInfoPackage: chisel3, version: 3.3.2, scalaVersion: 2.12.11, sbtVersion: 1.3.10
circuit Tile :
module PEWeightBackend :
input clock : Clock
input reset : Reset
output io : {flip propagate : UInt<1>, flip weightIn : UInt<32>, weightOut : UInt<32>}
reg weightReg : UInt<32>, clock @[PEWeightBackend.scala 14:24]
node _T = eq(io.propagate, UInt<1>("h01")) @[PEWeightBackend.scala 17:35]
node _T_1 = mux(_T, io.weightIn, weightReg) @[PEWeightBackend.scala 17:21]
weightReg <= _T_1 @[PEWeightBackend.scala 17:15]
io.weightOut <= weightReg @[PEWeightBackend.scala 18:18]
module PEUIntBackend :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>}
reg resultReg : UInt<32>, clock @[PEUIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PEUIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PEUIntBackend.scala 17:33]
node _T_1 = add(_T, io.inPartialSum) @[PEUIntBackend.scala 17:50]
node _T_2 = tail(_T_1, 1) @[PEUIntBackend.scala 17:50]
resultReg <= _T_2 @[PEUIntBackend.scala 17:15]
module PESIntBackend :
input clock : Clock
input reset : Reset
output io : {flip x1 : SInt<32>, flip x2 : SInt<32>, flip inPartialSum : SInt<32>, outPartialSum : SInt<32>}
reg resultReg : SInt<32>, clock @[PESIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PESIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PESIntBackend.scala 17:34]
node _T_1 = bits(_T, 31, 0) @[PESIntBackend.scala 17:49]
node opResult = asSInt(_T_1) @[PESIntBackend.scala 17:67]
node _T_2 = add(opResult, io.inPartialSum) @[PESIntBackend.scala 20:28]
node _T_3 = tail(_T_2, 1) @[PESIntBackend.scala 20:28]
node result = asSInt(_T_3) @[PESIntBackend.scala 20:28]
wire _T_4 : SInt<32> @[PESIntBackend.scala 21:33]
node _T_5 = asUInt(result) @[PESIntBackend.scala 21:33]
node _T_6 = asSInt(_T_5) @[PESIntBackend.scala 21:33]
_T_4 <= _T_6 @[PESIntBackend.scala 21:33]
resultReg <= _T_4 @[PESIntBackend.scala 21:15]
module PEFPBackend :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
reg resultReg : UInt<32>, clock @[PEFPBackend.scala 17:24]
io.outPartialSum <= resultReg @[PEFPBackend.scala 18:22]
reg compensationReg : UInt<32>, clock @[PEFPBackend.scala 19:30]
io.outCompensation <= compensationReg @[PEFPBackend.scala 20:24]
resultReg <= UInt<1>("h00") @[PEFPBackend.scala 22:15]
module ProcessingElement :
input clock : Clock
input reset : Reset
output io : {flip input : UInt<32>, forwardedInput : UInt<32>, flip weight : UInt<32>, flip unlockWeight : UInt<1>, forwardedWeight : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip typeSelection : UInt<2>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
inst WeightBackend of PEWeightBackend @[PE.scala 27:31]
WeightBackend.clock <= clock
WeightBackend.reset <= reset
WeightBackend.io.propagate <= io.unlockWeight @[PE.scala 29:32]
WeightBackend.io.weightIn <= io.weight @[PE.scala 30:31]
io.forwardedWeight <= WeightBackend.io.weightOut @[PE.scala 31:24]
inst uIntBackend of PEUIntBackend @[PE.scala 35:29]
uIntBackend.clock <= clock
uIntBackend.reset <= reset
uIntBackend.io.x1 <= io.weight @[PE.scala 36:23]
uIntBackend.io.x2 <= io.input @[PE.scala 37:23]
uIntBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 38:33]
inst sIntBackend of PESIntBackend @[PE.scala 41:29]
sIntBackend.clock <= clock
sIntBackend.reset <= reset
node _T = asSInt(io.weight) @[PE.scala 42:42]
sIntBackend.io.x1 <= _T @[PE.scala 42:23]
node _T_1 = asSInt(io.input) @[PE.scala 43:41]
sIntBackend.io.x2 <= _T_1 @[PE.scala 43:23]
node _T_2 = asSInt(io.inPartialSum) @[PE.scala 44:58]
sIntBackend.io.inPartialSum <= _T_2 @[PE.scala 44:33]
wire fpResult : UInt<32> @[PE.scala 47:41]
inst PEFPBackend of PEFPBackend @[PE.scala 49:31]
PEFPBackend.clock <= clock
PEFPBackend.reset <= reset
PEFPBackend.io.x1 <= io.weight @[PE.scala 50:25]
PEFPBackend.io.x2 <= io.input @[PE.scala 51:25]
PEFPBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 52:35]
PEFPBackend.io.inCompensation <= io.inCompensation @[PE.scala 53:37]
io.outCompensation <= PEFPBackend.io.outCompensation @[PE.scala 54:28]
fpResult <= PEFPBackend.io.outPartialSum @[PE.scala 55:18]
reg _T_3 : UInt, clock @[PE.scala 59:33]
_T_3 <= io.input @[PE.scala 59:33]
io.forwardedInput <= _T_3 @[PE.scala 59:23]
node _T_4 = eq(io.typeSelection, UInt<1>("h01")) @[PE.scala 62:27]
when _T_4 : @[PE.scala 62:36]
node _T_5 = asUInt(sIntBackend.io.outPartialSum) @[PE.scala 64:64]
io.outPartialSum <= _T_5 @[PE.scala 64:26]
skip @[PE.scala 62:36]
else : @[PE.scala 65:42]
node _T_6 = eq(io.typeSelection, UInt<1>("h00")) @[PE.scala 65:33]
when _T_6 : @[PE.scala 65:42]
io.outPartialSum <= uIntBackend.io.outPartialSum @[PE.scala 67:26]
skip @[PE.scala 65:42]
else : @[PE.scala 68:16]
io.outPartialSum <= fpResult @[PE.scala 70:42]
skip @[PE.scala 68:16]
module PEWeightBackend_1 :
input clock : Clock
input reset : Reset
output io : {flip propagate : UInt<1>, flip weightIn : UInt<32>, weightOut : UInt<32>}
reg weightReg : UInt<32>, clock @[PEWeightBackend.scala 14:24]
node _T = eq(io.propagate, UInt<1>("h01")) @[PEWeightBackend.scala 17:35]
node _T_1 = mux(_T, io.weightIn, weightReg) @[PEWeightBackend.scala 17:21]
weightReg <= _T_1 @[PEWeightBackend.scala 17:15]
io.weightOut <= weightReg @[PEWeightBackend.scala 18:18]
module PEUIntBackend_1 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>}
reg resultReg : UInt<32>, clock @[PEUIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PEUIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PEUIntBackend.scala 17:33]
node _T_1 = add(_T, io.inPartialSum) @[PEUIntBackend.scala 17:50]
node _T_2 = tail(_T_1, 1) @[PEUIntBackend.scala 17:50]
resultReg <= _T_2 @[PEUIntBackend.scala 17:15]
module PESIntBackend_1 :
input clock : Clock
input reset : Reset
output io : {flip x1 : SInt<32>, flip x2 : SInt<32>, flip inPartialSum : SInt<32>, outPartialSum : SInt<32>}
reg resultReg : SInt<32>, clock @[PESIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PESIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PESIntBackend.scala 17:34]
node _T_1 = bits(_T, 31, 0) @[PESIntBackend.scala 17:49]
node opResult = asSInt(_T_1) @[PESIntBackend.scala 17:67]
node _T_2 = add(opResult, io.inPartialSum) @[PESIntBackend.scala 20:28]
node _T_3 = tail(_T_2, 1) @[PESIntBackend.scala 20:28]
node result = asSInt(_T_3) @[PESIntBackend.scala 20:28]
wire _T_4 : SInt<32> @[PESIntBackend.scala 21:33]
node _T_5 = asUInt(result) @[PESIntBackend.scala 21:33]
node _T_6 = asSInt(_T_5) @[PESIntBackend.scala 21:33]
_T_4 <= _T_6 @[PESIntBackend.scala 21:33]
resultReg <= _T_4 @[PESIntBackend.scala 21:15]
module PEFPBackend_1 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
reg resultReg : UInt<32>, clock @[PEFPBackend.scala 17:24]
io.outPartialSum <= resultReg @[PEFPBackend.scala 18:22]
reg compensationReg : UInt<32>, clock @[PEFPBackend.scala 19:30]
io.outCompensation <= compensationReg @[PEFPBackend.scala 20:24]
resultReg <= UInt<1>("h00") @[PEFPBackend.scala 22:15]
module ProcessingElement_1 :
input clock : Clock
input reset : Reset
output io : {flip input : UInt<32>, forwardedInput : UInt<32>, flip weight : UInt<32>, flip unlockWeight : UInt<1>, forwardedWeight : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip typeSelection : UInt<2>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
inst WeightBackend of PEWeightBackend_1 @[PE.scala 27:31]
WeightBackend.clock <= clock
WeightBackend.reset <= reset
WeightBackend.io.propagate <= io.unlockWeight @[PE.scala 29:32]
WeightBackend.io.weightIn <= io.weight @[PE.scala 30:31]
io.forwardedWeight <= WeightBackend.io.weightOut @[PE.scala 31:24]
inst uIntBackend of PEUIntBackend_1 @[PE.scala 35:29]
uIntBackend.clock <= clock
uIntBackend.reset <= reset
uIntBackend.io.x1 <= io.weight @[PE.scala 36:23]
uIntBackend.io.x2 <= io.input @[PE.scala 37:23]
uIntBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 38:33]
inst sIntBackend of PESIntBackend_1 @[PE.scala 41:29]
sIntBackend.clock <= clock
sIntBackend.reset <= reset
node _T = asSInt(io.weight) @[PE.scala 42:42]
sIntBackend.io.x1 <= _T @[PE.scala 42:23]
node _T_1 = asSInt(io.input) @[PE.scala 43:41]
sIntBackend.io.x2 <= _T_1 @[PE.scala 43:23]
node _T_2 = asSInt(io.inPartialSum) @[PE.scala 44:58]
sIntBackend.io.inPartialSum <= _T_2 @[PE.scala 44:33]
wire fpResult : UInt<32> @[PE.scala 47:41]
inst PEFPBackend of PEFPBackend_1 @[PE.scala 49:31]
PEFPBackend.clock <= clock
PEFPBackend.reset <= reset
PEFPBackend.io.x1 <= io.weight @[PE.scala 50:25]
PEFPBackend.io.x2 <= io.input @[PE.scala 51:25]
PEFPBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 52:35]
PEFPBackend.io.inCompensation <= io.inCompensation @[PE.scala 53:37]
io.outCompensation <= PEFPBackend.io.outCompensation @[PE.scala 54:28]
fpResult <= PEFPBackend.io.outPartialSum @[PE.scala 55:18]
reg _T_3 : UInt, clock @[PE.scala 59:33]
_T_3 <= io.input @[PE.scala 59:33]
io.forwardedInput <= _T_3 @[PE.scala 59:23]
node _T_4 = eq(io.typeSelection, UInt<1>("h01")) @[PE.scala 62:27]
when _T_4 : @[PE.scala 62:36]
node _T_5 = asUInt(sIntBackend.io.outPartialSum) @[PE.scala 64:64]
io.outPartialSum <= _T_5 @[PE.scala 64:26]
skip @[PE.scala 62:36]
else : @[PE.scala 65:42]
node _T_6 = eq(io.typeSelection, UInt<1>("h00")) @[PE.scala 65:33]
when _T_6 : @[PE.scala 65:42]
io.outPartialSum <= uIntBackend.io.outPartialSum @[PE.scala 67:26]
skip @[PE.scala 65:42]
else : @[PE.scala 68:16]
io.outPartialSum <= fpResult @[PE.scala 70:42]
skip @[PE.scala 68:16]
module PEWeightBackend_2 :
input clock : Clock
input reset : Reset
output io : {flip propagate : UInt<1>, flip weightIn : UInt<32>, weightOut : UInt<32>}
reg weightReg : UInt<32>, clock @[PEWeightBackend.scala 14:24]
node _T = eq(io.propagate, UInt<1>("h01")) @[PEWeightBackend.scala 17:35]
node _T_1 = mux(_T, io.weightIn, weightReg) @[PEWeightBackend.scala 17:21]
weightReg <= _T_1 @[PEWeightBackend.scala 17:15]
io.weightOut <= weightReg @[PEWeightBackend.scala 18:18]
module PEUIntBackend_2 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>}
reg resultReg : UInt<32>, clock @[PEUIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PEUIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PEUIntBackend.scala 17:33]
node _T_1 = add(_T, io.inPartialSum) @[PEUIntBackend.scala 17:50]
node _T_2 = tail(_T_1, 1) @[PEUIntBackend.scala 17:50]
resultReg <= _T_2 @[PEUIntBackend.scala 17:15]
module PESIntBackend_2 :
input clock : Clock
input reset : Reset
output io : {flip x1 : SInt<32>, flip x2 : SInt<32>, flip inPartialSum : SInt<32>, outPartialSum : SInt<32>}
reg resultReg : SInt<32>, clock @[PESIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PESIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PESIntBackend.scala 17:34]
node _T_1 = bits(_T, 31, 0) @[PESIntBackend.scala 17:49]
node opResult = asSInt(_T_1) @[PESIntBackend.scala 17:67]
node _T_2 = add(opResult, io.inPartialSum) @[PESIntBackend.scala 20:28]
node _T_3 = tail(_T_2, 1) @[PESIntBackend.scala 20:28]
node result = asSInt(_T_3) @[PESIntBackend.scala 20:28]
wire _T_4 : SInt<32> @[PESIntBackend.scala 21:33]
node _T_5 = asUInt(result) @[PESIntBackend.scala 21:33]
node _T_6 = asSInt(_T_5) @[PESIntBackend.scala 21:33]
_T_4 <= _T_6 @[PESIntBackend.scala 21:33]
resultReg <= _T_4 @[PESIntBackend.scala 21:15]
module PEFPBackend_2 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
reg resultReg : UInt<32>, clock @[PEFPBackend.scala 17:24]
io.outPartialSum <= resultReg @[PEFPBackend.scala 18:22]
reg compensationReg : UInt<32>, clock @[PEFPBackend.scala 19:30]
io.outCompensation <= compensationReg @[PEFPBackend.scala 20:24]
resultReg <= UInt<1>("h00") @[PEFPBackend.scala 22:15]
module ProcessingElement_2 :
input clock : Clock
input reset : Reset
output io : {flip input : UInt<32>, forwardedInput : UInt<32>, flip weight : UInt<32>, flip unlockWeight : UInt<1>, forwardedWeight : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip typeSelection : UInt<2>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
inst WeightBackend of PEWeightBackend_2 @[PE.scala 27:31]
WeightBackend.clock <= clock
WeightBackend.reset <= reset
WeightBackend.io.propagate <= io.unlockWeight @[PE.scala 29:32]
WeightBackend.io.weightIn <= io.weight @[PE.scala 30:31]
io.forwardedWeight <= WeightBackend.io.weightOut @[PE.scala 31:24]
inst uIntBackend of PEUIntBackend_2 @[PE.scala 35:29]
uIntBackend.clock <= clock
uIntBackend.reset <= reset
uIntBackend.io.x1 <= io.weight @[PE.scala 36:23]
uIntBackend.io.x2 <= io.input @[PE.scala 37:23]
uIntBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 38:33]
inst sIntBackend of PESIntBackend_2 @[PE.scala 41:29]
sIntBackend.clock <= clock
sIntBackend.reset <= reset
node _T = asSInt(io.weight) @[PE.scala 42:42]
sIntBackend.io.x1 <= _T @[PE.scala 42:23]
node _T_1 = asSInt(io.input) @[PE.scala 43:41]
sIntBackend.io.x2 <= _T_1 @[PE.scala 43:23]
node _T_2 = asSInt(io.inPartialSum) @[PE.scala 44:58]
sIntBackend.io.inPartialSum <= _T_2 @[PE.scala 44:33]
wire fpResult : UInt<32> @[PE.scala 47:41]
inst PEFPBackend of PEFPBackend_2 @[PE.scala 49:31]
PEFPBackend.clock <= clock
PEFPBackend.reset <= reset
PEFPBackend.io.x1 <= io.weight @[PE.scala 50:25]
PEFPBackend.io.x2 <= io.input @[PE.scala 51:25]
PEFPBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 52:35]
PEFPBackend.io.inCompensation <= io.inCompensation @[PE.scala 53:37]
io.outCompensation <= PEFPBackend.io.outCompensation @[PE.scala 54:28]
fpResult <= PEFPBackend.io.outPartialSum @[PE.scala 55:18]
reg _T_3 : UInt, clock @[PE.scala 59:33]
_T_3 <= io.input @[PE.scala 59:33]
io.forwardedInput <= _T_3 @[PE.scala 59:23]
node _T_4 = eq(io.typeSelection, UInt<1>("h01")) @[PE.scala 62:27]
when _T_4 : @[PE.scala 62:36]
node _T_5 = asUInt(sIntBackend.io.outPartialSum) @[PE.scala 64:64]
io.outPartialSum <= _T_5 @[PE.scala 64:26]
skip @[PE.scala 62:36]
else : @[PE.scala 65:42]
node _T_6 = eq(io.typeSelection, UInt<1>("h00")) @[PE.scala 65:33]
when _T_6 : @[PE.scala 65:42]
io.outPartialSum <= uIntBackend.io.outPartialSum @[PE.scala 67:26]
skip @[PE.scala 65:42]
else : @[PE.scala 68:16]
io.outPartialSum <= fpResult @[PE.scala 70:42]
skip @[PE.scala 68:16]
module PEWeightBackend_3 :
input clock : Clock
input reset : Reset
output io : {flip propagate : UInt<1>, flip weightIn : UInt<32>, weightOut : UInt<32>}
reg weightReg : UInt<32>, clock @[PEWeightBackend.scala 14:24]
node _T = eq(io.propagate, UInt<1>("h01")) @[PEWeightBackend.scala 17:35]
node _T_1 = mux(_T, io.weightIn, weightReg) @[PEWeightBackend.scala 17:21]
weightReg <= _T_1 @[PEWeightBackend.scala 17:15]
io.weightOut <= weightReg @[PEWeightBackend.scala 18:18]
module PEUIntBackend_3 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>}
reg resultReg : UInt<32>, clock @[PEUIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PEUIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PEUIntBackend.scala 17:33]
node _T_1 = add(_T, io.inPartialSum) @[PEUIntBackend.scala 17:50]
node _T_2 = tail(_T_1, 1) @[PEUIntBackend.scala 17:50]
resultReg <= _T_2 @[PEUIntBackend.scala 17:15]
module PESIntBackend_3 :
input clock : Clock
input reset : Reset
output io : {flip x1 : SInt<32>, flip x2 : SInt<32>, flip inPartialSum : SInt<32>, outPartialSum : SInt<32>}
reg resultReg : SInt<32>, clock @[PESIntBackend.scala 15:24]
io.outPartialSum <= resultReg @[PESIntBackend.scala 16:22]
node _T = mul(io.x1, io.x2) @[PESIntBackend.scala 17:34]
node _T_1 = bits(_T, 31, 0) @[PESIntBackend.scala 17:49]
node opResult = asSInt(_T_1) @[PESIntBackend.scala 17:67]
node _T_2 = add(opResult, io.inPartialSum) @[PESIntBackend.scala 20:28]
node _T_3 = tail(_T_2, 1) @[PESIntBackend.scala 20:28]
node result = asSInt(_T_3) @[PESIntBackend.scala 20:28]
wire _T_4 : SInt<32> @[PESIntBackend.scala 21:33]
node _T_5 = asUInt(result) @[PESIntBackend.scala 21:33]
node _T_6 = asSInt(_T_5) @[PESIntBackend.scala 21:33]
_T_4 <= _T_6 @[PESIntBackend.scala 21:33]
resultReg <= _T_4 @[PESIntBackend.scala 21:15]
module PEFPBackend_3 :
input clock : Clock
input reset : Reset
output io : {flip x1 : UInt<32>, flip x2 : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
reg resultReg : UInt<32>, clock @[PEFPBackend.scala 17:24]
io.outPartialSum <= resultReg @[PEFPBackend.scala 18:22]
reg compensationReg : UInt<32>, clock @[PEFPBackend.scala 19:30]
io.outCompensation <= compensationReg @[PEFPBackend.scala 20:24]
resultReg <= UInt<1>("h00") @[PEFPBackend.scala 22:15]
module ProcessingElement_3 :
input clock : Clock
input reset : Reset
output io : {flip input : UInt<32>, forwardedInput : UInt<32>, flip weight : UInt<32>, flip unlockWeight : UInt<1>, forwardedWeight : UInt<32>, flip inPartialSum : UInt<32>, outPartialSum : UInt<32>, flip typeSelection : UInt<2>, flip inCompensation : UInt<32>, outCompensation : UInt<32>}
inst WeightBackend of PEWeightBackend_3 @[PE.scala 27:31]
WeightBackend.clock <= clock
WeightBackend.reset <= reset
WeightBackend.io.propagate <= io.unlockWeight @[PE.scala 29:32]
WeightBackend.io.weightIn <= io.weight @[PE.scala 30:31]
io.forwardedWeight <= WeightBackend.io.weightOut @[PE.scala 31:24]
inst uIntBackend of PEUIntBackend_3 @[PE.scala 35:29]
uIntBackend.clock <= clock
uIntBackend.reset <= reset
uIntBackend.io.x1 <= io.weight @[PE.scala 36:23]
uIntBackend.io.x2 <= io.input @[PE.scala 37:23]
uIntBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 38:33]
inst sIntBackend of PESIntBackend_3 @[PE.scala 41:29]
sIntBackend.clock <= clock
sIntBackend.reset <= reset
node _T = asSInt(io.weight) @[PE.scala 42:42]
sIntBackend.io.x1 <= _T @[PE.scala 42:23]
node _T_1 = asSInt(io.input) @[PE.scala 43:41]
sIntBackend.io.x2 <= _T_1 @[PE.scala 43:23]
node _T_2 = asSInt(io.inPartialSum) @[PE.scala 44:58]
sIntBackend.io.inPartialSum <= _T_2 @[PE.scala 44:33]
wire fpResult : UInt<32> @[PE.scala 47:41]
inst PEFPBackend of PEFPBackend_3 @[PE.scala 49:31]
PEFPBackend.clock <= clock
PEFPBackend.reset <= reset
PEFPBackend.io.x1 <= io.weight @[PE.scala 50:25]
PEFPBackend.io.x2 <= io.input @[PE.scala 51:25]
PEFPBackend.io.inPartialSum <= io.inPartialSum @[PE.scala 52:35]
PEFPBackend.io.inCompensation <= io.inCompensation @[PE.scala 53:37]
io.outCompensation <= PEFPBackend.io.outCompensation @[PE.scala 54:28]
fpResult <= PEFPBackend.io.outPartialSum @[PE.scala 55:18]
reg _T_3 : UInt, clock @[PE.scala 59:33]
_T_3 <= io.input @[PE.scala 59:33]
io.forwardedInput <= _T_3 @[PE.scala 59:23]
node _T_4 = eq(io.typeSelection, UInt<1>("h01")) @[PE.scala 62:27]
when _T_4 : @[PE.scala 62:36]
node _T_5 = asUInt(sIntBackend.io.outPartialSum) @[PE.scala 64:64]
io.outPartialSum <= _T_5 @[PE.scala 64:26]
skip @[PE.scala 62:36]
else : @[PE.scala 65:42]
node _T_6 = eq(io.typeSelection, UInt<1>("h00")) @[PE.scala 65:33]
when _T_6 : @[PE.scala 65:42]
io.outPartialSum <= uIntBackend.io.outPartialSum @[PE.scala 67:26]
skip @[PE.scala 65:42]
else : @[PE.scala 68:16]
io.outPartialSum <= fpResult @[PE.scala 70:42]
skip @[PE.scala 68:16]
module Tile :
input clock : Clock
input reset : UInt<1>
output io : {flip inputs : UInt<32>[2], outputs : UInt<32>[2], flip weightsFlattened : UInt<32>[4], flip weightEnable : UInt<1>, flip typeSelection : UInt<2>}
inst ProcessingElement of ProcessingElement @[tile.scala 18:49]
ProcessingElement.clock <= clock
ProcessingElement.reset <= reset
inst ProcessingElement_1 of ProcessingElement_1 @[tile.scala 18:49]
ProcessingElement_1.clock <= clock
ProcessingElement_1.reset <= reset
inst ProcessingElement_2 of ProcessingElement_2 @[tile.scala 18:49]
ProcessingElement_2.clock <= clock
ProcessingElement_2.reset <= reset
inst ProcessingElement_3 of ProcessingElement_3 @[tile.scala 18:49]
ProcessingElement_3.clock <= clock
ProcessingElement_3.reset <= reset
ProcessingElement.io.unlockWeight <= io.weightEnable @[tile.scala 26:32]
ProcessingElement.io.typeSelection <= io.typeSelection @[tile.scala 27:33]
ProcessingElement.io.weight <= io.weightsFlattened[0] @[tile.scala 28:26]
ProcessingElement_1.io.unlockWeight <= io.weightEnable @[tile.scala 26:32]
ProcessingElement_1.io.typeSelection <= io.typeSelection @[tile.scala 27:33]
ProcessingElement_1.io.weight <= io.weightsFlattened[1] @[tile.scala 28:26]
ProcessingElement_2.io.unlockWeight <= io.weightEnable @[tile.scala 26:32]
ProcessingElement_2.io.typeSelection <= io.typeSelection @[tile.scala 27:33]
ProcessingElement_2.io.weight <= io.weightsFlattened[2] @[tile.scala 28:26]
ProcessingElement_3.io.unlockWeight <= io.weightEnable @[tile.scala 26:32]
ProcessingElement_3.io.typeSelection <= io.typeSelection @[tile.scala 27:33]
ProcessingElement_3.io.weight <= io.weightsFlattened[3] @[tile.scala 28:26]
ProcessingElement.io.input <= io.inputs[0] @[tile.scala 36:21]
ProcessingElement_2.io.input <= io.inputs[1] @[tile.scala 36:21]
ProcessingElement.io.inPartialSum <= UInt<1>("h00") @[tile.scala 42:31]
ProcessingElement.io.inCompensation <= UInt<1>("h00") @[tile.scala 44:37]
io.outputs[0] <= ProcessingElement_2.io.outPartialSum @[tile.scala 46:35]
ProcessingElement_1.io.inPartialSum <= UInt<1>("h00") @[tile.scala 42:31]
ProcessingElement_1.io.inCompensation <= UInt<1>("h00") @[tile.scala 44:37]
io.outputs[1] <= ProcessingElement_3.io.outPartialSum @[tile.scala 46:35]
ProcessingElement_1.io.input <= ProcessingElement.io.forwardedInput @[tile.scala 54:38]
ProcessingElement_3.io.input <= ProcessingElement_2.io.forwardedInput @[tile.scala 54:38]
ProcessingElement_2.io.inPartialSum <= ProcessingElement.io.outPartialSum @[tile.scala 63:38]
ProcessingElement_2.io.inCompensation <= ProcessingElement.io.outCompensation @[tile.scala 65:44]
ProcessingElement_3.io.inPartialSum <= ProcessingElement_1.io.outPartialSum @[tile.scala 63:38]
ProcessingElement_3.io.inCompensation <= ProcessingElement_1.io.outCompensation @[tile.scala 65:44]